summaryrefslogtreecommitdiff
path: root/include/toolkit
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-12-31 20:22:02 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-15 11:54:11 +0100
commitcec7ae9f3c69ecc83462f28fc4987e37dc1b420e (patch)
treee0554c836821251f174760ce2b9b5674636a2b59 /include/toolkit
parente69c7cc46ef5a100d9581b7efb01ab4a868d1924 (diff)
tdf#42949 Fix IWYU warnings in include/toolkit/*
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icebcf1a6ab073dce935a74ce79ee0f302b62e8a8 Reviewed-on: https://gerrit.libreoffice.org/65947 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include/toolkit')
-rw-r--r--include/toolkit/awt/animatedimagespeer.hxx1
-rw-r--r--include/toolkit/awt/vclxaccessiblecomponent.hxx8
-rw-r--r--include/toolkit/awt/vclxcontainer.hxx1
-rw-r--r--include/toolkit/awt/vclxdevice.hxx3
-rw-r--r--include/toolkit/awt/vclxfont.hxx7
-rw-r--r--include/toolkit/awt/vclxgraphics.hxx2
-rw-r--r--include/toolkit/awt/vclxmenu.hxx1
-rw-r--r--include/toolkit/awt/vclxprinter.hxx9
-rw-r--r--include/toolkit/awt/vclxsystemdependentwindow.hxx1
-rw-r--r--include/toolkit/awt/vclxtabpagecontainer.hxx7
-rw-r--r--include/toolkit/awt/vclxtopwindow.hxx3
-rw-r--r--include/toolkit/awt/vclxwindow.hxx10
-rw-r--r--include/toolkit/awt/vclxwindows.hxx49
-rw-r--r--include/toolkit/controls/accessiblecontrolcontext.hxx5
-rw-r--r--include/toolkit/controls/animatedimages.hxx6
-rw-r--r--include/toolkit/controls/controlmodelcontainerbase.hxx7
-rw-r--r--include/toolkit/controls/dialogcontrol.hxx10
-rw-r--r--include/toolkit/controls/eventcontainer.hxx1
-rw-r--r--include/toolkit/controls/formattedcontrol.hxx3
-rw-r--r--include/toolkit/controls/geometrycontrolmodel.hxx11
-rw-r--r--include/toolkit/controls/roadmapcontrol.hxx2
-rw-r--r--include/toolkit/controls/stdtabcontroller.hxx8
-rw-r--r--include/toolkit/controls/stdtabcontrollermodel.hxx5
-rw-r--r--include/toolkit/controls/tabpagecontainer.hxx8
-rw-r--r--include/toolkit/controls/tabpagemodel.hxx6
-rw-r--r--include/toolkit/controls/tkscrollbar.hxx3
-rw-r--r--include/toolkit/controls/unocontrol.hxx6
-rw-r--r--include/toolkit/controls/unocontrolcontainer.hxx3
-rw-r--r--include/toolkit/controls/unocontrolcontainermodel.hxx2
-rw-r--r--include/toolkit/controls/unocontrolmodel.hxx5
-rw-r--r--include/toolkit/controls/unocontrols.hxx8
-rw-r--r--include/toolkit/helper/accessiblefactory.hxx1
-rw-r--r--include/toolkit/helper/formpdfexport.hxx5
-rw-r--r--include/toolkit/helper/listenermultiplexer.hxx1
-rw-r--r--include/toolkit/helper/macros.hxx2
-rw-r--r--include/toolkit/helper/vclunohelper.hxx9
36 files changed, 56 insertions, 163 deletions
diff --git a/include/toolkit/awt/animatedimagespeer.hxx b/include/toolkit/awt/animatedimagespeer.hxx
index ee8ce152caf1..ebe1e41d1611 100644
--- a/include/toolkit/awt/animatedimagespeer.hxx
+++ b/include/toolkit/awt/animatedimagespeer.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_TOOLKIT_AWT_ANIMATEDIMAGESPEER_HXX
#include <toolkit/awt/vclxwindow.hxx>
+#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/awt/XAnimation.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx b/include/toolkit/awt/vclxaccessiblecomponent.hxx
index f37c95c1d593..8779f0e14237 100644
--- a/include/toolkit/awt/vclxaccessiblecomponent.hxx
+++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -21,11 +21,6 @@
#define INCLUDED_TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX
#include <toolkit/dllapi.h>
-#include <com/sun/star/accessibility/XAccessible.hpp>
-#include <com/sun/star/accessibility/XAccessibleContext.hpp>
-#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
-#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/accimplaccess.hxx>
@@ -35,9 +30,10 @@
#include <tools/link.hxx>
#include <vcl/vclptr.hxx>
+namespace com { namespace sun { namespace star { namespace accessibility { class XAccessible; } } } }
+
namespace vcl { class Window; }
class VCLXWindow;
-class VclSimpleEvent;
class VclWindowEvent;
namespace utl {
diff --git a/include/toolkit/awt/vclxcontainer.hxx b/include/toolkit/awt/vclxcontainer.hxx
index 3bce61ff95af..3240dac27e99 100644
--- a/include/toolkit/awt/vclxcontainer.hxx
+++ b/include/toolkit/awt/vclxcontainer.hxx
@@ -23,7 +23,6 @@
#include <com/sun/star/awt/XVclContainer.hpp>
#include <com/sun/star/awt/XVclContainerPeer.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
#include <cppuhelper/weak.hxx>
#include <toolkit/awt/vclxwindow.hxx>
diff --git a/include/toolkit/awt/vclxdevice.hxx b/include/toolkit/awt/vclxdevice.hxx
index 8d900612abb3..d47f3816b76f 100644
--- a/include/toolkit/awt/vclxdevice.hxx
+++ b/include/toolkit/awt/vclxdevice.hxx
@@ -30,9 +30,6 @@
#include <com/sun/star/awt/XUnitConversion.hpp>
-class OutputDevice;
-class VirtualDevice;
-
/// An UNO wrapper for the VCL OutputDevice
class TOOLKIT_DLLPUBLIC VCLXDevice :
public css::awt::XDevice,
diff --git a/include/toolkit/awt/vclxfont.hxx b/include/toolkit/awt/vclxfont.hxx
index 9b12b496a21b..e7cd07b13443 100644
--- a/include/toolkit/awt/vclxfont.hxx
+++ b/include/toolkit/awt/vclxfont.hxx
@@ -23,12 +23,15 @@
#include <memory>
#include <toolkit/dllapi.h>
#include <com/sun/star/awt/XFont2.hpp>
-#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
-#include <vcl/metric.hxx>
+#include <vcl/font.hxx>
+
+namespace com { namespace sun { namespace star { namespace awt { class XDevice; } } } }
+
+class FontMetric;
// class VCLXFont
diff --git a/include/toolkit/awt/vclxgraphics.hxx b/include/toolkit/awt/vclxgraphics.hxx
index 8fc980a731de..3fc82faef25d 100644
--- a/include/toolkit/awt/vclxgraphics.hxx
+++ b/include/toolkit/awt/vclxgraphics.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/awt/XGraphics2.hpp>
-#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/weak.hxx>
@@ -36,6 +35,7 @@
class OutputDevice;
namespace vcl { class Region; }
+namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; } } } }
enum class InitOutDevFlags
diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx
index e678d8b5d945..97b28432a74b 100644
--- a/include/toolkit/awt/vclxmenu.hxx
+++ b/include/toolkit/awt/vclxmenu.hxx
@@ -39,7 +39,6 @@
class Menu;
class MenuBar;
-class VclSimpleEvent;
class PopupMenu;
class VclMenuEvent;
diff --git a/include/toolkit/awt/vclxprinter.hxx b/include/toolkit/awt/vclxprinter.hxx
index 5478e9daf75e..60fb105b77d9 100644
--- a/include/toolkit/awt/vclxprinter.hxx
+++ b/include/toolkit/awt/vclxprinter.hxx
@@ -22,19 +22,20 @@
#include <com/sun/star/awt/XPrinterPropertySet.hpp>
-#include <com/sun/star/awt/XPrinter.hpp>
#include <com/sun/star/awt/XPrinterServer.hpp>
#include <com/sun/star/awt/XInfoPrinter.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <cppuhelper/weak.hxx>
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/implbase.hxx>
#include <comphelper/uno3.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/jobset.hxx>
-#include <vcl/oldprintadaptor.hxx>
+namespace com { namespace sun { namespace star { namespace awt { class XPrinter; } } } }
+namespace vcl { class OldStylePrintAdaptor; }
+class Printer;
// relevant properties for the printer:
/*
diff --git a/include/toolkit/awt/vclxsystemdependentwindow.hxx b/include/toolkit/awt/vclxsystemdependentwindow.hxx
index d92cb6b65d6c..d53755aca336 100644
--- a/include/toolkit/awt/vclxsystemdependentwindow.hxx
+++ b/include/toolkit/awt/vclxsystemdependentwindow.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
#include <cppuhelper/weak.hxx>
#include <toolkit/awt/vclxwindow.hxx>
diff --git a/include/toolkit/awt/vclxtabpagecontainer.hxx b/include/toolkit/awt/vclxtabpagecontainer.hxx
index d6467fed9893..732c386e0ea1 100644
--- a/include/toolkit/awt/vclxtabpagecontainer.hxx
+++ b/include/toolkit/awt/vclxtabpagecontainer.hxx
@@ -20,14 +20,7 @@
#ifndef INCLUDED_TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX
#define INCLUDED_TOOLKIT_AWT_VCLXTABPAGECONTAINER_HXX
-#include <toolkit/dllapi.h>
-#include <com/sun/star/beans/PropertyValues.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/PropertyState.hpp>
-#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/container/XContainerListener.hpp>
-#include <toolkit/awt/vclxwindow.hxx>
#include <com/sun/star/awt/tab/XTabPageContainer.hpp>
#include <cppuhelper/implbase.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
diff --git a/include/toolkit/awt/vclxtopwindow.hxx b/include/toolkit/awt/vclxtopwindow.hxx
index cc8746ba6ec6..b018b20335f9 100644
--- a/include/toolkit/awt/vclxtopwindow.hxx
+++ b/include/toolkit/awt/vclxtopwindow.hxx
@@ -22,13 +22,14 @@
#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
#include <com/sun/star/awt/XTopWindow2.hpp>
-#include <com/sun/star/awt/XMenuBar.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
#include <toolkit/awt/vclxcontainer.hxx>
+namespace com { namespace sun { namespace star { namespace awt { class XMenuBar; } } } }
+
typedef ::cppu::ImplHelper1 < css::awt::XTopWindow2
> VCLXTopWindow_XBase;
typedef ::cppu::ImplHelper1 < css::awt::XSystemDependentWindowPeer
diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx
index 27be3e102d32..651594b46e66 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -22,36 +22,30 @@
#include <toolkit/dllapi.h>
#include <toolkit/awt/vclxdevice.hxx>
-#include <toolkit/helper/listenermultiplexer.hxx>
#include <vcl/window.hxx>
#include <com/sun/star/awt/XWindow2.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
#include <com/sun/star/awt/XView.hpp>
-#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
-#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/awt/XStyleSettingsSupplier.hpp>
#include <cppuhelper/implbase.hxx>
-#include <cppuhelper/weak.hxx>
-#include <osl/mutex.hxx>
#include <tools/gen.hxx>
#include <tools/link.hxx>
-#include <stdarg.h>
#include <memory>
#include <vector>
#include <functional>
+namespace comphelper { class OInterfaceContainerHelper2; }
+namespace com { namespace sun { namespace star { namespace accessibility { class XAccessibleContext; } } } }
-class VclSimpleEvent;
class VclWindowEvent;
-struct SystemParentData;
namespace toolkit
{
diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx
index 384bab4ffe76..6982c6dbee3d 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -22,49 +22,20 @@
#include <toolkit/dllapi.h>
-#include <com/sun/star/beans/PropertyValues.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/PropertyState.hpp>
-#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#include <com/sun/star/beans/XMultiPropertySet.hpp>
-#include <com/sun/star/beans/XFastPropertySet.hpp>
-#include <com/sun/star/beans/XVetoableChangeListener.hpp>
-#include <com/sun/star/beans/XPropertyState.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
-#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#include <com/sun/star/beans/XPropertyAccess.hpp>
-#include <com/sun/star/beans/XPropertyContainer.hpp>
-#include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
-#include <com/sun/star/beans/PropertyChangeEvent.hpp>
-#include <com/sun/star/awt/XFileDialog.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/awt/XListBox.hpp>
-#include <com/sun/star/awt/XProgressMonitor.hpp>
-#include <com/sun/star/awt/TextAlign.hpp>
#include <com/sun/star/awt/XScrollBar.hpp>
-#include <com/sun/star/awt/XVclContainerPeer.hpp>
-#include <com/sun/star/awt/XTabControllerModel.hpp>
#include <com/sun/star/awt/XMessageBox.hpp>
#include <com/sun/star/awt/XTextEditField.hpp>
-#include <com/sun/star/awt/Style.hpp>
#include <com/sun/star/awt/XTimeField.hpp>
-#include <com/sun/star/awt/XVclWindowPeer.hpp>
-#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/XSpinField.hpp>
-#include <com/sun/star/awt/XUnoControlContainer.hpp>
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <com/sun/star/awt/XNumericField.hpp>
#include <com/sun/star/awt/XMetricField.hpp>
#include <com/sun/star/awt/XButton.hpp>
#include <com/sun/star/awt/XToggleButton.hpp>
-#include <com/sun/star/awt/XPointer.hpp>
-#include <com/sun/star/awt/XTextArea.hpp>
-#include <com/sun/star/awt/XImageButton.hpp>
#include <com/sun/star/awt/XFixedHyperlink.hpp>
#include <com/sun/star/awt/XFixedText.hpp>
-#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/awt/XDialog2.hpp>
#include <com/sun/star/awt/XRadioButton.hpp>
#include <com/sun/star/awt/XCurrencyField.hpp>
@@ -73,7 +44,6 @@
#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XItemListListener.hpp>
-#include <com/sun/star/awt/XImageConsumer.hpp>
#include <com/sun/star/awt/XSimpleTabController.hpp>
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/Date.hpp>
@@ -82,24 +52,13 @@
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/awt/vclxtopwindow.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
-#include <vcl/pointr.hxx>
#include <vcl/image.hxx>
-#include <vcl/tabctrl.hxx>
-
-class Button;
-class CheckBox;
-class RadioButton;
-class ListBox;
-class ScrollBar;
-class Edit;
-class Menu;
-class ComboBox;
+
class FormatterBase;
-class SpinField;
-class ToolBox;
-class VclSimpleEvent;
-class VclMenuEvent;
+class TabControl;
+class TabPage;
// class VCLXGraphicControl
diff --git a/include/toolkit/controls/accessiblecontrolcontext.hxx b/include/toolkit/controls/accessiblecontrolcontext.hxx
index 180fd538551c..9123c61e484d 100644
--- a/include/toolkit/controls/accessiblecontrolcontext.hxx
+++ b/include/toolkit/controls/accessiblecontrolcontext.hxx
@@ -24,11 +24,12 @@
#include <comphelper/accimplaccess.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
#include <vcl/vclptr.hxx>
namespace vcl { class Window; }
+namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
+namespace com { namespace sun { namespace star { namespace beans { class XPropertySetInfo; } } } }
namespace toolkit
{
diff --git a/include/toolkit/controls/animatedimages.hxx b/include/toolkit/controls/animatedimages.hxx
index c4820ce86f69..d6bac5fe6009 100644
--- a/include/toolkit/controls/animatedimages.hxx
+++ b/include/toolkit/controls/animatedimages.hxx
@@ -20,14 +20,14 @@
#ifndef INCLUDED_TOOLKIT_CONTROLS_ANIMATEDIMAGES_HXX
#define INCLUDED_TOOLKIT_CONTROLS_ANIMATEDIMAGES_HXX
-#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/controls/unocontrolmodel.hxx>
#include <com/sun/star/awt/XAnimatedImages.hpp>
-#include <com/sun/star/container/XContainerListener.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase1.hxx>
#include <memory>
+namespace com { namespace sun { namespace star { namespace container { class XContainerListener; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
namespace toolkit
{
diff --git a/include/toolkit/controls/controlmodelcontainerbase.hxx b/include/toolkit/controls/controlmodelcontainerbase.hxx
index 9d92b8d4e8dc..b2f4af1f5484 100644
--- a/include/toolkit/controls/controlmodelcontainerbase.hxx
+++ b/include/toolkit/controls/controlmodelcontainerbase.hxx
@@ -28,7 +28,6 @@
#include <com/sun/star/util/XChangesListener.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#include <com/sun/star/resource/XStringResourceResolver.hpp>
#include <cppuhelper/implbase8.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/weak.hxx>
@@ -37,13 +36,13 @@
#include <toolkit/controls/unocontrolcontainer.hxx>
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/basemutex.hxx>
-#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/awt/tab/XTabPageModel.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-#include <tools/gen.hxx>
#include <vector>
+namespace com { namespace sun { namespace star { namespace resource { class XStringResourceResolver; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
// class ControlModelContainerBase
typedef UnoControlModel ControlModel_Base;
diff --git a/include/toolkit/controls/dialogcontrol.hxx b/include/toolkit/controls/dialogcontrol.hxx
index 082e08205f3e..83e9b13b2800 100644
--- a/include/toolkit/controls/dialogcontrol.hxx
+++ b/include/toolkit/controls/dialogcontrol.hxx
@@ -22,17 +22,11 @@
#include <toolkit/controls/controlmodelcontainerbase.hxx>
#include <com/sun/star/awt/UnoControlDialog.hpp>
-#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/awt/XDialog2.hpp>
#include <com/sun/star/awt/XSimpleTabController.hpp>
-#include <com/sun/star/graphic/XGraphicObject.hpp>
-#include <toolkit/helper/servicenames.hxx>
#include <toolkit/helper/macros.hxx>
-#include <toolkit/controls/unocontrolcontainer.hxx>
-#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <list>
+
+namespace com { namespace sun { namespace star { namespace awt { class XTopWindowListener; } } } }
typedef ::cppu::AggImplInheritanceHelper2 < ControlContainerBase
, css::awt::XUnoControlDialog
diff --git a/include/toolkit/controls/eventcontainer.hxx b/include/toolkit/controls/eventcontainer.hxx
index cc1d20493e4c..29ce0beecf80 100644
--- a/include/toolkit/controls/eventcontainer.hxx
+++ b/include/toolkit/controls/eventcontainer.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_TOOLKIT_CONTROLS_EVENTCONTAINER_HXX
#define INCLUDED_TOOLKIT_CONTROLS_EVENTCONTAINER_HXX
-#include <osl/diagnose.h>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XContainer.hpp>
diff --git a/include/toolkit/controls/formattedcontrol.hxx b/include/toolkit/controls/formattedcontrol.hxx
index 8bacfa35b6bf..cf2cd9129bba 100644
--- a/include/toolkit/controls/formattedcontrol.hxx
+++ b/include/toolkit/controls/formattedcontrol.hxx
@@ -22,9 +22,8 @@
#include <toolkit/controls/unocontrols.hxx>
#include <toolkit/controls/unocontrolmodel.hxx>
-#include <toolkit/helper/servicenames.hxx>
-#include <com/sun/star/util/XNumberFormatter.hpp>
+namespace com { namespace sun { namespace star { namespace util { class XNumberFormatter; } } } }
namespace toolkit
diff --git a/include/toolkit/controls/geometrycontrolmodel.hxx b/include/toolkit/controls/geometrycontrolmodel.hxx
index cf8ea9bdacd0..be0daf863ad5 100644
--- a/include/toolkit/controls/geometrycontrolmodel.hxx
+++ b/include/toolkit/controls/geometrycontrolmodel.hxx
@@ -24,21 +24,14 @@
#include <comphelper/propagg.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/propertycontainer.hxx>
-#include <cppuhelper/weakagg.hxx>
#include <cppuhelper/compbase2.hxx>
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/script/XScriptEventsSupplier.hpp>
-#include <com/sun/star/resource/XStringResourceResolver.hpp>
-#include <cppuhelper/typeprovider.hxx>
#include <comphelper/IdPropArrayHelper.hxx>
+namespace com { namespace sun { namespace star { namespace resource { class XStringResourceResolver; } } } }
+
namespace com { namespace sun { namespace star {
- namespace lang {
- class XMultiServiceFactory;
- }
- namespace script {
- class XNameContainer;
- }
namespace uno {
class XComponentContext;
}
diff --git a/include/toolkit/controls/roadmapcontrol.hxx b/include/toolkit/controls/roadmapcontrol.hxx
index c5a51a709476..b73916d22c3b 100644
--- a/include/toolkit/controls/roadmapcontrol.hxx
+++ b/include/toolkit/controls/roadmapcontrol.hxx
@@ -23,8 +23,6 @@
#include <toolkit/controls/unocontrols.hxx>
#include <toolkit/controls/unocontrolmodel.hxx>
-#include <toolkit/helper/servicenames.hxx>
-#include <toolkit/controls/roadmapentry.hxx>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
diff --git a/include/toolkit/controls/stdtabcontroller.hxx b/include/toolkit/controls/stdtabcontroller.hxx
index c39c2da70871..b6b5b5ef762e 100644
--- a/include/toolkit/controls/stdtabcontroller.hxx
+++ b/include/toolkit/controls/stdtabcontroller.hxx
@@ -23,15 +23,15 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/awt/XTabController.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <cppuhelper/weakagg.hxx>
#include <osl/mutex.hxx>
-#include <toolkit/helper/macros.hxx>
-#include <toolkit/helper/servicenames.hxx>
+namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
+namespace com { namespace sun { namespace star { namespace awt { class XControl; } } } }
+namespace com { namespace sun { namespace star { namespace awt { class XControlContainer; } } } }
+
class StdTabController final : public css::awt::XTabController,
public css::lang::XServiceInfo,
public css::lang::XTypeProvider,
diff --git a/include/toolkit/controls/stdtabcontrollermodel.hxx b/include/toolkit/controls/stdtabcontrollermodel.hxx
index 2f73c1c8af56..e930ed159d7c 100644
--- a/include/toolkit/controls/stdtabcontrollermodel.hxx
+++ b/include/toolkit/controls/stdtabcontrollermodel.hxx
@@ -24,15 +24,10 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
#include <com/sun/star/awt/XTabControllerModel.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/weakagg.hxx>
-#include <toolkit/helper/macros.hxx>
-#include <toolkit/helper/servicenames.hxx>
#include <osl/mutex.hxx>
-#include <tools/gen.hxx>
#include <vector>
struct UnoControlModelEntry;
diff --git a/include/toolkit/controls/tabpagecontainer.hxx b/include/toolkit/controls/tabpagecontainer.hxx
index 5e85542c99af..e7ace6cd8980 100644
--- a/include/toolkit/controls/tabpagecontainer.hxx
+++ b/include/toolkit/controls/tabpagecontainer.hxx
@@ -22,17 +22,17 @@
#include <com/sun/star/awt/tab/XTabPageContainer.hpp>
#include <com/sun/star/awt/tab/XTabPageContainerModel.hpp>
-#include <com/sun/star/awt/tab/XTabPageContainerListener.hpp>
-#include <com/sun/star/awt/tab/XTabPage.hpp>
-#include <com/sun/star/awt/tab/XTabPageModel.hpp>
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/controls/unocontrolmodel.hxx>
-#include <toolkit/helper/servicenames.hxx>
#include <cppuhelper/implbase1.hxx>
#include <toolkit/controls/controlmodelcontainerbase.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
+namespace com { namespace sun { namespace star { namespace awt { namespace tab { class XTabPage; } } } } }
+namespace com { namespace sun { namespace star { namespace awt { namespace tab { class XTabPageContainerListener; } } } } }
+namespace com { namespace sun { namespace star { namespace awt { namespace tab { class XTabPageModel; } } } } }
+
// class css::awt::tab::UnoControlTabPageContainerModel
typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
diff --git a/include/toolkit/controls/tabpagemodel.hxx b/include/toolkit/controls/tabpagemodel.hxx
index c4a33337d1fb..a4e76081b5fb 100644
--- a/include/toolkit/controls/tabpagemodel.hxx
+++ b/include/toolkit/controls/tabpagemodel.hxx
@@ -21,14 +21,8 @@
#define INCLUDED_TOOLKIT_CONTROLS_TABPAGEMODEL_HXX
#include <toolkit/controls/controlmodelcontainerbase.hxx>
-#include <com/sun/star/awt/tab/XTabPageModel.hpp>
#include <com/sun/star/awt/tab/XTabPage.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <toolkit/helper/servicenames.hxx>
-#include <toolkit/helper/macros.hxx>
#include <toolkit/controls/unocontrolcontainer.hxx>
-#include <cppuhelper/basemutex.hxx>
-#include <list>
#include <cppuhelper/implbase2.hxx>
class UnoControlTabPageModel : public ControlModelContainerBase
diff --git a/include/toolkit/controls/tkscrollbar.hxx b/include/toolkit/controls/tkscrollbar.hxx
index 3682a4e57551..3abd331de396 100644
--- a/include/toolkit/controls/tkscrollbar.hxx
+++ b/include/toolkit/controls/tkscrollbar.hxx
@@ -20,12 +20,9 @@
#define INCLUDED_TOOLKIT_CONTROLS_TKSCROLLBAR_HXX
#include <toolkit/controls/unocontrolmodel.hxx>
-#include <toolkit/helper/servicenames.hxx>
#include <toolkit/controls/unocontrolbase.hxx>
-#include <toolkit/helper/macros.hxx>
#include <com/sun/star/awt/XScrollBar.hpp>
#include <com/sun/star/awt/XAdjustmentListener.hpp>
-#include <com/sun/star/awt/AdjustmentType.hpp>
namespace toolkit
diff --git a/include/toolkit/controls/unocontrol.hxx b/include/toolkit/controls/unocontrol.hxx
index 7bc020140686..94b3f09a1999 100644
--- a/include/toolkit/controls/unocontrol.hxx
+++ b/include/toolkit/controls/unocontrol.hxx
@@ -26,17 +26,11 @@
#include <com/sun/star/awt/XView.hpp>
#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/awt/XUnitConversion.hpp>
#include <com/sun/star/awt/XStyleSettingsSupplier.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
-#include <cppuhelper/weakagg.hxx>
#include <osl/mutex.hxx>
-#include <toolkit/helper/mutexandbroadcasthelper.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
-#include <cppuhelper/propshlp.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase9.hxx>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
diff --git a/include/toolkit/controls/unocontrolcontainer.hxx b/include/toolkit/controls/unocontrolcontainer.hxx
index 816632d418db..79da9c09489c 100644
--- a/include/toolkit/controls/unocontrolcontainer.hxx
+++ b/include/toolkit/controls/unocontrolcontainer.hxx
@@ -26,10 +26,7 @@
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XIdentifierContainer.hpp>
-#include <toolkit/controls/unocontrol.hxx>
#include <toolkit/controls/unocontrolbase.hxx>
-#include <toolkit/helper/macros.hxx>
-#include <toolkit/helper/servicenames.hxx>
#include <cppuhelper/implbase4.hxx>
#include <memory>
diff --git a/include/toolkit/controls/unocontrolcontainermodel.hxx b/include/toolkit/controls/unocontrolcontainermodel.hxx
index b541f275976e..1de5058dc90a 100644
--- a/include/toolkit/controls/unocontrolcontainermodel.hxx
+++ b/include/toolkit/controls/unocontrolcontainermodel.hxx
@@ -22,8 +22,6 @@
#include <toolkit/controls/unocontrolmodel.hxx>
-#include <toolkit/helper/macros.hxx>
-#include <toolkit/helper/servicenames.hxx>
// class css::awt::UnoControlContainerModel
diff --git a/include/toolkit/controls/unocontrolmodel.hxx b/include/toolkit/controls/unocontrolmodel.hxx
index b736e6db49f1..aa358a927246 100644
--- a/include/toolkit/controls/unocontrolmodel.hxx
+++ b/include/toolkit/controls/unocontrolmodel.hxx
@@ -25,17 +25,14 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/weakagg.hxx>
#include <toolkit/helper/mutexandbroadcasthelper.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
#include <cppuhelper/propshlp.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/implbase7.hxx>
#include <comphelper/uno3.hxx>
#include <rtl/ref.hxx>
@@ -43,6 +40,8 @@
#include <vector>
#include <map>
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+
typedef std::map<sal_uInt16, css::uno::Any> ImplPropertyTable;
diff --git a/include/toolkit/controls/unocontrols.hxx b/include/toolkit/controls/unocontrols.hxx
index c7fd44c520f7..5feb07b266c6 100644
--- a/include/toolkit/controls/unocontrols.hxx
+++ b/include/toolkit/controls/unocontrols.hxx
@@ -42,23 +42,21 @@
#include <com/sun/star/awt/XPatternField.hpp>
#include <com/sun/star/awt/XProgressBar.hpp>
#include <com/sun/star/awt/XItemList.hpp>
-#include <com/sun/star/graphic/XGraphicObject.hpp>
#include <toolkit/controls/unocontrolmodel.hxx>
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/helper/macros.hxx>
-#include <toolkit/helper/servicenames.hxx>
-#include <vcl/bitmapex.hxx>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/implbase4.hxx>
-#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/uno3.hxx>
+#include <tools/gen.hxx>
-#include <list>
#include <memory>
#include <vector>
namespace boost { template <class T> class optional; }
+namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; } } } }
+namespace com { namespace sun { namespace star { namespace graphic { class XGraphicObject; } } } }
class ImageHelper
{
diff --git a/include/toolkit/helper/accessiblefactory.hxx b/include/toolkit/helper/accessiblefactory.hxx
index 5a52d97b5503..d10f0195448a 100644
--- a/include/toolkit/helper/accessiblefactory.hxx
+++ b/include/toolkit/helper/accessiblefactory.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_TOOLKIT_HELPER_ACCESSIBLEFACTORY_HXX
#include <com/sun/star/uno/Reference.hxx>
-#include <rtl/ref.hxx>
#include <salhelper/simplereferenceobject.hxx>
namespace com { namespace sun { namespace star { namespace accessibility {
diff --git a/include/toolkit/helper/formpdfexport.hxx b/include/toolkit/helper/formpdfexport.hxx
index 39df68cdf445..a60604d9801b 100644
--- a/include/toolkit/helper/formpdfexport.hxx
+++ b/include/toolkit/helper/formpdfexport.hxx
@@ -22,12 +22,13 @@
#include <toolkit/dllapi.h>
-#include <com/sun/star/awt/XControl.hpp>
-
#include <vcl/pdfwriter.hxx>
#include <memory>
+namespace com { namespace sun { namespace star { namespace awt { class XControl; } } } }
+namespace com { namespace sun { namespace star { namespace uno { template <class interface_type> class Reference; } } } }
+
namespace vcl
{
class PDFExtOutDevData;
diff --git a/include/toolkit/helper/listenermultiplexer.hxx b/include/toolkit/helper/listenermultiplexer.hxx
index 39bd83045bc2..a76336996244 100644
--- a/include/toolkit/helper/listenermultiplexer.hxx
+++ b/include/toolkit/helper/listenermultiplexer.hxx
@@ -41,7 +41,6 @@
#include <com/sun/star/awt/tree/XTreeExpansionListener.hpp>
#include <com/sun/star/awt/tree/XTreeEditListener.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
-#include <com/sun/star/util/VetoException.hpp>
#include <cppuhelper/weak.hxx>
#include <comphelper/interfacecontainer2.hxx>
#include <toolkit/helper/mutexhelper.hxx>
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index 8413606fade0..fc20ee8c0009 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -20,8 +20,6 @@
#ifndef INCLUDED_TOOLKIT_HELPER_MACROS_HXX
#define INCLUDED_TOOLKIT_HELPER_MACROS_HXX
-#include <string.h>
-
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <comphelper/servicehelper.hxx>
diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx
index 91d0905814e3..19d9a6d21c22 100644
--- a/include/toolkit/helper/vclunohelper.hxx
+++ b/include/toolkit/helper/vclunohelper.hxx
@@ -22,21 +22,20 @@
#include <toolkit/dllapi.h>
#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/awt/MouseEvent.hpp>
#include <vcl/bitmapex.hxx>
+#include <vcl/font.hxx>
#include <vcl/region.hxx>
-#include <vcl/metric.hxx>
#include <vcl/vclptr.hxx>
-#include <vcl/window.hxx>
#include <tools/mapunit.hxx>
#include <tools/fldunit.hxx>
#include <tools/poly.hxx>
+namespace com { namespace sun { namespace star { namespace uno { template <typename > class Sequence; } } } }
+
namespace com { namespace sun { namespace star { namespace uno {
class XInterface;
}}}}
@@ -49,7 +48,6 @@ namespace com { namespace sun { namespace star { namespace awt {
class XGraphics;
class XRegion;
class XDevice;
- class XPointer;
class XToolkit;
class XFont;
class XControlContainer;
@@ -62,6 +60,7 @@ namespace com { namespace sun { namespace star { namespace awt {
}}}}
+class FontMetric;
class OutputDevice;
class MouseEvent;
class KeyEvent;