summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-10-04 09:07:36 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-10-08 12:16:44 +0200
commit2a962cb122f796aef9a10252ab224f5cd70569cf (patch)
treedf39ffbde5b06911568acf04e09c08cd87a9ac13 /include/comphelper
parent9b686537f59a63bad05a0cfe7fc5f1096bb7a7c1 (diff)
tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/MasterPropertySet.hxx5
-rw-r--r--include/comphelper/PropertyInfoHash.hxx2
-rw-r--r--include/comphelper/SelectionMultiplex.hxx3
-rw-r--r--include/comphelper/mimeconfighelper.hxx15
-rw-r--r--include/comphelper/namecontainer.hxx6
-rw-r--r--include/comphelper/namedvaluecollection.hxx2
-rw-r--r--include/comphelper/numberedcollection.hxx6
-rw-r--r--include/comphelper/numbers.hxx7
-rw-r--r--include/comphelper/ofopxmlhelper.hxx10
-rw-r--r--include/comphelper/oslfile2streamwrap.hxx5
-rw-r--r--include/comphelper/processfactory.hxx4
-rw-r--r--include/comphelper/profilezone.hxx4
-rw-r--r--include/comphelper/propagg.hxx6
-rw-r--r--include/comphelper/property.hxx4
-rw-r--r--include/comphelper/propertycontainer.hxx4
-rw-r--r--include/comphelper/propertycontainerhelper.hxx1
-rw-r--r--include/comphelper/propertysethelper.hxx3
-rw-r--r--include/comphelper/propertystatecontainer.hxx3
-rw-r--r--include/comphelper/propstate.hxx2
-rw-r--r--include/comphelper/proxyaggregation.hxx7
-rw-r--r--include/comphelper/sequence.hxx1
-rw-r--r--include/comphelper/sequenceashashmap.hxx5
-rw-r--r--include/comphelper/servicedecl.hxx1
-rw-r--r--include/comphelper/serviceinfohelper.hxx4
-rw-r--r--include/comphelper/sharedmutex.hxx3
-rw-r--r--include/comphelper/simplefileaccessinteraction.hxx4
-rw-r--r--include/comphelper/solarmutex.hxx3
-rw-r--r--include/comphelper/stl_types.hxx5
-rw-r--r--include/comphelper/storagehelper.hxx2
-rw-r--r--include/comphelper/streamsection.hxx8
-rw-r--r--include/comphelper/string.hxx12
-rw-r--r--include/comphelper/synchronousdispatch.hxx9
-rw-r--r--include/comphelper/syntaxhighlight.hxx4
-rw-r--r--include/comphelper/threadpool.hxx2
-rw-r--r--include/comphelper/types.hxx7
-rw-r--r--include/comphelper/unique_disposing_ptr.hxx3
-rw-r--r--include/comphelper/uno3.hxx3
-rw-r--r--include/comphelper/weakbag.hxx2
-rw-r--r--include/comphelper/weakeventlistener.hxx6
-rw-r--r--include/comphelper/xmltools.hxx4
40 files changed, 95 insertions, 92 deletions
diff --git a/include/comphelper/MasterPropertySet.hxx b/include/comphelper/MasterPropertySet.hxx
index 4a78c5ee7638..73f376a601a4 100644
--- a/include/comphelper/MasterPropertySet.hxx
+++ b/include/comphelper/MasterPropertySet.hxx
@@ -22,12 +22,13 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
-#include <comphelper/PropertyInfoHash.hxx>
#include <comphelper/comphelperdllapi.h>
-#include <comphelper/solarmutex.hxx>
#include <rtl/ref.hxx>
#include <map>
+namespace comphelper { class SolarMutex; }
+namespace comphelper { struct PropertyInfo; }
+
namespace comphelper
{
class MasterPropertySetInfo;
diff --git a/include/comphelper/PropertyInfoHash.hxx b/include/comphelper/PropertyInfoHash.hxx
index 3f1e4e084c97..03c4373001d2 100644
--- a/include/comphelper/PropertyInfoHash.hxx
+++ b/include/comphelper/PropertyInfoHash.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_COMPHELPER_PROPERTYINFOHASH_HXX
#include <rtl/ustring.hxx>
-#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/uno/Type.h>
#include <unordered_map>
namespace comphelper
diff --git a/include/comphelper/SelectionMultiplex.hxx b/include/comphelper/SelectionMultiplex.hxx
index 8479ad7c4938..77ed7a363636 100644
--- a/include/comphelper/SelectionMultiplex.hxx
+++ b/include/comphelper/SelectionMultiplex.hxx
@@ -21,11 +21,12 @@
#define INCLUDED_COMPHELPER_SELECTIONMULTIPLEX_HXX
#include <com/sun/star/view/XSelectionChangeListener.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
+#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; } } } }
//= selection helper classes
diff --git a/include/comphelper/mimeconfighelper.hxx b/include/comphelper/mimeconfighelper.hxx
index 88ac1fc8d02d..c9b38452ad81 100644
--- a/include/comphelper/mimeconfighelper.hxx
+++ b/include/comphelper/mimeconfighelper.hxx
@@ -21,16 +21,15 @@
#define INCLUDED_COMPHELPER_MIMECONFIGHELPER_HXX
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/container/XContainerQuery.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/embed/VerbDescriptor.hpp>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace beans { struct NamedValue; } } } }
+namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } }
+namespace com { namespace sun { namespace star { namespace container { class XContainerQuery; } } } }
+namespace com { namespace sun { namespace star { namespace container { class XNameAccess; } } } }
+namespace com { namespace sun { namespace star { namespace embed { struct VerbDescriptor; } } } }
+namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
enum class SfxFilterFlags;
diff --git a/include/comphelper/namecontainer.hxx b/include/comphelper/namecontainer.hxx
index fd078c6e8630..3df8e1fc3e0b 100644
--- a/include/comphelper/namecontainer.hxx
+++ b/include/comphelper/namecontainer.hxx
@@ -20,10 +20,12 @@
#ifndef INCLUDED_COMPHELPER_NAMECONTAINER_HXX
#define INCLUDED_COMPHELPER_NAMECONTAINER_HXX
-#include <com/sun/star/uno/Type.hxx>
-#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/Reference.h>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace container { class XNameContainer; } } } }
+
namespace comphelper
{
COMPHELPER_DLLPUBLIC css::uno::Reference< css::container::XNameContainer >
diff --git a/include/comphelper/namedvaluecollection.hxx b/include/comphelper/namedvaluecollection.hxx
index 80a20f1348ed..3f3e405f5d0f 100644
--- a/include/comphelper/namedvaluecollection.hxx
+++ b/include/comphelper/namedvaluecollection.hxx
@@ -28,10 +28,8 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <memory>
-#include <algorithm>
#include <vector>
-
namespace comphelper
{
diff --git a/include/comphelper/numberedcollection.hxx b/include/comphelper/numberedcollection.hxx
index f004e0a31dcf..e2d9a24d4db7 100644
--- a/include/comphelper/numberedcollection.hxx
+++ b/include/comphelper/numberedcollection.hxx
@@ -22,19 +22,17 @@
#include <comphelper/comphelperdllapi.h>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/frame/XUntitledNumbers.hpp>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase.hxx>
-#include <functional>
#include <unordered_map>
#include <vector>
+namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } }
namespace comphelper{
diff --git a/include/comphelper/numbers.hxx b/include/comphelper/numbers.hxx
index 5b3684767215..9699a8b1d515 100644
--- a/include/comphelper/numbers.hxx
+++ b/include/comphelper/numbers.hxx
@@ -20,11 +20,12 @@
#ifndef INCLUDED_COMPHELPER_NUMBERS_HXX
#define INCLUDED_COMPHELPER_NUMBERS_HXX
-#include <com/sun/star/util/XNumberFormats.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
-#include <com/sun/star/lang/Locale.hpp>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Reference.h>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace util { class XNumberFormats; } } } }
+namespace com { namespace sun { namespace star { namespace util { class XNumberFormatter; } } } }
namespace comphelper
{
diff --git a/include/comphelper/ofopxmlhelper.hxx b/include/comphelper/ofopxmlhelper.hxx
index 8c3b62be3956..4679d3fd381c 100644
--- a/include/comphelper/ofopxmlhelper.hxx
+++ b/include/comphelper/ofopxmlhelper.hxx
@@ -20,13 +20,15 @@
#ifndef INCLUDED_COMPHELPER_OFOPXMLHELPER_HXX
#define INCLUDED_COMPHELPER_OFOPXMLHELPER_HXX
-#include <com/sun/star/beans/StringPair.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/Sequence.h>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace beans { struct StringPair; } } } }
+namespace com { namespace sun { namespace star { namespace io { class XInputStream; } } } }
+namespace com { namespace sun { namespace star { namespace io { class XOutputStream; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace com { namespace sun { namespace star { namespace uno { template <class interface_type> class Reference; } } } }
namespace comphelper
{
diff --git a/include/comphelper/oslfile2streamwrap.hxx b/include/comphelper/oslfile2streamwrap.hxx
index 7a5197a0d09b..d365df6ccb12 100644
--- a/include/comphelper/oslfile2streamwrap.hxx
+++ b/include/comphelper/oslfile2streamwrap.hxx
@@ -21,11 +21,12 @@
#include <osl/mutex.hxx>
#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
+ #include <com/sun/star/io/XInputStream.hpp>
#include <cppuhelper/implbase.hxx>
-#include <osl/file.hxx>
#include <comphelper/comphelperdllapi.h>
+namespace osl { class File; }
+
namespace comphelper
{
diff --git a/include/comphelper/processfactory.hxx b/include/comphelper/processfactory.hxx
index 51ba33754a98..7531ee4fbebe 100644
--- a/include/comphelper/processfactory.hxx
+++ b/include/comphelper/processfactory.hxx
@@ -20,13 +20,15 @@
#ifndef INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
#define INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
-#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/Reference.h>
#include <comphelper/comphelperdllapi.h>
namespace com { namespace sun { namespace star { namespace lang {
class XMultiServiceFactory;
} } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
namespace comphelper
{
diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx
index 09b140748c33..3b3b5ee5041c 100644
--- a/include/comphelper/profilezone.hxx
+++ b/include/comphelper/profilezone.hxx
@@ -10,12 +10,10 @@
#ifndef INCLUDED_COMPHELPER_PROFILEZONE_HXX
#define INCLUDED_COMPHELPER_PROFILEZONE_HXX
-#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Sequence.h>
#include <comphelper/comphelperdllapi.h>
#include <rtl/ustring.hxx>
-#include <vector>
-
// implementation of XToolkitExperimental profiling API
namespace comphelper
diff --git a/include/comphelper/propagg.hxx b/include/comphelper/propagg.hxx
index 67cabd5c6402..cb0b1749b36e 100644
--- a/include/comphelper/propagg.hxx
+++ b/include/comphelper/propagg.hxx
@@ -20,7 +20,11 @@
#ifndef INCLUDED_COMPHELPER_PROPAGG_HXX
#define INCLUDED_COMPHELPER_PROPAGG_HXX
-#include <com/sun/star/uno/XAggregation.hpp>
+#include <com/sun/star/beans/Property.hpp>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
#include <comphelper/propstate.hxx>
#include <comphelper/comphelperdllapi.h>
diff --git a/include/comphelper/property.hxx b/include/comphelper/property.hxx
index c8b583db7f9a..1a7f86591fe4 100644
--- a/include/comphelper/property.hxx
+++ b/include/comphelper/property.hxx
@@ -23,10 +23,10 @@
#include <cppuhelper/proptypehlp.hxx>
#include <comphelper/extract.hxx>
#include <com/sun/star/beans/Property.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <type_traits>
#include <comphelper/comphelperdllapi.h>
-#include <cppu/unotype.hxx>
+
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
namespace comphelper
{
diff --git a/include/comphelper/propertycontainer.hxx b/include/comphelper/propertycontainer.hxx
index 78d4eda7c403..37e355222a51 100644
--- a/include/comphelper/propertycontainer.hxx
+++ b/include/comphelper/propertycontainer.hxx
@@ -22,10 +22,12 @@
#include <comphelper/propertycontainerhelper.hxx>
#include <cppuhelper/propshlp.hxx>
-#include <com/sun/star/uno/Type.hxx>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
+
namespace comphelper
{
diff --git a/include/comphelper/propertycontainerhelper.hxx b/include/comphelper/propertycontainerhelper.hxx
index 4f37a1018e66..0b5a178f6e4a 100644
--- a/include/comphelper/propertycontainerhelper.hxx
+++ b/include/comphelper/propertycontainerhelper.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_COMPHELPER_PROPERTYCONTAINERHELPER_HXX
#define INCLUDED_COMPHELPER_PROPERTYCONTAINERHELPER_HXX
-#include <cppuhelper/propshlp.hxx>
#include <com/sun/star/uno/Type.hxx>
#include <com/sun/star/beans/Property.hpp>
#include <vector>
diff --git a/include/comphelper/propertysethelper.hxx b/include/comphelper/propertysethelper.hxx
index a7ce8870bdab..763a0b91b0a7 100644
--- a/include/comphelper/propertysethelper.hxx
+++ b/include/comphelper/propertysethelper.hxx
@@ -24,9 +24,10 @@
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <comphelper/comphelperdllapi.h>
-#include <rtl/ref.hxx>
#include <memory>
+namespace rtl { template <class reference_type> class Reference; }
+
namespace comphelper
{
class PropertySetInfo;
diff --git a/include/comphelper/propertystatecontainer.hxx b/include/comphelper/propertystatecontainer.hxx
index f2f04410d732..966e2cb9939b 100644
--- a/include/comphelper/propertystatecontainer.hxx
+++ b/include/comphelper/propertystatecontainer.hxx
@@ -24,11 +24,8 @@
#include <com/sun/star/beans/XPropertyState.hpp>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/uno3.hxx>
-#include <osl/diagnose.h>
#include <comphelper/comphelperdllapi.h>
-#include <map>
-
namespace comphelper
{
diff --git a/include/comphelper/propstate.hxx b/include/comphelper/propstate.hxx
index 697bb3560b8d..3e3cea79e082 100644
--- a/include/comphelper/propstate.hxx
+++ b/include/comphelper/propstate.hxx
@@ -21,7 +21,7 @@
#define INCLUDED_COMPHELPER_PROPSTATE_HXX
#include <com/sun/star/beans/XPropertyState.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Sequence.h>
#include <cppuhelper/propshlp.hxx>
diff --git a/include/comphelper/proxyaggregation.hxx b/include/comphelper/proxyaggregation.hxx
index 585d81010931..f32fa5ecc3d8 100644
--- a/include/comphelper/proxyaggregation.hxx
+++ b/include/comphelper/proxyaggregation.hxx
@@ -20,11 +20,8 @@
#ifndef INCLUDED_COMPHELPER_PROXYAGGREGATION_HXX
#define INCLUDED_COMPHELPER_PROXYAGGREGATION_HXX
-#include <com/sun/star/uno/XAggregation.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/basemutex.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/compbase_ex.hxx>
@@ -33,6 +30,8 @@
namespace com { namespace sun { namespace star { namespace uno {
class XComponentContext;
} } } }
+namespace com { namespace sun { namespace star { namespace uno { class XAggregation; } } } }
+namespace com { namespace sun { namespace star { namespace lang { class XComponent; } } } }
/* class hierarchy herein:
diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx
index 903b0b5ae25b..d80534f4a8c7 100644
--- a/include/comphelper/sequence.hxx
+++ b/include/comphelper/sequence.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_COMPHELPER_SEQUENCE_HXX
#define INCLUDED_COMPHELPER_SEQUENCE_HXX
-#include <algorithm>
#include <com/sun/star/uno/Sequence.hxx>
#include <osl/diagnose.h>
#include <comphelper/comphelperdllapi.h>
diff --git a/include/comphelper/sequenceashashmap.hxx b/include/comphelper/sequenceashashmap.hxx
index 35cdabc9aa76..ba956f8401e6 100644
--- a/include/comphelper/sequenceashashmap.hxx
+++ b/include/comphelper/sequenceashashmap.hxx
@@ -20,14 +20,13 @@
#ifndef INCLUDED_COMPHELPER_SEQUENCEASHASHMAP_HXX
#define INCLUDED_COMPHELPER_SEQUENCEASHASHMAP_HXX
-#include <algorithm>
#include <unordered_map>
#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace beans { struct NamedValue; } } } }
+namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } }
namespace comphelper{
diff --git a/include/comphelper/servicedecl.hxx b/include/comphelper/servicedecl.hxx
index 40cb81c0dbeb..8594d36f1658 100644
--- a/include/comphelper/servicedecl.hxx
+++ b/include/comphelper/servicedecl.hxx
@@ -23,7 +23,6 @@
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <uno/environment.h>
#include <functional>
#include <initializer_list>
diff --git a/include/comphelper/serviceinfohelper.hxx b/include/comphelper/serviceinfohelper.hxx
index 0e0e619e6440..8b3bb70750f5 100644
--- a/include/comphelper/serviceinfohelper.hxx
+++ b/include/comphelper/serviceinfohelper.hxx
@@ -23,10 +23,12 @@
#include <sal/config.h>
#include <initializer_list>
+#include <rtl/ustring.hxx>
-#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace uno { template <class E> class Sequence; } } } }
+
namespace comphelper {
/** This class provides a basic helper for classes supporting the XServiceInfo Interface.
diff --git a/include/comphelper/sharedmutex.hxx b/include/comphelper/sharedmutex.hxx
index 82ed7f9bef77..a92c7ccb33e6 100644
--- a/include/comphelper/sharedmutex.hxx
+++ b/include/comphelper/sharedmutex.hxx
@@ -21,9 +21,10 @@
#define INCLUDED_COMPHELPER_SHAREDMUTEX_HXX
#include <comphelper/comphelperdllapi.h>
-#include <osl/mutex.hxx>
#include <memory>
+namespace osl { class Mutex; }
+
namespace comphelper
{
diff --git a/include/comphelper/simplefileaccessinteraction.hxx b/include/comphelper/simplefileaccessinteraction.hxx
index 69cec86d1712..78705d8724b3 100644
--- a/include/comphelper/simplefileaccessinteraction.hxx
+++ b/include/comphelper/simplefileaccessinteraction.hxx
@@ -12,9 +12,11 @@
#include <sal/config.h>
#include <ucbhelper/interceptedinteraction.hxx>
-#include <com/sun/star/task/XInteractionHandler.hpp>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace task { class XInteractionHandler; } } } }
+namespace com { namespace sun { namespace star { namespace task { class XInteractionRequest; } } } }
+
namespace comphelper {
/** An interaction handler wrapper for simple file access.
diff --git a/include/comphelper/solarmutex.hxx b/include/comphelper/solarmutex.hxx
index fdecd0d09b9c..0c147f405560 100644
--- a/include/comphelper/solarmutex.hxx
+++ b/include/comphelper/solarmutex.hxx
@@ -22,7 +22,8 @@
#include <sal/config.h>
-#include <osl/thread.hxx>
+#include <assert.h>
+#include <osl/thread.h>
#include <osl/mutex.hxx>
#include <comphelper/comphelperdllapi.h>
diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx
index bf8cc2b70494..c166b5a7040e 100644
--- a/include/comphelper/stl_types.hxx
+++ b/include/comphelper/stl_types.hxx
@@ -21,13 +21,12 @@
#include <sal/config.h>
-#include <math.h>
#include <memory>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
+
+namespace com { namespace sun { namespace star { namespace uno { template <typename > class Reference; } } } }
namespace comphelper
{
diff --git a/include/comphelper/storagehelper.hxx b/include/comphelper/storagehelper.hxx
index ef82b83effae..2ebec23e1eb7 100644
--- a/include/comphelper/storagehelper.hxx
+++ b/include/comphelper/storagehelper.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_COMPHELPER_STORAGEHELPER_HXX
#define INCLUDED_COMPHELPER_STORAGEHELPER_HXX
-#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/embed/ElementModes.hpp>
#include <comphelper/comphelperdllapi.h>
diff --git a/include/comphelper/streamsection.hxx b/include/comphelper/streamsection.hxx
index 6c52892fde6b..d24783c93704 100644
--- a/include/comphelper/streamsection.hxx
+++ b/include/comphelper/streamsection.hxx
@@ -20,11 +20,13 @@
#ifndef INCLUDED_COMPHELPER_STREAMSECTION_HXX
#define INCLUDED_COMPHELPER_STREAMSECTION_HXX
-#include <com/sun/star/io/XMarkableStream.hpp>
-#include <com/sun/star/io/XDataInputStream.hpp>
-#include <com/sun/star/io/XDataOutputStream.hpp>
+#include <com/sun/star/uno/Reference.h>
#include <comphelper/comphelperdllapi.h>
+namespace com { namespace sun { namespace star { namespace io { class XDataInputStream; } } } }
+namespace com { namespace sun { namespace star { namespace io { class XDataOutputStream; } } } }
+namespace com { namespace sun { namespace star { namespace io { class XMarkableStream; } } } }
+
namespace comphelper
{
diff --git a/include/comphelper/string.hxx b/include/comphelper/string.hxx
index c3d4ec178e92..9f5738e5ba48 100644
--- a/include/comphelper/string.hxx
+++ b/include/comphelper/string.hxx
@@ -22,17 +22,19 @@
#include <sal/config.h>
-#include <cstddef>
#include <vector>
#include <comphelper/comphelperdllapi.h>
#include <sal/types.h>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/i18n/XCollator.hpp>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+
+namespace com { namespace sun { namespace star { namespace i18n { class XBreakIterator; } } } }
+namespace com { namespace sun { namespace star { namespace i18n { class XCollator; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
// OUString helper functions that are not widespread or mature enough to
// go into the stable URE API:
diff --git a/include/comphelper/synchronousdispatch.hxx b/include/comphelper/synchronousdispatch.hxx
index a547703376e7..3c2b89b9fbfd 100644
--- a/include/comphelper/synchronousdispatch.hxx
+++ b/include/comphelper/synchronousdispatch.hxx
@@ -22,10 +22,8 @@
#include <comphelper/comphelperdllapi.h>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-
-#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/uno/Reference.h>
+#include <rtl/ustring.hxx>
namespace com { namespace sun { namespace star {
namespace uno {
@@ -34,6 +32,9 @@ namespace com { namespace sun { namespace star {
class XComponent; }
} } }
+namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } }
+namespace com { namespace sun { namespace star { namespace uno { template <class E> class Sequence; } } } }
+
namespace comphelper
{
diff --git a/include/comphelper/syntaxhighlight.hxx b/include/comphelper/syntaxhighlight.hxx
index 22f1338ea12f..26cfd9baad62 100644
--- a/include/comphelper/syntaxhighlight.hxx
+++ b/include/comphelper/syntaxhighlight.hxx
@@ -23,10 +23,6 @@
#include <comphelper/comphelperdllapi.h>
-#ifdef UNX
-#include <sys/resource.h>
-#endif
-
#include <vector>
#include <memory>
diff --git a/include/comphelper/threadpool.hxx b/include/comphelper/threadpool.hxx
index fd5905edc821..092078199981 100644
--- a/include/comphelper/threadpool.hxx
+++ b/include/comphelper/threadpool.hxx
@@ -14,7 +14,6 @@
#include <rtl/ref.hxx>
#include <comphelper/comphelperdllapi.h>
#include <mutex>
-#include <thread>
#include <condition_variable>
#include <vector>
#include <memory>
@@ -22,7 +21,6 @@
namespace comphelper
{
class ThreadTaskTag;
-class ThreadPool;
class COMPHELPER_DLLPUBLIC ThreadTask
{
diff --git a/include/comphelper/types.hxx b/include/comphelper/types.hxx
index a5b56219c295..1e5b2f9f0a90 100644
--- a/include/comphelper/types.hxx
+++ b/include/comphelper/types.hxx
@@ -20,19 +20,18 @@
#ifndef INCLUDED_COMPHELPER_TYPES_HXX
#define INCLUDED_COMPHELPER_TYPES_HXX
-#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/comphelperdllapi.h>
-#include <cppu/unotype.hxx>
namespace com { namespace sun { namespace star { namespace awt {
struct FontDescriptor;
} } } }
+namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } }
+
namespace comphelper
{
diff --git a/include/comphelper/unique_disposing_ptr.hxx b/include/comphelper/unique_disposing_ptr.hxx
index 51a9710f606d..e72b039e6606 100644
--- a/include/comphelper/unique_disposing_ptr.hxx
+++ b/include/comphelper/unique_disposing_ptr.hxx
@@ -17,9 +17,10 @@
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <o3tl/deleter.hxx>
#include <vcl/svapp.hxx>
+namespace o3tl { template <typename T> struct default_delete; }
+
namespace comphelper
{
//Similar to std::unique_ptr, except additionally releases the ptr on XComponent::disposing and/or XTerminateListener::notifyTermination if supported
diff --git a/include/comphelper/uno3.hxx b/include/comphelper/uno3.hxx
index b21fe75765bf..1312d0c6e240 100644
--- a/include/comphelper/uno3.hxx
+++ b/include/comphelper/uno3.hxx
@@ -20,11 +20,8 @@
#ifndef INCLUDED_COMPHELPER_UNO3_HXX
#define INCLUDED_COMPHELPER_UNO3_HXX
-#include <rtl/instance.hxx>
-#include <comphelper/types.hxx>
#include <com/sun/star/uno/XAggregation.hpp>
#include <comphelper/sequence.hxx>
-#include <cppuhelper/typeprovider.hxx>
namespace comphelper
diff --git a/include/comphelper/weakbag.hxx b/include/comphelper/weakbag.hxx
index 981a6c834e36..c52defab23eb 100644
--- a/include/comphelper/weakbag.hxx
+++ b/include/comphelper/weakbag.hxx
@@ -23,7 +23,7 @@
#include <sal/config.h>
#include <vector>
-#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Reference.h>
#include <cppuhelper/weakref.hxx>
#include <osl/diagnose.h>
diff --git a/include/comphelper/weakeventlistener.hxx b/include/comphelper/weakeventlistener.hxx
index 273153cfaeb9..b77ab2a30231 100644
--- a/include/comphelper/weakeventlistener.hxx
+++ b/include/comphelper/weakeventlistener.hxx
@@ -22,12 +22,14 @@
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/uno/XWeak.hpp>
#include <cppuhelper/weakref.hxx>
#include <comphelper/comphelperdllapi.h>
+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/include/comphelper/xmltools.hxx b/include/comphelper/xmltools.hxx
index 85915ec47f9a..e40ea4e24a26 100644
--- a/include/comphelper/xmltools.hxx
+++ b/include/comphelper/xmltools.hxx
@@ -10,9 +10,7 @@
#ifndef INCLUDED_COMPHELPER_XMLTOOLS_HXX
#define INCLUDED_COMPHELPER_XMLTOOLS_HXX
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/string.hxx>
#include <comphelper/comphelperdllapi.h>
namespace comphelper