tdf#42949 Fix IWYU warnings in cppuhelper/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I0eebd82b96d630da0597166cf87d398072607c13
Reviewed-on: https://gerrit.libreoffice.org/67473
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/cppuhelper/IwyuFilter_cppuhelper.yaml b/cppuhelper/IwyuFilter_cppuhelper.yaml
new file mode 100644
index 0000000..323b866
--- /dev/null
+++ b/cppuhelper/IwyuFilter_cppuhelper.yaml
@@ -0,0 +1,48 @@
---
assumeFilename: cppuhelper/source/implbase.cxx
blacklist:
cppuhelper/source/typemanager.hxx:
# base class needs full type
- com/sun/star/container/XHierarchicalNameAccess.hpp
- com/sun/star/container/XSet.hpp
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp
- cppuhelper/compbase.hxx
cppuhelper/source/access_control.cxx:
# Needed for UnoType
- com/sun/star/security/RuntimePermission.hpp
- com/sun/star/io/FilePermission.hpp
- com/sun/star/connection/SocketPermission.hpp
cppuhelper/source/bootstrap.cxx:
# Needed on win32
- o3tl/char16_t2wchar_t.hxx
cppuhelper/source/defaultbootstrap.cxx:
# Needed for template specialization
- com/sun/star/lang/XSingleComponentFactory.hpp
cppuhelper/source/exc_thrower.cxx:
# No hpp -> hdl switch
- cppuhelper/detail/XExceptionThrower.hpp
# Needed for cppu::throwException
- cppuhelper/exc_hlp.hxx
cppuhelper/source/findsofficepath.c:
# Needed for cppuhelper_detail_findSofficePath
- cppuhelper/findsofficepath.h
cppuhelper/source/macro_expander.cxx:
# Needed for template specialization
- com/sun/star/lang/XSingleComponentFactory.hpp
cppuhelper/source/paths.cxx:
# Needed on mac OS for LIBO_LIB_FOLDER + LIBO_URE_ETC_FOLDER
- config_folders.h
cppuhelper/source/shlib.cxx:
# Needed for UnoType
- com/sun/star/registry/XRegistryKey.hpp
# Needed for loadSharedLibComponentFactory & writeSharedLibComponentInfo
- cppuhelper/shlib.hxx
# Needed for cppuhelper::detail::getEnvironment
- loadsharedlibcomponentfactory.hxx
cppuhelper/source/supportsservice.cxx:
# Needed for supportsService
- cppuhelper/supportsservice.hxx
cppuhelper/source/tdmgr.cxx:
# Needed to inherit linker visibility from function declaration
- cppuhelper/bootstrap.hxx
diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
index 5df8561..e7727cc 100644
--- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
+++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
@@ -19,14 +19,12 @@
#include <sal/types.h>
#include <string.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <com/sun/star/lang/XEventListener.hpp>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/propshlp.hxx>
@@ -34,8 +32,6 @@ using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
class ContainerListener;
struct ContainerStats {
int m_nAlive;
int m_nDisposed;
diff --git a/cppuhelper/qa/unourl/cppu_unourl.cxx b/cppuhelper/qa/unourl/cppu_unourl.cxx
index 0be49fc..1a9ba70 100644
--- a/cppuhelper/qa/unourl/cppu_unourl.cxx
+++ b/cppuhelper/qa/unourl/cppu_unourl.cxx
@@ -23,9 +23,6 @@
#include <cppuhelper/unourl.hxx>
#include <rtl/malformeduriexception.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/string.h>
#include <rtl/textenc.h>
#include <rtl/ustring.hxx>
#include <sal/types.h>
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 1eb11bf..34ae388 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -22,27 +22,26 @@
#include <chrono>
#include <cstring>
#include <rtl/process.h>
#include <rtl/bootstrap.hxx>
#include <rtl/random.h>
#include <rtl/string.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/uri.hxx>
#include <osl/file.hxx>
#include <osl/security.hxx>
#include <osl/thread.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
#include <osl/process.h>
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/findsofficepath.h>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/bridge/UnoUrlResolver.hpp>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include "macro_expander.hxx"
namespace com :: sun :: star :: uno { class XComponentContext; }
using namespace ::osl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/cppuhelper/source/compat.cxx b/cppuhelper/source/compat.cxx
index a019626..600cb36 100644
--- a/cppuhelper/source/compat.cxx
+++ b/cppuhelper/source/compat.cxx
@@ -21,7 +21,6 @@
#include <cstdlib>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <osl/module.h>
@@ -43,7 +42,6 @@ namespace com { namespace sun { namespace star {
class XInterface;
}
} } }
namespace rtl { class OUString; }
// Stubs for removed functionality, to be killed when we bump cppuhelper SONAME
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index 02019d5..c887132 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -17,12 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <rtl/string.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <cppuhelper/component.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index b2c4cf4..e278302 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -22,7 +22,6 @@
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <uno/lbnames.h>
@@ -30,11 +29,9 @@
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/component_context.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index 945268b..fe971f0 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -15,10 +15,10 @@
#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/component_context.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/bootstrap.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
@@ -28,6 +28,8 @@
#include "servicemanager.hxx"
#include "typemanager.hxx"
namespace com :: sun :: star :: uno { class XComponentContext; }
namespace {
OUString getBootstrapVariable(
diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx
index 5770bf5..edf7b89 100644
--- a/cppuhelper/source/exc_thrower.cxx
+++ b/cppuhelper/source/exc_thrower.cxx
@@ -20,7 +20,6 @@
#include <rtl/instance.hxx>
#include <osl/diagnose.h>
#include <osl/doublecheckedlocking.h>
#include <uno/dispatcher.hxx>
#include <uno/lbnames.h>
#include <uno/mapping.hxx>
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index c993de1..43e469d 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -21,14 +21,11 @@
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/component.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <rtl/instance.hxx>
#include <rtl/unload.h>
#include <cppuhelper/propshlp.hxx>
diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c
index f91f753..75d3709 100644
--- a/cppuhelper/source/findsofficepath.c
+++ b/cppuhelper/source/findsofficepath.c
@@ -115,7 +115,6 @@ static wchar_t* platformSpecific()
#else
#include <unistd.h>
#include <limits.h>
/*
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index f5242bf..554520a 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -21,10 +21,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <rtl/instance.hxx>
#include <rtl/string.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx
index 4372630..d46f40d 100644
--- a/cppuhelper/source/implbase_ex.cxx
+++ b/cppuhelper/source/implbase_ex.cxx
@@ -17,13 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/alloca.h>
#include <string.h>
#include <osl/diagnose.h>
#include <rtl/byteseq.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/uuid.h>
#include <sal/log.hxx>
#include <cppuhelper/compbase_ex.hxx>
#include <cppuhelper/implbase_ex.hxx>
diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx
index fbf6b40..1755269 100644
--- a/cppuhelper/source/interfacecontainer.cxx
+++ b/cppuhelper/source/interfacecontainer.cxx
@@ -19,7 +19,6 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/propshlp.hxx>
#include <osl/diagnose.h>
diff --git a/cppuhelper/source/loadsharedlibcomponentfactory.hxx b/cppuhelper/source/loadsharedlibcomponentfactory.hxx
index f496d61..9e870f4 100644
--- a/cppuhelper/source/loadsharedlibcomponentfactory.hxx
+++ b/cppuhelper/source/loadsharedlibcomponentfactory.hxx
@@ -23,7 +23,6 @@ namespace com { namespace sun { namespace star {
class XInterface;
}
} } }
namespace rtl { class OUString; }
namespace cppuhelper { namespace detail {
diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx
index a147d03..47c324f 100644
--- a/cppuhelper/source/macro_expander.cxx
+++ b/cppuhelper/source/macro_expander.cxx
@@ -25,13 +25,11 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/component_context.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include "macro_expander.hxx"
#include "paths.hxx"
diff --git a/cppuhelper/source/macro_expander.hxx b/cppuhelper/source/macro_expander.hxx
index dc753de..b0762330 100644
--- a/cppuhelper/source/macro_expander.hxx
+++ b/cppuhelper/source/macro_expander.hxx
@@ -23,12 +23,10 @@
#include <sal/config.h>
#include <com/sun/star/uno/Reference.hxx>
#include <sal/types.h>
namespace com { namespace sun { namespace star { namespace lang {
class XSingleComponentFactory;
} } } }
namespace rtl { class OUString; }
namespace cppuhelper {
diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx
index 7ddd8b7..49144f7 100644
--- a/cppuhelper/source/paths.cxx
+++ b/cppuhelper/source/paths.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_folders.h>
#include <sal/config.h>
@@ -25,10 +24,8 @@
#include <cassert>
#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/uno/XInterface.hpp>
#include <osl/file.hxx>
#include <osl/module.hxx>
#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <sal/types.h>
diff --git a/cppuhelper/source/paths.hxx b/cppuhelper/source/paths.hxx
index f757d90..baad8c6 100644
--- a/cppuhelper/source/paths.hxx
+++ b/cppuhelper/source/paths.hxx
@@ -21,9 +21,9 @@
#define INCLUDED_CPPUHELPER_SOURCE_PATHS_HXX
#include <sal/config.h>
#include <rtl/ustring.hxx>
namespace osl { class Directory; }
namespace rtl { class OUString; }
namespace cppu {
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index d04119c..4c31bea 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -21,7 +21,6 @@
#include <algorithm>
#include <cassert>
#include <exception>
#include <map>
#include <set>
#include <vector>
@@ -57,8 +56,6 @@
#include <com/sun/star/reflection/XTypeDescription.hpp>
#include <com/sun/star/reflection/theCoreReflection.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index a7a0f93..bd1cbe6 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -21,7 +21,6 @@
#include <osl/diagnose.h>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index f6295f3a..68db3c1 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -33,13 +33,11 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/shlib.hxx>
#include <osl/file.hxx>
#include <osl/module.hxx>
#include <rtl/ref.hxx>
#include <rtl/uri.hxx>
#include <rtl/ustring.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <uno/environment.hxx>
diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx
index 3d8a265..d72b46f 100644
--- a/cppuhelper/source/servicemanager.hxx
+++ b/cppuhelper/source/servicemanager.hxx
@@ -26,20 +26,20 @@
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <osl/mutex.hxx>
#include <registry/registry.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/weak.hxx>
namespace com { namespace sun { namespace star { namespace lang {
class XSingleComponentFactory;
} } } }
namespace cppu { struct ContextEntry_Init; }
namespace com :: sun :: star :: lang { class XSingleServiceFactory; }
namespace com :: sun :: star :: uno { class XComponentContext; }
class RegistryKey;
namespace cppuhelper {
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index a6336ca..288ac9b 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -23,10 +23,7 @@
#include <vector>
#include <sal/alloca.h>
#include <osl/diagnose.h>
#include <rtl/alloc.h>
#include <rtl/ustring.hxx>
#include <uno/lbnames.h>
@@ -48,7 +45,6 @@
#include <com/sun/star/reflection/XInterfaceTypeDescription2.hpp>
#include <com/sun/star/reflection/XCompoundTypeDescription.hpp>
#include <com/sun/star/reflection/XStructTypeDescription.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <memory>
diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx
index a3153b7..9faf4d0 100644
--- a/cppuhelper/source/typemanager.cxx
+++ b/cppuhelper/source/typemanager.cxx
@@ -17,10 +17,8 @@
#include <stack>
#include <vector>
#include <com/sun/star/container/ElementExistException.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/reflection/InvalidTypeNameException.hpp>
#include <com/sun/star/reflection/NoSuchTypeNameException.hpp>
#include <com/sun/star/reflection/TypeDescriptionSearchDepth.hpp>
#include <com/sun/star/reflection/XConstantTypeDescription.hpp>
@@ -49,7 +47,6 @@
#include <osl/file.hxx>
#include <osl/mutex.hxx>
#include <rtl/ref.hxx>
#include <rtl/string.h>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <sal/macros.h>
diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx
index f2784aa..1547a5c 100644
--- a/cppuhelper/source/typemanager.hxx
+++ b/cppuhelper/source/typemanager.hxx
@@ -12,18 +12,12 @@
#include <sal/config.h>
#include <com/sun/star/container/ElementExistException.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/container/XSet.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/reflection/InvalidTypeNameException.hpp>
#include <com/sun/star/reflection/NoSuchTypeNameException.hpp>
#include <com/sun/star/reflection/TypeDescriptionSearchDepth.hpp>
#include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
@@ -31,10 +25,8 @@
#include <sal/types.h>
namespace com { namespace sun { namespace star {
namespace uno { class Any; }
namespace reflection { class XTypeDescription; }
} } }
namespace rtl { class OUString; }
namespace unoidl {
class ConstantGroupEntity;
class Entity;
diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx
index c01c83c..8ee7e59 100644
--- a/cppuhelper/source/unourl.cxx
+++ b/cppuhelper/source/unourl.cxx
@@ -25,7 +25,6 @@
#include <rtl/textenc.h>
#include <rtl/uri.h>
#include <rtl/uri.hxx>
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
#include <rtl/character.hxx>
#include <sal/types.h>
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index d93cf4d..57f2288 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -20,14 +20,16 @@
#include <sal/config.h>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <cppuhelper/weakagg.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <algorithm>
#include <utility>
#include <vector>
using namespace osl;
using namespace com::sun::star::uno;