summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-04-13 21:42:04 +0200
committerCaolán McNamara <caolanm@redhat.com>2019-04-19 11:31:19 +0200
commit368f20001c0d152f48575335757e3c3c3b7e5750 (patch)
tree4b31d53a04f5033704962ca513197b2e9274697a
parentc618b8eae79b8d87ad5002466ef59c5694d4cea0 (diff)
tdf#42949 Fix IWYU warnings in comphelper
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Also re-evaluate some blacklisted headers and recheck include/comphelper/ Change-Id: Ib7eea5951e849c07cea2e2782be4e8945f71ad96 Reviewed-on: https://gerrit.libreoffice.org/70899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--comphelper/IwyuFilter_comphelper.yaml85
-rw-r--r--comphelper/qa/container/comphelper_ifcontainer.cxx3
-rw-r--r--comphelper/qa/container/testifcontainer.cxx1
-rw-r--r--comphelper/qa/unit/base64_test.cxx11
-rw-r--r--comphelper/qa/unit/syntaxhighlighttest.cxx1
-rw-r--r--comphelper/qa/unit/test_hash.cxx1
-rw-r--r--comphelper/source/compare/AnyCompareFactory.cxx5
-rw-r--r--comphelper/source/container/IndexedPropertyValuesContainer.cxx3
-rw-r--r--comphelper/source/container/NamedPropertyValuesContainer.cxx2
-rw-r--r--comphelper/source/container/containermultiplexer.cxx1
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx2
-rw-r--r--comphelper/source/container/enumerablemap.cxx1
-rw-r--r--comphelper/source/container/enumhelper.cxx3
-rw-r--r--comphelper/source/container/interfacecontainer2.cxx3
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx2
-rw-r--r--comphelper/source/misc/accessiblecontexthelper.cxx2
-rw-r--r--comphelper/source/misc/accessiblewrapper.cxx3
-rw-r--r--comphelper/source/misc/accimplaccess.cxx3
-rw-r--r--comphelper/source/misc/base64.cxx4
-rw-r--r--comphelper/source/misc/configuration.cxx4
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx2
-rw-r--r--comphelper/source/misc/evtmethodhelper.cxx2
-rw-r--r--comphelper/source/misc/getexpandeduri.cxx4
-rw-r--r--comphelper/source/misc/graphicmimetype.cxx1
-rw-r--r--comphelper/source/misc/hash.cxx1
-rw-r--r--comphelper/source/misc/instancelocker.cxx7
-rw-r--r--comphelper/source/misc/instancelocker.hxx7
-rw-r--r--comphelper/source/misc/logging.cxx2
-rw-r--r--comphelper/source/misc/lok.cxx1
-rw-r--r--comphelper/source/misc/namedvaluecollection.cxx1
-rw-r--r--comphelper/source/misc/numbers.cxx2
-rw-r--r--comphelper/source/misc/officerestartmanager.hxx1
-rw-r--r--comphelper/source/misc/servicedecl.cxx1
-rw-r--r--comphelper/source/misc/storagehelper.cxx4
-rw-r--r--comphelper/source/misc/string.cxx1
-rw-r--r--comphelper/source/misc/synchronousdispatch.cxx1
-rw-r--r--comphelper/source/misc/threadpool.cxx1
-rw-r--r--comphelper/source/misc/types.cxx6
-rw-r--r--comphelper/source/misc/xmlsechelper.cxx8
-rw-r--r--comphelper/source/officeinstdir/officeinstallationdirectories.hxx5
-rw-r--r--comphelper/source/processfactory/processfactory.cxx4
-rw-r--r--comphelper/source/property/opropertybag.cxx3
-rw-r--r--comphelper/source/property/opropertybag.hxx2
-rw-r--r--comphelper/source/property/propagg.cxx4
-rw-r--r--comphelper/source/property/property.cxx4
-rw-r--r--comphelper/source/property/propertycontainer.cxx6
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx2
-rw-r--r--comphelper/source/property/propstate.cxx1
-rw-r--r--comphelper/source/streaming/memorystream.cxx4
-rw-r--r--comphelper/source/streaming/seqinputstreamserv.cxx7
-rw-r--r--comphelper/source/streaming/seqoutputstreamserv.cxx8
-rw-r--r--comphelper/source/streaming/seqstream.cxx2
-rw-r--r--comphelper/source/xml/ofopxmlhelper.cxx2
-rw-r--r--cui/source/customize/cfgutil.cxx1
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx1
-rw-r--r--include/IwyuFilter_include.yaml40
-rw-r--r--include/comphelper/AccessibleImplementationHelper.hxx12
-rw-r--r--include/comphelper/DisableInteractionHelper.hxx2
-rw-r--r--include/comphelper/IdPropArrayHelper.hxx2
-rw-r--r--include/comphelper/SelectionMultiplex.hxx4
-rw-r--r--include/comphelper/componentmodule.hxx1
-rw-r--r--include/comphelper/containermultiplexer.hxx6
-rw-r--r--include/comphelper/enumhelper.hxx6
-rw-r--r--include/comphelper/evtlistenerhlp.hxx1
-rw-r--r--include/comphelper/logging.hxx7
-rw-r--r--include/comphelper/proparrhlp.hxx4
-rw-r--r--include/comphelper/seekableinput.hxx3
-rw-r--r--include/comphelper/stillreadwriteinteraction.hxx5
-rw-r--r--include/comphelper/weakeventlistener.hxx5
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx1
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx1
71 files changed, 176 insertions, 173 deletions
diff --git a/comphelper/IwyuFilter_comphelper.yaml b/comphelper/IwyuFilter_comphelper.yaml
new file mode 100644
index 000000000000..ca21c3a9e785
--- /dev/null
+++ b/comphelper/IwyuFilter_comphelper.yaml
@@ -0,0 +1,85 @@
+---
+assumeFilename: comphelper/source/misc/solarmutex.cxx
+blacklist:
+ comphelper/source/misc/instancelocker.hxx:
+ # Base class has to be a complete type
+ - com/sun/star/lang/XComponent.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ - com/sun/star/util/XCloseListener.hpp
+ - com/sun/star/frame/XTerminateListener.hpp
+ comphelper/source/property/opropertybag.hxx:
+ # Base class has to be a complete type
+ - com/sun/star/beans/XPropertyBag.hpp
+ - com/sun/star/container/XSet.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ - com/sun/star/util/XModifiable.hpp
+ comphelper/source/officeinstdir/officeinstallationdirectories.hxx:
+ # Base class has to be a complete type
+ - com/sun/star/lang/XServiceInfo.hpp
+ - com/sun/star/util/XOfficeInstallationDirectories.hpp
+ comphelper/source/container/IndexedPropertyValuesContainer.cxx:
+ # Needed for typedef
+ - com/sun/star/beans/PropertyValue.hpp
+ comphelper/source/container/NamedPropertyValuesContainer.cxx:
+ # Needed for typedef
+ - com/sun/star/beans/PropertyValue.hpp
+ comphelper/source/container/enumerablemap.cxx:
+ # Avoid loplugin:unreffun error
+ - comphelper_services.hxx
+ comphelper/source/container/namecontainer.cxx:
+ # Needed for NameContainer_createInstance
+ - comphelper/namecontainer.hxx
+ comphelper/source/eventattachermgr/eventattachermgr.cxx:
+ # Needed for linker visibility
+ - comphelper/eventattachermgr.hxx
+ comphelper/source/misc/fileurl.cxx:
+ # Needed for linker visibility
+ - comphelper/fileurl.hxx
+ comphelper/source/misc/getexpandeduri.cxx:
+ # Needed for linker visibility
+ - comphelper/getexpandeduri.hxx
+ comphelper/source/misc/graphicmimetype.cxx:
+ # Needed for direct member access
+ - com/sun/star/io/XInputStream.hpp
+ comphelper/source/misc/hash.cxx:
+ # OSL_BIGENDIAN is being checked
+ - osl/endian.h
+ include/comphelper/interaction.hxx:
+ # Stop warnings about include/
+ - com/sun/star/task/XInteractionApprove.hpp
+ - com/sun/star/task/XInteractionDisapprove.hpp
+ - com/sun/star/task/XInteractionAbort.hpp
+ - com/sun/star/task/XInteractionRetry.hpp
+ include/comphelper/namedvaluecollection.hxx:
+ # Stop warnings about include/
+ - com/sun/star/beans/PropertyValue.hpp
+ - com/sun/star/beans/NamedValue.hpp
+ include/comphelper/servicedecl.hxx:
+ # Stop warnings about include/
+ - com/sun/star/uno/XComponentContext.hpp
+ comphelper/source/misc/simplefileaccessinteraction.cxx:
+ # Needed for UnoType template
+ - com/sun/star/task/XInteractionAbort.hpp
+ - com/sun/star/task/XInteractionApprove.hpp
+ comphelper/source/misc/stillreadwriteinteraction.cxx:
+ # Needed for UnoType template
+ - com/sun/star/task/XInteractionAbort.hpp
+ - com/sun/star/task/XInteractionApprove.hpp
+ comphelper/source/misc/synchronousdispatch.cxx:
+ # Needed for direct member access
+ - com/sun/star/lang/XComponent.hpp
+ comphelper/source/processfactory/processfactory.cxx:
+ # Needed for linker visibility
+ - comphelper/processfactory.hxx
+ # Needed for direct member access
+ - com/sun/star/uno/XComponentContext.hpp
+ include/comphelper/MasterPropertySet.hxx:
+ # Stop warnings about include/
+ - namespace comphelper { class ChainablePropertySet; }
+ comphelper/source/property/genericpropertyset.cxx:
+ # Needed for linker visibility
+ - comphelper/genericpropertyset.hxx
+ # Needed for fw declared template
+ - rtl/ref.hxx
diff --git a/comphelper/qa/container/comphelper_ifcontainer.cxx b/comphelper/qa/container/comphelper_ifcontainer.cxx
index 26a2bd9992d8..8bd9bf75f660 100644
--- a/comphelper/qa/container/comphelper_ifcontainer.cxx
+++ b/comphelper/qa/container/comphelper_ifcontainer.cxx
@@ -19,16 +19,13 @@
#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 <comphelper/interfacecontainer2.hxx>
-#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/implbase.hxx>
-#include <cppuhelper/propshlp.hxx>
using namespace com::sun::star;
using namespace com::sun::star::uno;
diff --git a/comphelper/qa/container/testifcontainer.cxx b/comphelper/qa/container/testifcontainer.cxx
index c9cb4d9509d9..d096b8fd874a 100644
--- a/comphelper/qa/container/testifcontainer.cxx
+++ b/comphelper/qa/container/testifcontainer.cxx
@@ -20,7 +20,6 @@
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
#include <osl/mutex.hxx>
#include <comphelper/interfacecontainer2.hxx>
#include <cppuhelper/implbase.hxx>
diff --git a/comphelper/qa/unit/base64_test.cxx b/comphelper/qa/unit/base64_test.cxx
index 84f59dacbeff..60f6c68d5631 100644
--- a/comphelper/qa/unit/base64_test.cxx
+++ b/comphelper/qa/unit/base64_test.cxx
@@ -17,27 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <limits>
-
#include <sal/types.h>
#include <cppunit/TestAssert.h>
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/plugin/TestPlugIn.h>
#include <rtl/ustrbuf.hxx>
-#include <com/sun/star/util/DateTime.hpp>
-#include <com/sun/star/util/Date.hpp>
-#include <com/sun/star/util/Duration.hpp>
-#include <com/sun/star/util/MeasureUnit.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
-#include <comphelper/sequence.hxx>
#include <comphelper/base64.hxx>
-#include <sal/log.hxx>
using namespace css;
-using namespace css::util;
namespace {
diff --git a/comphelper/qa/unit/syntaxhighlighttest.cxx b/comphelper/qa/unit/syntaxhighlighttest.cxx
index c502262669a0..8a5b66ed2d08 100644
--- a/comphelper/qa/unit/syntaxhighlighttest.cxx
+++ b/comphelper/qa/unit/syntaxhighlighttest.cxx
@@ -14,7 +14,6 @@
#include <cppunit/plugin/TestPlugIn.h>
#include <rtl/ustring.hxx>
-#include <cassert>
#include <vector>
class SyntaxHighlightTest : public CppUnit::TestFixture
diff --git a/comphelper/qa/unit/test_hash.cxx b/comphelper/qa/unit/test_hash.cxx
index 29ef2b884f28..650cd6fc6976 100644
--- a/comphelper/qa/unit/test_hash.cxx
+++ b/comphelper/qa/unit/test_hash.cxx
@@ -11,7 +11,6 @@
#include <comphelper/docpasswordhelper.hxx>
#include <rtl/ustring.hxx>
-#include <sal/log.hxx>
#include <iomanip>
#include <cppunit/TestFixture.h>
diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx
index 8879359b6566..5ad36c5eb615 100644
--- a/comphelper/source/compare/AnyCompareFactory.cxx
+++ b/comphelper/source/compare/AnyCompareFactory.cxx
@@ -21,15 +21,10 @@
#include <com/sun/star/i18n/Collator.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <map>
using namespace com::sun::star::uno;
using namespace com::sun::star::ucb;
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
index cf0e37b59dee..dc7d43448b8b 100644
--- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
@@ -19,7 +19,6 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -29,6 +28,8 @@
#include <vector>
+namespace com::sun::star::uno { class XComponentContext; }
+
using namespace com::sun::star;
typedef std::vector < uno::Sequence< beans::PropertyValue > > IndexedPropertyValues;
diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx b/comphelper/source/container/NamedPropertyValuesContainer.cxx
index 17ddb300edd4..654ed8ecefda 100644
--- a/comphelper/source/container/NamedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx
@@ -19,7 +19,6 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
@@ -28,6 +27,7 @@
#include <map>
+namespace com::sun::star::uno { class XComponentContext; }
using namespace com::sun::star;
typedef std::map< OUString, uno::Sequence<beans::PropertyValue> > NamedPropertyValues;
diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx
index ae37e3a311ef..0d23c0e04d0a 100644
--- a/comphelper/source/container/containermultiplexer.cxx
+++ b/comphelper/source/container/containermultiplexer.cxx
@@ -18,6 +18,7 @@
*/
#include <comphelper/containermultiplexer.hxx>
+#include <com/sun/star/container/XContainer.hpp>
#include <osl/diagnose.h>
namespace comphelper
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index f76da99d2790..cf0b2b7efdd9 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -21,7 +21,6 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/embed/EmbeddedObjectCreator.hpp>
#include <com/sun/star/embed/WrongStateException.hpp>
-#include <com/sun/star/embed/XLinkCreator.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/embed/XLinkageSupport.hpp>
@@ -32,7 +31,6 @@
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
-#include <com/sun/star/datatransfer/XTransferable.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/embed/Aspects.hpp>
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index 41a26005b44f..64e0ba00afaf 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -36,7 +36,6 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/math.hxx>
-#include <rtl/ustrbuf.hxx>
#include <typelib/typedescription.hxx>
#include <map>
diff --git a/comphelper/source/container/enumhelper.cxx b/comphelper/source/container/enumhelper.cxx
index dc467bb23fa8..1267bb1e66d9 100644
--- a/comphelper/source/container/enumhelper.cxx
+++ b/comphelper/source/container/enumhelper.cxx
@@ -19,7 +19,8 @@
#include <comphelper/enumhelper.hxx>
#include <com/sun/star/lang/XComponent.hpp>
-
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
namespace comphelper
{
diff --git a/comphelper/source/container/interfacecontainer2.cxx b/comphelper/source/container/interfacecontainer2.cxx
index 26137cb6b0b0..36141f7a7e19 100644
--- a/comphelper/source/container/interfacecontainer2.cxx
+++ b/comphelper/source/container/interfacecontainer2.cxx
@@ -18,10 +18,7 @@
*/
-#include <cppuhelper/interfacecontainer.hxx>
#include <comphelper/interfacecontainer2.hxx>
-#include <cppuhelper/queryinterface.hxx>
-#include <cppuhelper/propshlp.hxx>
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index cfa3ad28e2bd..182384cad3e7 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -31,7 +31,6 @@
#include <com/sun/star/io/XMarkableStream.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/reflection/theCoreReflection.hpp>
#include <com/sun/star/reflection/XIdlClass.hpp>
#include <com/sun/star/reflection/XIdlReflection.hpp>
@@ -49,7 +48,6 @@
#include <deque>
#include <algorithm>
-#include <functional>
using namespace com::sun::star::uno;
using namespace com::sun::star::io;
diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx
index df837e2e946b..1b6d7f59f547 100644
--- a/comphelper/source/misc/accessiblecontexthelper.cxx
+++ b/comphelper/source/misc/accessiblecontexthelper.cxx
@@ -20,8 +20,6 @@
#include <comphelper/accessiblecontexthelper.hxx>
#include <osl/diagnose.h>
#include <cppuhelper/weakref.hxx>
-#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
#include <comphelper/accessibleeventnotifier.hxx>
#include <comphelper/solarmutex.hxx>
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index 9736b031f618..da86b96bf5d4 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -18,12 +18,9 @@
*/
#include <comphelper/accessiblewrapper.hxx>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#include <algorithm>
-
using namespace ::comphelper;
using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::uno;
diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx
index 95a36640d7f8..8d06e1b91c6e 100644
--- a/comphelper/source/misc/accimplaccess.cxx
+++ b/comphelper/source/misc/accimplaccess.cxx
@@ -18,12 +18,9 @@
*/
#include <comphelper/accimplaccess.hxx>
-#include <com/sun/star/accessibility/XAccessible.hpp>
#include <cppuhelper/typeprovider.hxx>
-#include <set>
#include <string.h>
-#include <memory>
namespace comphelper
diff --git a/comphelper/source/misc/base64.cxx b/comphelper/source/misc/base64.cxx
index 8fd02f120f8f..3748f2f1e56b 100644
--- a/comphelper/source/misc/base64.cxx
+++ b/comphelper/source/misc/base64.cxx
@@ -21,12 +21,8 @@
#include <com/sun/star/uno/Sequence.hxx>
-#include <rtl/math.hxx>
-#include <sal/log.hxx>
#include <osl/diagnose.h>
-#include <algorithm>
-
using namespace com::sun::star;
namespace comphelper {
diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx
index 03396f0bac89..89ce0e3be024 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -21,11 +21,9 @@
#include <com/sun/star/container/XHierarchicalNameReplace.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XLocalizable.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/solarmutex.hxx>
#include <comphelper/configuration.hxx>
#include <comphelper/configurationlistener.hxx>
@@ -35,6 +33,8 @@
#include <sal/log.hxx>
#include <i18nlangtag/languagetag.hxx>
+namespace com::sun::star::uno { class XComponentContext; }
+
namespace {
struct TheConfigurationWrapper:
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index a0d2907c4323..9134e7d050a2 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <osl/diagnose.h>
#include <sal/log.hxx>
@@ -38,7 +37,6 @@
#include <string.h>
#if HAVE_FEATURE_GPGME
-# include <gpgme.h>
# include <context.h>
# include <data.h>
# include <decryptionresult.h>
diff --git a/comphelper/source/misc/evtmethodhelper.cxx b/comphelper/source/misc/evtmethodhelper.cxx
index d02b423bab57..5f60d92d645c 100644
--- a/comphelper/source/misc/evtmethodhelper.cxx
+++ b/comphelper/source/misc/evtmethodhelper.cxx
@@ -18,7 +18,7 @@
*/
#include <comphelper/evtmethodhelper.hxx>
-#include <cppuhelper/typeprovider.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
diff --git a/comphelper/source/misc/getexpandeduri.cxx b/comphelper/source/misc/getexpandeduri.cxx
index 796400f1da9d..853e5dbd3c06 100644
--- a/comphelper/source/misc/getexpandeduri.cxx
+++ b/comphelper/source/misc/getexpandeduri.cxx
@@ -10,13 +10,13 @@
#include <sal/config.h>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarExpandUrlReference.hpp>
#include <com/sun/star/util/theMacroExpander.hpp>
#include <comphelper/getexpandeduri.hxx>
#include <rtl/ustring.hxx>
-#include <sal/types.h>
+
+namespace com::sun::star::uno { class XComponentContext; }
OUString comphelper::getExpandedUri(
css::uno::Reference<css::uno::XComponentContext> const & context,
diff --git a/comphelper/source/misc/graphicmimetype.cxx b/comphelper/source/misc/graphicmimetype.cxx
index 8dd188767936..78e216a941ae 100644
--- a/comphelper/source/misc/graphicmimetype.cxx
+++ b/comphelper/source/misc/graphicmimetype.cxx
@@ -22,7 +22,6 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/graphic/GraphicProvider.hpp>
-#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/uno/Reference.hxx>
diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx
index b7eab08ce033..3db0b3e56616 100644
--- a/comphelper/source/misc/hash.cxx
+++ b/comphelper/source/misc/hash.cxx
@@ -15,7 +15,6 @@
#if USE_TLS_NSS
#include <nss.h>
-#include <pk11pub.h>
#include <sechash.h>
#elif USE_TLS_OPENSSL
#include <openssl/evp.h>
diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx
index cf7a2cfaf218..21b165fe1d8a 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -19,8 +19,8 @@
#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/interfacecontainer2.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/CloseVetoException.hpp>
#include <com/sun/star/util/XCloseBroadcaster.hpp>
#include <com/sun/star/util/XCloseable.hpp>
@@ -29,10 +29,13 @@
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/TerminationVetoException.hpp>
#include <com/sun/star/frame/DoubleInitializationException.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/embed/Actions.hpp>
+#include <com/sun/star/embed/XActionsApproval.hpp>
#include "instancelocker.hxx"
+namespace com::sun::star::uno { class XComponentContext; }
+
using namespace ::com::sun::star;
diff --git a/comphelper/source/misc/instancelocker.hxx b/comphelper/source/misc/instancelocker.hxx
index fb6581317006..ff5cee4f4775 100644
--- a/comphelper/source/misc/instancelocker.hxx
+++ b/comphelper/source/misc/instancelocker.hxx
@@ -20,21 +20,20 @@
#ifndef INCLUDED_COMPHELPER_SOURCE_MISC_INSTANCELOCKER_HXX
#define INCLUDED_COMPHELPER_SOURCE_MISC_INSTANCELOCKER_HXX
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/embed/XActionsApproval.hpp>
-#include <com/sun/star/embed/Actions.hpp>
#include <cppuhelper/weakref.hxx>
#include <osl/mutex.hxx>
#include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer2.hxx>
#include <rtl/ref.hxx>
#include <memory>
+namespace com::sun::star::embed { class XActionsApproval; }
+namespace comphelper { class OInterfaceContainerHelper2; }
+
class OLockListener;
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index 5329e8b7200a..dfd52f8d5bcb 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -21,10 +21,8 @@
#include <comphelper/logging.hxx>
#include <com/sun/star/logging/LoggerPool.hpp>
-#include <com/sun/star/logging/LogLevel.hpp>
#include <osl/diagnose.h>
-#include <rtl/ustrbuf.hxx>
namespace comphelper
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 2b47c6aa36d0..0ea263f20885 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -12,7 +12,6 @@
#include <sal/log.hxx>
#include <iostream>
-#include <sstream>
namespace comphelper
{
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index 42ef768d9297..777e75e57a86 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <rtl/ustrbuf.hxx>
#include <rtl/instance.hxx>
#include <sal/log.hxx>
diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx
index 70eb3f4e8df0..f3b609392ceb 100644
--- a/comphelper/source/misc/numbers.cxx
+++ b/comphelper/source/misc/numbers.cxx
@@ -22,9 +22,7 @@
#include <sal/log.hxx>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
-#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/Locale.hpp>
namespace comphelper
diff --git a/comphelper/source/misc/officerestartmanager.hxx b/comphelper/source/misc/officerestartmanager.hxx
index cfada99c858a..865fc29b23b3 100644
--- a/comphelper/source/misc/officerestartmanager.hxx
+++ b/comphelper/source/misc/officerestartmanager.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_COMPHELPER_SOURCE_MISC_OFFICERESTARTMANAGER_HXX
#include <com/sun/star/task/XRestartManager.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/awt/XCallback.hpp>
diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx
index 063587401434..f37f783b902f 100644
--- a/comphelper/source/misc/servicedecl.cxx
+++ b/comphelper/source/misc/servicedecl.cxx
@@ -20,7 +20,6 @@
#include <comphelper/servicedecl.hxx>
#include <rtl/string.hxx>
-#include <rtl/ustrbuf.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/sequence.hxx>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 33ae9875da8b..c585e2ba0577 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -20,7 +20,6 @@
#include <config_gpgme.h>
#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/embed/XEncryptionProtectedSource2.hpp>
#include <com/sun/star/embed/XEncryptionProtectedStorage.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
@@ -36,7 +35,6 @@
#include <com/sun/star/beans/IllegalTypeException.hpp>
#include <com/sun/star/xml/crypto/NSSInitializer.hpp>
#include <com/sun/star/xml/crypto/XDigestContext.hpp>
-#include <com/sun/star/xml/crypto/XDigestContextSupplier.hpp>
#include <com/sun/star/xml/crypto/DigestID.hpp>
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
#include <com/sun/star/security/XCertificate.hpp>
@@ -47,7 +45,6 @@
#include <rtl/random.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
-#include <sax/tools/converter.hxx>
#include <ucbhelper/content.hxx>
@@ -60,7 +57,6 @@
#include <cppuhelper/exc_hlp.hxx>
#if HAVE_FEATURE_GPGME
-# include <gpgme.h>
# include <context.h>
# include <encryptionresult.h>
# include <key.h>
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index 0822d39d5d78..98fc3d8585a7 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -20,7 +20,6 @@
#include <sal/config.h>
#include <cstddef>
-#include <string.h>
#include <string_view>
#include <vector>
#include <algorithm>
diff --git a/comphelper/source/misc/synchronousdispatch.cxx b/comphelper/source/misc/synchronousdispatch.cxx
index bec5b021310d..a09f05db8331 100644
--- a/comphelper/source/misc/synchronousdispatch.cxx
+++ b/comphelper/source/misc/synchronousdispatch.cxx
@@ -21,7 +21,6 @@
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XSynchronousDispatch.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <comphelper/synchronousdispatch.hxx>
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index f075c0600968..68ff089d270d 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -13,7 +13,6 @@
#include <sal/config.h>
#include <sal/log.hxx>
#include <rtl/instance.hxx>
-#include <rtl/string.hxx>
#include <salhelper/thread.hxx>
#include <algorithm>
#include <memory>
diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx
index f5a57410495f..eb5eec0b5343 100644
--- a/comphelper/source/misc/types.cxx
+++ b/comphelper/source/misc/types.cxx
@@ -19,9 +19,6 @@
#include <comphelper/types.hxx>
#include <comphelper/extract.hxx>
-#include <com/sun/star/util/Date.hpp>
-#include <com/sun/star/util/Time.hpp>
-#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/awt/FontStrikeout.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
@@ -29,8 +26,6 @@
#include <osl/diagnose.h>
#include <typelib/typedescription.hxx>
-#include <memory.h>
-
namespace comphelper
{
@@ -38,7 +33,6 @@ namespace comphelper
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::util;
using namespace ::com::sun::star::lang;
sal_Int64 getINT64(const Any& _rAny)
diff --git a/comphelper/source/misc/xmlsechelper.cxx b/comphelper/source/misc/xmlsechelper.cxx
index 068134bf47fe..9b3b19249803 100644
--- a/comphelper/source/misc/xmlsechelper.cxx
+++ b/comphelper/source/misc/xmlsechelper.cxx
@@ -20,13 +20,7 @@
#include <comphelper/xmlsechelper.hxx>
-#include <o3tl/deleter.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/fixed.hxx>
-#include <svl/solar.hrc>
-#include <unotools/syslocale.hxx>
-#include <rtl/ustring.h>
-#include <rtl/ustrbuf.h>
+#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <vector>
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
index e4fb6dd6a0f9..c71c2ce5f40c 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.hxx
@@ -24,11 +24,12 @@
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/XOfficeInstallationDirectories.hpp>
-#include <memory>
+
#include <boost/optional.hpp>
+namespace com::sun::star::uno { class XComponentContext; }
+
namespace comphelper {
diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx
index 31a2e7adfe05..de62a651d90a 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -19,12 +19,14 @@
#include <osl/mutex.hxx>
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+namespace com::sun::star::lang { class XMultiServiceFactory; }
+namespace com::sun::star::uno { class XComponentContext; }
+
using namespace ::com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx
index fd5807fae03f..9232b1c07f32 100644
--- a/comphelper/source/property/opropertybag.cxx
+++ b/comphelper/source/property/opropertybag.cxx
@@ -22,18 +22,17 @@
#include <com/sun/star/beans/IllegalTypeException.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/Property.hpp>
#include <comphelper/namedvaluecollection.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/exc_hlp.hxx>
-#include <osl/thread.h>
#include <algorithm>
#include <iterator>
+namespace com::sun::star::uno { class XComponentContext; }
using namespace ::com::sun::star;
diff --git a/comphelper/source/property/opropertybag.hxx b/comphelper/source/property/opropertybag.hxx
index 1a7ebd8bde0d..57ff26b8142e 100644
--- a/comphelper/source/property/opropertybag.hxx
+++ b/comphelper/source/property/opropertybag.hxx
@@ -21,11 +21,9 @@
#define INCLUDED_COMPHELPER_SOURCE_PROPERTY_OPROPERTYBAG_HXX
#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/beans/XPropertyBag.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/container/XSet.hpp>
#include <cppuhelper/implbase5.hxx>
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index e5ce771b3b53..df8f97d1bbc9 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -25,11 +25,7 @@
#include <sal/log.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#if OSL_DEBUG_LEVEL > 0
#include <typeinfo>
-#include <rtl/strbuf.hxx>
-#endif
-
#include <algorithm>
#include <set>
#include <unordered_set>
diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx
index 54f31dcd83d0..6b7787725d43 100644
--- a/comphelper/source/property/property.cxx
+++ b/comphelper/source/property/property.cxx
@@ -19,21 +19,17 @@
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
-#include <comphelper/types.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#if OSL_DEBUG_LEVEL > 0
- #include <rtl/strbuf.hxx>
#include <cppuhelper/exc_hlp.hxx>
- #include <osl/thread.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <typeinfo>
#endif
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/uno/genfunc.h>
#include <rtl/ustrbuf.hxx>
#include <algorithm>
diff --git a/comphelper/source/property/propertycontainer.cxx b/comphelper/source/property/propertycontainer.cxx
index 4ee79a43309d..2b5685405604 100644
--- a/comphelper/source/property/propertycontainer.cxx
+++ b/comphelper/source/property/propertycontainer.cxx
@@ -19,12 +19,6 @@
#include <comphelper/propertycontainer.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <uno/data.h>
-#include <com/sun/star/uno/genfunc.h>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <rtl/ustrbuf.hxx>
-
-#include <algorithm>
namespace comphelper
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index efe2b0672102..78bdbd6632ef 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -21,11 +21,9 @@
#include <comphelper/property.hxx>
#include <osl/diagnose.h>
#include <uno/data.h>
-#include <com/sun/star/uno/genfunc.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/UnknownPropertyException.hpp>
-#include <rtl/ustrbuf.hxx>
#include <algorithm>
diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx
index cb9df916a027..52085f98e80b 100644
--- a/comphelper/source/property/propstate.cxx
+++ b/comphelper/source/property/propstate.cxx
@@ -18,7 +18,6 @@
*/
#include <comphelper/propstate.hxx>
-#include <com/sun/star/uno/genfunc.h>
#include <cppuhelper/queryinterface.hxx>
#include <comphelper/sequence.hxx>
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index 77cb69251d5e..8620a8d299e1 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -25,7 +25,7 @@
#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/io/XSeekableInputStream.hpp>
#include <com/sun/star/io/XTruncate.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+//#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
@@ -33,6 +33,8 @@
#include <string.h>
#include <vector>
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
using ::cppu::OWeakObject;
using ::cppu::WeakImplHelper;
using namespace ::com::sun::star::io;
diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx
index fbf3cbab04b1..da7eec387239 100644
--- a/comphelper/source/streaming/seqinputstreamserv.cxx
+++ b/comphelper/source/streaming/seqinputstreamserv.cxx
@@ -19,12 +19,7 @@
#include <sal/config.h>
-#include <comphelper_module.hxx>
-#include <comphelper_services.hxx>
-
#include <osl/mutex.hxx>
-#include <cppuhelper/factory.hxx>
-#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/seqstream.hxx>
@@ -34,8 +29,8 @@
#include <com/sun/star/io/XSeekableInputStream.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/frame/DoubleInitializationException.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+namespace com::sun::star::uno { class XComponentContext; }
using namespace ::com::sun::star;
diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx
index 7175ad2789d1..4098a0aa226f 100644
--- a/comphelper/source/streaming/seqoutputstreamserv.cxx
+++ b/comphelper/source/streaming/seqoutputstreamserv.cxx
@@ -19,19 +19,15 @@
#include <sal/config.h>
-#include <comphelper_module.hxx>
-#include <comphelper_services.hxx>
-
#include <osl/mutex.hxx>
-#include <cppuhelper/factory.hxx>
-#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/seqstream.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/io/NotConnectedException.hpp>
#include <com/sun/star/io/XSequenceOutputStream.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+
+namespace com::sun::star::uno { class XComponentContext; }
using namespace ::com::sun::star;
diff --git a/comphelper/source/streaming/seqstream.cxx b/comphelper/source/streaming/seqstream.cxx
index 8841b1cf4548..e7bcad1103c1 100644
--- a/comphelper/source/streaming/seqstream.cxx
+++ b/comphelper/source/streaming/seqstream.cxx
@@ -26,8 +26,6 @@
#include <osl/diagnose.h>
-#include <memory.h>
-
namespace comphelper
{
using namespace ::com::sun::star::lang;
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 99ccf04f7ae2..f096c61ad248 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -24,8 +24,6 @@
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/beans/StringPair.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/SAXException.hpp>
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 2969bda25b4c..c081a5e83394 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -61,6 +61,7 @@
#include <vcl/commandinfoprovider.hxx>
#include <vcl/help.hxx>
#include <vcl/svapp.hxx>
+#include <uno/current_context.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 9f6fa9fcbaed..f5905bdd284d 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/inspection/PropertyControlType.hpp>
#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/util/VetoException.hpp>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index 455c1bc4f6ae..7d09debc7b5f 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -137,15 +137,22 @@ blacklist:
# base class has to be a complete type
- com/sun/star/util/XCloneable.hpp
- com/sun/star/xml/sax/XAttributeList.hpp
- include/comphelper/componentmodule.hxx:
+ include/comphelper/ChainablePropertySetInfo.hxx:
# base class has to be a complete type
- - com/sun/star/lang/XSingleServiceFactory.hpp
- include/comphelper/configurationhelper.hxx:
- # Needed for implicit destructor
- - com/sun/star/uno/Any.hxx
+ - com/sun/star/beans/XPropertySetInfo.hpp
+ include/comphelper/containermultiplexer.hxx:
+ # base class has to be a complete type
+ - com/sun/star/container/XContainerListener.hpp
include/comphelper/docpasswordrequest.hxx:
# base class has to be a complete type
- com/sun/star/task/XInteractionRequest.hpp
+ include/comphelper/enumhelper.hxx:
+ # base class has to be a complete type
+ - com/sun/star/container/XEnumeration.hpp
+ - com/sun/star/lang/XEventListener.hpp
+ include/comphelper/evtlistenerhlp.hxx:
+ # base class has to be a complete type
+ - com/sun/star/lang/XEventListener.hpp
include/comphelper/interaction.hxx:
# base class has to be a complete type
- com/sun/star/task/XInteractionAbort.hpp
@@ -156,6 +163,9 @@ blacklist:
include/comphelper/SelectionMultiplex.hxx:
# base class has to be a complete type
- com/sun/star/view/XSelectionChangeListener.hpp
+ include/comphelper/MasterPropertySetInfo.hxx:
+ # base class has to be a complete type
+ - com/sun/star/beans/XPropertySetInfo.hpp
include/comphelper/namedvaluecollection.hxx:
# Needed for template class
- com/sun/star/beans/PropertyValue.hpp
@@ -167,22 +177,23 @@ blacklist:
# base class has to be a complete type
- com/sun/star/io/XInputStream.hpp
- com/sun/star/io/XOutputStream.hpp
+ include/comphelper/propertysetinfo.hxx:
+ # base class has to be a complete type
+ - com/sun/star/beans/XPropertySetInfo.hpp
include/comphelper/propmultiplex.hxx:
# base class has to be a complete type
- com/sun/star/beans/XPropertyChangeListener.hpp
include/comphelper/propertystatecontainer.hxx:
# base class has to be a complete type
- com/sun/star/beans/XPropertyState.hpp
+ include/comphelper/seekableinput.hxx:
+ # base class has to be a complete type
+ - com/sun/star/io/XInputStream.hpp
+ - com/sun/star/io/XSeekable.hpp
include/comphelper/seqstream.hxx:
# base class has to be a complete type
- com/sun/star/io/XInputStream.hpp
- com/sun/star/io/XSeekable.hpp
- include/comphelper/sequence.hxx:
- # Needed for implicit dtor
- - com/sun/star/uno/Sequence.hxx
- include/comphelper/sequenceashashmap.hxx:
- # Needed for implicit dtor
- - com/sun/star/uno/Sequence.hxx
include/comphelper/servicedecl.hxx:
# base class has to be a complete type
- com/sun/star/lang/XServiceInfo.hpp
@@ -190,15 +201,16 @@ blacklist:
include/comphelper/servicehelper.hxx:
# Needed for macro
- rtl/instance.hxx
- include/comphelper/simplefileaccessinteraction.hxx:
- # base class has to be a complete type
- - com/sun/star/task/XInteractionHandler.hpp
include/comphelper/unique_disposing_ptr.hxx:
# base class has to be a complete type
- com/sun/star/lang/XServiceInfo.hpp
include/comphelper/uno3.hxx:
# Needed for macro
- comphelper/sequence.hxx
+ include/comphelper/weakeventlistener.hxx:
+ # base class has to be a complete type
+ - com/sun/star/lang/XEventListener.hpp
+ - com/sun/star/lang/XComponent.hpp
include/basegfx/utils/unopolypolygon.hxx:
# base class has to be a complete type
- com/sun/star/lang/XServiceInfo.hpp
diff --git a/include/comphelper/AccessibleImplementationHelper.hxx b/include/comphelper/AccessibleImplementationHelper.hxx
index b2a54d7f02dc..742c56f195bb 100644
--- a/include/comphelper/AccessibleImplementationHelper.hxx
+++ b/include/comphelper/AccessibleImplementationHelper.hxx
@@ -20,12 +20,18 @@
#ifndef INCLUDED_COMPHELPER_ACESSIBLEIMPLEMENTATIONHELPER_HXX
#define INCLUDED_COMPHELPER_ACESSIBLEIMPLEMENTATIONHELPER_HXX
-#include <com/sun/star/awt/KeyStroke.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-
#include <comphelper/comphelperdllapi.h>
#include <rtl/ustring.hxx>
+namespace com::sun::star::awt
+{
+struct KeyStroke;
+}
+namespace com::sun::star::uno
+{
+template <class E> class Sequence;
+}
+
namespace comphelper
{
/**
diff --git a/include/comphelper/DisableInteractionHelper.hxx b/include/comphelper/DisableInteractionHelper.hxx
index da513b9b23eb..c24fdeee40e2 100644
--- a/include/comphelper/DisableInteractionHelper.hxx
+++ b/include/comphelper/DisableInteractionHelper.hxx
@@ -11,7 +11,7 @@
#define INCLUDED_COMPHELPER_DISABLEINTERACTIONHELPER_HXX
#include <cppuhelper/implbase.hxx>
-#include <uno/current_context.hxx>
+#include <com/sun/star/uno/XCurrentContext.hpp>
namespace comphelper
{
diff --git a/include/comphelper/IdPropArrayHelper.hxx b/include/comphelper/IdPropArrayHelper.hxx
index 6a0f5b48975d..55598ff1df1a 100644
--- a/include/comphelper/IdPropArrayHelper.hxx
+++ b/include/comphelper/IdPropArrayHelper.hxx
@@ -28,8 +28,6 @@
#include <rtl/instance.hxx>
#include <cppuhelper/propshlp.hxx>
-namespace cppu { class IPropertyArrayHelper; }
-
namespace comphelper
{
diff --git a/include/comphelper/SelectionMultiplex.hxx b/include/comphelper/SelectionMultiplex.hxx
index f1a0e294d765..8ac2cecf407a 100644
--- a/include/comphelper/SelectionMultiplex.hxx
+++ b/include/comphelper/SelectionMultiplex.hxx
@@ -24,7 +24,6 @@
#include <com/sun/star/lang/EventObject.hpp>
#include <cppuhelper/implbase.hxx>
#include <comphelper/comphelperdllapi.h>
-#include <rtl/ref.hxx>
namespace com { namespace sun { namespace star { namespace view { class XSelectionSupplier; } } } }
@@ -35,9 +34,6 @@ namespace comphelper
{
- class OSelectionChangeMultiplexer;
-
-
//= OSelectionChangeListener
/// simple listener adapter for selections
diff --git a/include/comphelper/componentmodule.hxx b/include/comphelper/componentmodule.hxx
index a60c83aee70d..277d0d483edf 100644
--- a/include/comphelper/componentmodule.hxx
+++ b/include/comphelper/componentmodule.hxx
@@ -21,7 +21,6 @@
#include <comphelper/comphelperdllapi.h>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <cppuhelper/factory.hxx>
diff --git a/include/comphelper/containermultiplexer.hxx b/include/comphelper/containermultiplexer.hxx
index a896c690d530..b1c4f9dadb5f 100644
--- a/include/comphelper/containermultiplexer.hxx
+++ b/include/comphelper/containermultiplexer.hxx
@@ -20,12 +20,14 @@
#ifndef INCLUDED_COMPHELPER_CONTAINERMULTIPLEXER_HXX
#define INCLUDED_COMPHELPER_CONTAINERMULTIPLEXER_HXX
-#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
#include <cppuhelper/implbase.hxx>
-#include <osl/mutex.hxx>
#include <comphelper/comphelperdllapi.h>
#include <rtl/ref.hxx>
+namespace osl { class Mutex; }
+namespace com::sun::star::container { class XContainer; }
+
namespace comphelper
{
diff --git a/include/comphelper/enumhelper.hxx b/include/comphelper/enumhelper.hxx
index 2de51f332782..32d2427267ca 100644
--- a/include/comphelper/enumhelper.hxx
+++ b/include/comphelper/enumhelper.hxx
@@ -20,15 +20,15 @@
#ifndef INCLUDED_COMPHELPER_ENUMHELPER_HXX
#define INCLUDED_COMPHELPER_ENUMHELPER_HXX
-#include <vector>
-#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
#include <comphelper/comphelperdllapi.h>
+namespace com::sun::star::container { class XIndexAccess; }
+namespace com::sun::star::container { class XNameAccess; }
+
namespace comphelper
{
diff --git a/include/comphelper/evtlistenerhlp.hxx b/include/comphelper/evtlistenerhlp.hxx
index a640a79294bc..004ceb9def23 100644
--- a/include/comphelper/evtlistenerhlp.hxx
+++ b/include/comphelper/evtlistenerhlp.hxx
@@ -21,7 +21,6 @@
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XEventListener.hpp>
-#include <osl/diagnose.h>
#include <cppuhelper/weakref.hxx>
#include <comphelper/comphelperdllapi.h>
diff --git a/include/comphelper/logging.hxx b/include/comphelper/logging.hxx
index 8c1ddbd7fec0..e6e793c3c014 100644
--- a/include/comphelper/logging.hxx
+++ b/include/comphelper/logging.hxx
@@ -26,10 +26,9 @@
#include <boost/optional.hpp>
#include <memory>
-#include <com/sun/star/logging/XLogger.hpp>
-
-namespace com { namespace sun { namespace star { namespace uno { template <class interface_type> class Reference; } } } }
-namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace com::sun::star::uno { template <class interface_type> class Reference; }
+namespace com::sun::star::uno { class XComponentContext; }
+namespace com::sun::star::logging { class XLogger; }
namespace comphelper
{
diff --git a/include/comphelper/proparrhlp.hxx b/include/comphelper/proparrhlp.hxx
index 114efda1734f..5d9cb97f9c11 100644
--- a/include/comphelper/proparrhlp.hxx
+++ b/include/comphelper/proparrhlp.hxx
@@ -26,10 +26,6 @@
#include <osl/diagnose.h>
#include <rtl/instance.hxx>
-namespace cppu {
- class IPropertyArrayHelper;
-}
-
namespace comphelper
{
diff --git a/include/comphelper/seekableinput.hxx b/include/comphelper/seekableinput.hxx
index 3544f0e6cc83..54e2aa884cca 100644
--- a/include/comphelper/seekableinput.hxx
+++ b/include/comphelper/seekableinput.hxx
@@ -21,12 +21,13 @@
#include <osl/mutex.hxx>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <cppuhelper/implbase.hxx>
#include <comphelper/comphelperdllapi.h>
+namespace com::sun::star::uno { class XComponentContext; }
+
namespace comphelper
{
diff --git a/include/comphelper/stillreadwriteinteraction.hxx b/include/comphelper/stillreadwriteinteraction.hxx
index 11b0f12c4e69..6bd1d8c6f744 100644
--- a/include/comphelper/stillreadwriteinteraction.hxx
+++ b/include/comphelper/stillreadwriteinteraction.hxx
@@ -22,10 +22,11 @@
#include <ucbhelper/interceptedinteraction.hxx>
-#include <com/sun/star/task/XInteractionHandler.hpp>
-
#include <comphelper/comphelperdllapi.h>
+namespace com::sun::star::task { class XInteractionHandler; }
+namespace com::sun::star::task { class XInteractionRequest; }
+
namespace comphelper{
class COMPHELPER_DLLPUBLIC StillReadWriteInteraction : public ::ucbhelper::InterceptedInteraction
diff --git a/include/comphelper/weakeventlistener.hxx b/include/comphelper/weakeventlistener.hxx
index b77ab2a30231..ffe367bbfea0 100644
--- a/include/comphelper/weakeventlistener.hxx
+++ b/include/comphelper/weakeventlistener.hxx
@@ -24,10 +24,9 @@
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/weakref.hxx>
#include <comphelper/comphelperdllapi.h>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
-
-namespace com { namespace sun { namespace star { namespace lang { class XComponent; } } } }
-namespace com { namespace sun { namespace star { namespace lang { class XEventListener; } } } }
namespace com { namespace sun { namespace star { namespace uno { class XWeak; } } } }
namespace comphelper
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 4a66a15093da..8be711963f39 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -26,6 +26,7 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
+#include <uno/current_context.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/EventObject.hpp>
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index c89643f73b41..90d8aac047d2 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -10,6 +10,7 @@
#include <WPXSvInputStream.hxx>
#include <com/sun/star/packages/zip/XZipFileAccess2.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/seekableinput.hxx>