[Libreoffice-commits] core.git: include/vcl vcl/IwyuFilter_vcl.yaml vcl/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 28 07:31:33 UTC 2019


 include/vcl/NotebookBarAddonsMerger.hxx   |    3 -
 include/vcl/wizardmachine.hxx             |    1 
 vcl/IwyuFilter_vcl.yaml                   |    6 +++
 vcl/source/app/salusereventlist.cxx       |    1 
 vcl/source/app/scheduler.cxx              |    1 
 vcl/source/app/svdata.cxx                 |    1 
 vcl/source/control/hyperlabel.cxx         |    1 
 vcl/source/control/imivctl.hxx            |    1 
 vcl/source/control/imivctl1.cxx           |    1 
 vcl/source/control/ivctrl.cxx             |    1 
 vcl/source/control/wizdlg.cxx             |    1 
 vcl/source/filter/jpeg/jpeg.h             |    2 -
 vcl/source/gdi/gfxlink.cxx                |    3 -
 vcl/source/opengl/OpenGLContext.cxx       |    3 -
 vcl/source/opengl/OpenGLHelper.cxx        |    6 ---
 vcl/source/outdev/bitmap.cxx              |    2 -
 vcl/source/outdev/clipping.cxx            |    8 ----
 vcl/source/outdev/curvedshapes.cxx        |    1 
 vcl/source/outdev/hatch.cxx               |    5 +-
 vcl/source/outdev/line.cxx                |    3 -
 vcl/source/outdev/mask.cxx                |    2 -
 vcl/source/outdev/nativecontrols.cxx      |    1 
 vcl/source/outdev/outdev.cxx              |    3 -
 vcl/source/outdev/pixel.cxx               |    6 ---
 vcl/source/outdev/polygon.cxx             |    3 -
 vcl/source/outdev/polyline.cxx            |    3 -
 vcl/source/outdev/rect.cxx                |    1 
 vcl/source/outdev/text.cxx                |    1 
 vcl/source/outdev/textline.cxx            |    4 --
 vcl/source/outdev/transparent.cxx         |    2 -
 vcl/source/outdev/vclreferencebase.cxx    |    3 -
 vcl/source/outdev/wallpaper.cxx           |    3 -
 vcl/source/salmain/salmain.cxx            |    4 --
 vcl/source/toolkit/morebtn.cxx            |    2 -
 vcl/source/treelist/headbar.cxx           |    1 
 vcl/source/treelist/imap.cxx              |    2 -
 vcl/source/treelist/imap2.cxx             |    3 -
 vcl/source/treelist/svimpbox.cxx          |    1 
 vcl/source/treelist/svtabbx.cxx           |    2 -
 vcl/source/treelist/transfer.cxx          |    1 
 vcl/source/treelist/transfer2.cxx         |    7 ---
 vcl/source/treelist/treelistbox.cxx       |    1 
 vcl/source/treelist/treelistentry.cxx     |    3 -
 vcl/source/uitest/uiobject.cxx            |    1 
 vcl/source/uitest/uno/uiobject_uno.cxx    |    4 --
 vcl/source/uitest/uno/uiobject_uno.hxx    |    3 -
 vcl/source/window/aboutdialog.cxx         |   28 --------------
 vcl/source/window/abstdlg.cxx             |    1 
 vcl/source/window/accel.cxx               |    3 -
 vcl/source/window/accessibility.cxx       |   60 +-----------------------------
 vcl/source/window/brdwin.cxx              |    5 --
 vcl/source/window/builder.cxx             |    4 --
 vcl/source/window/clipping.cxx            |    1 
 vcl/source/window/debug.cxx               |    1 
 vcl/source/window/debugevent.cxx          |    2 -
 vcl/source/window/dialog.cxx              |   11 -----
 vcl/source/window/dlgctrl.cxx             |    2 -
 vcl/source/window/dlgctrl.hxx             |    2 -
 vcl/source/window/dndeventdispatcher.cxx  |    2 -
 vcl/source/window/dockmgr.cxx             |    4 --
 vcl/source/window/dockwin.cxx             |    2 -
 vcl/source/window/errinf.cxx              |    5 +-
 vcl/source/window/event.cxx               |    4 --
 vcl/source/window/introwin.cxx            |    2 -
 vcl/source/window/keycod.cxx              |    1 
 vcl/source/window/keyevent.cxx            |    2 -
 vcl/source/window/legacyaccessibility.cxx |   13 ------
 vcl/source/window/menu.cxx                |   16 --------
 vcl/source/window/menubarwindow.cxx       |    1 
 vcl/source/window/menufloatingwindow.cxx  |    2 -
 vcl/source/window/menuitemlist.cxx        |    2 -
 vcl/source/window/menuitemlist.hxx        |    6 +--
 vcl/source/window/menuwindow.cxx          |    1 
 vcl/source/window/menuwindow.hxx          |    2 -
 vcl/source/window/mouse.cxx               |    3 -
 vcl/source/window/msgbox.cxx              |   10 -----
 vcl/source/window/paint.cxx               |    2 -
 vcl/source/window/printdlg.cxx            |    8 ----
 vcl/source/window/scrwnd.cxx              |    1 
 vcl/source/window/settings.cxx            |    4 --
 vcl/source/window/split.cxx               |    1 
 vcl/source/window/splitwin.cxx            |    6 ---
 vcl/source/window/stacking.cxx            |   10 -----
 vcl/source/window/status.cxx              |    3 -
 vcl/source/window/syschild.cxx            |   13 ------
 vcl/source/window/syswin.cxx              |    5 --
 vcl/source/window/tabpage.cxx             |    6 ---
 vcl/source/window/toolbox.cxx             |    4 --
 vcl/source/window/toolbox2.cxx            |    1 
 vcl/source/window/window.cxx              |   15 +------
 vcl/source/window/window2.cxx             |    7 ---
 vcl/source/window/winproc.cxx             |    4 --
 92 files changed, 30 insertions(+), 376 deletions(-)

New commits:
commit 55402d82c5a81322ff7bca3c277a8813bd967a09
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Sat Aug 24 20:40:21 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Aug 28 09:29:37 2019 +0200

    tdf#42949 Fix IWYU warnings in vcl/source/[o-w]*/
    
    Plus a quick recheck for files in vcl/source/[a-g]*/
    
    Found with bin/find-unneeded-includes
    Only removal proposals are dealt with here.
    
    Change-Id: Ia1ae951047be2e034da5f3b0422613ddb0a091ad
    Reviewed-on: https://gerrit.libreoffice.org/78065
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/include/vcl/NotebookBarAddonsMerger.hxx b/include/vcl/NotebookBarAddonsMerger.hxx
index ccd45ffb0f65..ef6a3291e9f8 100644
--- a/include/vcl/NotebookBarAddonsMerger.hxx
+++ b/include/vcl/NotebookBarAddonsMerger.hxx
@@ -20,15 +20,12 @@
 #ifndef INCLUDED_VCL_NOTEBOOKBARADDONSMERGER_HXX
 #define INCLUDED_VCL_NOTEBOOKBARADDONSMERGER_HXX
 
-#include <vcl/dllapi.h>
 #include <vcl/window.hxx>
-#include <vcl/vclptr.hxx>
 #include <vcl/image.hxx>
 #include <vcl/menu.hxx>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/uno/Sequence.h>
-#include <memory>
 #include <vector>
 #include <map>
 
diff --git a/include/vcl/wizardmachine.hxx b/include/vcl/wizardmachine.hxx
index 8ced51cf59d0..81c81f6dcd97 100644
--- a/include/vcl/wizardmachine.hxx
+++ b/include/vcl/wizardmachine.hxx
@@ -24,7 +24,6 @@
 #include <vcl/wizdlg.hxx>
 #include <vcl/button.hxx>
 #include <vcl/tabpage.hxx>
-#include <o3tl/typed_flags_set.hxx>
 
 namespace weld {
     class Builder;
diff --git a/vcl/IwyuFilter_vcl.yaml b/vcl/IwyuFilter_vcl.yaml
index 67c871d904f7..e05f26754123 100644
--- a/vcl/IwyuFilter_vcl.yaml
+++ b/vcl/IwyuFilter_vcl.yaml
@@ -50,3 +50,9 @@ blacklist:
     vcl/source/gdi/salgdilayout.cxx:
     # Needed on WIN32
     - desktop/exithelper.h
+    vcl/source/window/dialog.cxx:
+    # comphelper::ScopeGuard is actually used
+    - comphelper/scopeguard.hxx
+    vcl/source/window/event.cxx:
+    # comphelper::ScopeGuard is actually used
+    - comphelper/scopeguard.hxx
diff --git a/vcl/source/app/salusereventlist.cxx b/vcl/source/app/salusereventlist.cxx
index ae0653c06ca2..ddb1fae2bc2d 100644
--- a/vcl/source/app/salusereventlist.cxx
+++ b/vcl/source/app/salusereventlist.cxx
@@ -26,7 +26,6 @@
 #include <typeinfo>
 
 #include <com/sun/star/uno/Exception.hpp>
-#include <cppuhelper/exc_hlp.hxx>
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include <sal/log.hxx>
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 2ae19e86fff9..e05a80339e91 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -25,7 +25,6 @@
 #include <typeinfo>
 
 #include <com/sun/star/uno/Exception.hpp>
-#include <cppuhelper/exc_hlp.hxx>
 #include <sal/log.hxx>
 #include <sal/types.h>
 #include <svdata.hxx>
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index d21f926dea5a..936ddf596852 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -34,7 +34,6 @@
 #include <vcl/virdev.hxx>
 #include <vcl/wrkwin.hxx>
 #include <vcl/uitest/logger.hxx>
-#include <salframe.hxx>
 #include <scrwnd.hxx>
 #include <helpwin.hxx>
 #include <vcl/dialog.hxx>
diff --git a/vcl/source/control/hyperlabel.cxx b/vcl/source/control/hyperlabel.cxx
index d65a35959f5a..ff0de4c8dd06 100644
--- a/vcl/source/control/hyperlabel.cxx
+++ b/vcl/source/control/hyperlabel.cxx
@@ -21,7 +21,6 @@
 #include <tools/color.hxx>
 #include <vcl/event.hxx>
 #include <vcl/settings.hxx>
-#include <vcl/tabpage.hxx>
 #include <vcl/ptrstyle.hxx>
 
 namespace vcl
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 0295ff9eabda..3fccbef90299 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -26,7 +26,6 @@
 #include <vcl/timer.hxx>
 #include <vcl/idle.hxx>
 #include <vcl/vclptr.hxx>
-#include <vcl/seleng.hxx>
 #include <tools/debug.hxx>
 #include <vcl/svtaccessiblefactory.hxx>
 
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 333402bdeb5b..770f8770a0ca 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -29,7 +29,6 @@
 #include <vcl/lineinfo.hxx>
 #include <vcl/i18nhelp.hxx>
 #include <vcl/mnemonic.hxx>
-#include <vcl/controllayout.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/commandevent.hxx>
 
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index 8841483c9c88..a096ce63725e 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -23,7 +23,6 @@
 #include <vcl/accessiblefactory.hxx>
 #include <vcl/bitmapex.hxx>
 #include <vcl/commandevent.hxx>
-#include <vcl/controllayout.hxx>
 #include <vcl/mnemonic.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/tabctrl.hxx>
diff --git a/vcl/source/control/wizdlg.cxx b/vcl/source/control/wizdlg.cxx
index 9c6b17c88241..be909bbdd92f 100644
--- a/vcl/source/control/wizdlg.cxx
+++ b/vcl/source/control/wizdlg.cxx
@@ -19,7 +19,6 @@
 
 #include <osl/diagnose.h>
 #include <vcl/event.hxx>
-#include <vcl/fixed.hxx>
 #include <vcl/button.hxx>
 #include <vcl/tabpage.hxx>
 #include <vcl/wizdlg.hxx>
diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h
index 5dc114bd6516..9641d10337ac 100644
--- a/vcl/source/filter/jpeg/jpeg.h
+++ b/vcl/source/filter/jpeg/jpeg.h
@@ -23,9 +23,7 @@
 #include <sal/config.h>
 
 #include <com/sun/star/uno/Reference.hxx>
-#include <sal/types.h>
 #include <basegfx/vector/b2dsize.hxx>
-#include <vcl/bitmap.hxx>
 #include <bitmapwriteaccess.hxx>
 
 #include <jpeglib.h>
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index d21736d0ba37..8c9726b8686c 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -17,16 +17,13 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <osl/file.h>
 #include <sal/log.hxx>
 #include <tools/stream.hxx>
 #include <tools/vcompat.hxx>
-#include <unotools/tempfile.hxx>
 #include <vcl/graph.hxx>
 #include <vcl/gfxlink.hxx>
 #include <vcl/graphicfilter.hxx>
 #include <memory>
-#include <o3tl/make_shared.hxx>
 
 GfxLink::GfxLink()
     : meType(GfxLinkType::NONE)
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index f7fee1a9b21b..8d98e21b56f1 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -15,9 +15,6 @@
 #include <vcl/syschild.hxx>
 #include <vcl/sysdata.hxx>
 
-#include <vcl/bitmapaccess.hxx>
-#include <vcl/graph.hxx>
-
 #include <osl/thread.hxx>
 #include <sal/log.hxx>
 
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 89f2c28805c6..bc9b1c377d13 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -18,10 +18,8 @@
 #include <sal/log.hxx>
 #include <tools/stream.hxx>
 #include <config_folders.h>
-#include <vcl/bitmapaccess.hxx>
 #include <memory>
 #include <vcl/pngwrite.hxx>
-#include <vcl/graph.hxx>
 #include <vcl/svapp.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <com/sun/star/util/XFlushable.hpp>
@@ -29,12 +27,8 @@
 
 #include <stdarg.h>
 #include <vector>
-#include <deque>
 #include <unordered_map>
 
-#include <svdata.hxx>
-#include <salgdi.hxx>
-#include <salinst.hxx>
 #include <opengl/zone.hxx>
 #include <opengl/watchdog.hxx>
 #include <osl/conditn.hxx>
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 26df329d4146..7959b13f8f68 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -32,13 +32,11 @@
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/image.hxx>
-#include <vcl/window.hxx>
 #include <vcl/BitmapMonochromeFilter.hxx>
 
 #include <bmpfast.hxx>
 #include <salgdi.hxx>
 #include <salbmp.hxx>
-#include <image.h>
 
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <memory>
diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx
index 4a2750f274ff..416dc3be6595 100644
--- a/vcl/source/outdev/clipping.cxx
+++ b/vcl/source/outdev/clipping.cxx
@@ -23,18 +23,10 @@
 #include <tools/debug.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 #include <vcl/gdimtf.hxx>
-#include <vcl/print.hxx>
 #include <vcl/outdev.hxx>
 
 #include <salgdi.hxx>
-#include <salframe.hxx>
-#include <salvd.hxx>
-#include <salprn.hxx>
-#include <window.h>
-
-#include <numeric>
 
 void OutputDevice::SaveBackground(VirtualDevice& rSaveDevice,
                                   const Point& rPos, const Size& rSize, const Size& rBackgroundSize) const
diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx
index 8b83ea37ef58..d25d69ad1918 100644
--- a/vcl/source/outdev/curvedshapes.cxx
+++ b/vcl/source/outdev/curvedshapes.cxx
@@ -23,7 +23,6 @@
 #include <vcl/metaact.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
 #include <salgdi.hxx>
 
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 5fba38ad5c25..33ff9e648213 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -19,8 +19,8 @@
 
 #include <cassert>
 
+#include <osl/diagnose.h>
 #include <tools/line.hxx>
-#include <tools/stream.hxx>
 #include <tools/helpers.hxx>
 
 #include <vcl/hatch.hxx>
@@ -28,9 +28,8 @@
 #include <vcl/settings.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
-#include "../gdi/pdfwriter_impl.hxx"
+#include <salgdi.hxx>
 
 #include <memory>
 
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index ef7cb30ef6ba..a9bdffb7b8e5 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -25,12 +25,9 @@
 #include <vcl/metaact.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
 #include <salgdi.hxx>
 
-#include <outdata.hxx>
-
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/polygon/b2dpolygontools.hxx>
 #include <basegfx/polygon/b2dpolypolygontools.hxx>
diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx
index e8d696dd412a..209389cfbb56 100644
--- a/vcl/source/outdev/mask.cxx
+++ b/vcl/source/outdev/mask.cxx
@@ -23,11 +23,9 @@
 #include <vcl/metaact.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
 #include <salgdi.hxx>
 #include <salbmp.hxx>
-#include <outdata.hxx>
 
 void OutputDevice::DrawMask( const Point& rDestPt,
                              const Bitmap& rBitmap, const Color& rMaskColor )
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx
index 00218344ff7d..7e3235d48b97 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -23,7 +23,6 @@
 #include <vcl/virdev.hxx>
 #include <vcl/window.hxx>
 #include <sal/log.hxx>
-#include <osl/diagnose.h>
 
 #include <vcl/salnativewidgets.hxx>
 #include <vcl/pdfextoutdevdata.hxx>
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 803fd6746db9..6a6be6958a25 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -27,13 +27,12 @@
 #include <vcl/virdev.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/toolkit/unowrap.hxx>
+#include <vcl/svapp.hxx>
 #include <vcl/sysdata.hxx>
 
 #include <salgdi.hxx>
-#include <svdata.hxx>
 #include <window.h>
 #include <outdev.h>
-#include <PhysicalFontCollection.hxx>
 
 #ifdef DISABLE_DYNLOADING
 // Linking all needed LO code into one .so/executable, these already
diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx
index ecde4564f4ac..0a80a8f1ef92 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -19,17 +19,11 @@
 
 #include <cassert>
 
-#include <sal/types.h>
-#include <sal/log.hxx>
-
-#include <memory>
 #include <vcl/gdimtf.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
-#include <outdata.hxx>
 #include <salgdi.hxx>
 
 Color OutputDevice::GetPixel(const Point& rPoint) const
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index aacbe00df924..9b0cb3819cc7 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -22,15 +22,12 @@
 #include <sal/types.h>
 
 #include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
 #include <memory>
 #include <tools/poly.hxx>
 #include <vcl/gdimtf.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
 #include <salgdi.hxx>
 
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index a1b63fe494dd..f070ebe690c2 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -22,14 +22,11 @@
 #include <sal/types.h>
 
 #include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
 #include <basegfx/polygon/b2dlinegeometry.hxx>
 #include <vcl/gdimtf.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/outdev.hxx>
-#include <vcl/settings.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
 #include <salgdi.hxx>
 
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 67343278a1be..ecbeb12fbfee 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -26,7 +26,6 @@
 #include <vcl/metaact.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
 #include <salgdi.hxx>
 
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 962c5c71297b..afa7d8d4a501 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -34,7 +34,6 @@
 #include <vcl/metric.hxx>
 #include <vcl/textrectinfo.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/bitmapaccess.hxx>
 #include <vcl/sysdata.hxx>
 #include <vcl/unohelp.hxx>
 #include <vcl/controllayout.hxx>
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 4290044edeb1..571855dde2b5 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -25,18 +25,14 @@
 #include <vcl/outdev.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
 #include <tools/helpers.hxx>
 
 #include <salgdi.hxx>
-#include <impfont.hxx>
-#include <outdata.hxx>
 #include <impglyphitem.hxx>
 
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <basegfx/polygon/WaveLine.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
 
 #define UNDERLINE_LAST      LINESTYLE_BOLDWAVE
 #define STRIKEOUT_LAST      STRIKEOUT_X
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 34c76e6d7878..78ea40bbd683 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -22,7 +22,6 @@
 #include <sal/types.h>
 #include <tools/helpers.hxx>
 
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <memory>
 
 #include <vcl/bitmapaccess.hxx>
@@ -31,7 +30,6 @@
 #include <vcl/outdev.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
 
 #include <outdata.hxx>
 #include <salgdi.hxx>
diff --git a/vcl/source/outdev/vclreferencebase.cxx b/vcl/source/outdev/vclreferencebase.cxx
index 6866931ebe77..62dd0e67f1bc 100644
--- a/vcl/source/outdev/vclreferencebase.cxx
+++ b/vcl/source/outdev/vclreferencebase.cxx
@@ -18,9 +18,6 @@
  */
 
 #include <vcl/vclreferencebase.hxx>
-#include <svdata.hxx>
-#include <window.h>
-#include <outdev.h>
 
 VclReferenceBase::VclReferenceBase() :
     mnRefCnt(1), // cf. VclPtrInstance and README.lifecycle
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index d2a5f1003940..8a64137ed407 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -23,9 +23,6 @@
 #include <vcl/metaact.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/window.hxx>
-
-#include <wall2.hxx>
 
 Color OutputDevice::GetBackgroundColor() const
 {
diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx
index ccf5732260ed..47c4760560cd 100644
--- a/vcl/source/salmain/salmain.cxx
+++ b/vcl/source/salmain/salmain.cxx
@@ -19,16 +19,12 @@
 
 #include <sal/config.h>
 
-#include <cstdlib>
-
 #include <sal/main.h>
 #include <tools/extendapplicationenvironment.hxx>
 #include <vcl/glxtestprocess.hxx>
 #include <vcl/vclmain.hxx>
 #include <vcl/svmain.hxx>
 
-#include <salinst.hxx>
-
 SAL_IMPLEMENT_MAIN() {
 #if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined LIBO_HEADLESS && !defined HAIKU
     fire_glxtest_process();
diff --git a/vcl/source/toolkit/morebtn.cxx b/vcl/source/toolkit/morebtn.cxx
index 42923e1104a2..61fc3ff05f26 100644
--- a/vcl/source/toolkit/morebtn.cxx
+++ b/vcl/source/toolkit/morebtn.cxx
@@ -19,8 +19,6 @@
 
 #include <vcl/toolkit/morebtn.hxx>
 
-#include <vector>
-
 struct ImplMoreButtonData
 {
     OUString                             maMoreText;
diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx
index 9777fc55722e..65df0dfaad5d 100644
--- a/vcl/source/treelist/headbar.cxx
+++ b/vcl/source/treelist/headbar.cxx
@@ -29,7 +29,6 @@
 #include <vcl/event.hxx>
 #include <vcl/ptrstyle.hxx>
 
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <com/sun/star/accessibility/XAccessible.hpp>
 
 class ImplHeadItem
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index 1e0a2a94f689..4220db35c054 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -20,9 +20,9 @@
 
 #include <tools/urlobj.hxx>
 #include <tools/fract.hxx>
+#include <vcl/outdev.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/mapmod.hxx>
-#include <vcl/window.hxx>
 #include <o3tl/numeric.hxx>
 #include <svl/urihelper.hxx>
 #include <vcl/imap.hxx>
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index 80df5e6a8412..382a76c04822 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -21,10 +21,9 @@
 #include <comphelper/string.hxx>
 #include <string.h>
 #include <rtl/strbuf.hxx>
+#include <vcl/outdev.hxx>
 #include <vcl/svapp.hxx>
 #include <tools/urlobj.hxx>
-#include <vcl/wrkwin.hxx>
-#include <sot/formats.hxx>
 
 #include <svl/urihelper.hxx>
 #include <vcl/imap.hxx>
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 41bc706bab17..2e24f0f34d14 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -30,7 +30,6 @@
 #include <vcl/treelistbox.hxx>
 #include <vcl/svlbitm.hxx>
 #include <vcl/svimpbox.hxx>
-#include <rtl/instance.hxx>
 #include <tools/wintypes.hxx>
 #include <bitmaps.hlst>
 #include <comphelper/processfactory.hxx>
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 1c225694bb3d..204ccc1c3143 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -23,10 +23,8 @@
 #include <vcl/headbar.hxx>
 #include <vcl/svlbitm.hxx>
 #include <vcl/treelistentry.hxx>
-#include <vcl/builderfactory.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
 #include <strings.hrc>
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 9bb5456d7be2..f91f0aff0699 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -51,7 +51,6 @@
 #include <com/sun/star/datatransfer/XMimeContentType.hpp>
 #include <com/sun/star/datatransfer/XTransferable2.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
 
 #include <svl/urlbmk.hxx>
 #include <vcl/inetimg.hxx>
diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx
index 9160ba416e02..f1ff1daaa7d7 100644
--- a/vcl/source/treelist/transfer2.cxx
+++ b/vcl/source/treelist/transfer2.cxx
@@ -21,13 +21,8 @@
 
 #include <osl/mutex.hxx>
 #include <sot/exchange.hxx>
-#include <sot/storage.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/gdimtf.hxx>
-#include <vcl/graph.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/window.hxx>
-#include <comphelper/fileformat.h>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
 #include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp>
@@ -35,8 +30,6 @@
 #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
 #include <com/sun/star/uno/DeploymentException.hpp>
 #include <svl/urlbmk.hxx>
-#include <vcl/inetimg.hxx>
-#include <vcl/imap.hxx>
 #include <vcl/transfer.hxx>
 
 
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index afb62de37ae8..ee2574c5e328 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -28,7 +28,6 @@
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <vcl/svapp.hxx>
 #include <vcl/accel.hxx>
-#include <vcl/i18nhelp.hxx>
 #include <vcl/builderfactory.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/commandevent.hxx>
diff --git a/vcl/source/treelist/treelistentry.cxx b/vcl/source/treelist/treelistentry.cxx
index 52549a15cee4..8d397d228a9b 100644
--- a/vcl/source/treelist/treelistentry.cxx
+++ b/vcl/source/treelist/treelistentry.cxx
@@ -19,13 +19,10 @@
 
 #include <memory>
 #include <vcl/treelistentry.hxx>
-#include <vcl/treelist.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <tools/debug.hxx>
 
-#include <limits>
-
 void SvTreeListEntry::ClearChildren()
 {
     m_Children.clear();
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 59510d6c03c8..4cf20f316c21 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -20,7 +20,6 @@
 #include <vcl/edit.hxx>
 #include <vcl/vclmedit.hxx>
 #include <vcl/uitest/logger.hxx>
-#include <vcl/uitest/eventdescription.hxx>
 
 #include <comphelper/string.hxx>
 
diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx
index 5eaef4db584a..3a0b3bc7bac3 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -10,13 +10,11 @@
 #include <memory>
 #include "uiobject_uno.hxx"
 #include <utility>
+#include <cppuhelper/supportsservice.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/idle.hxx>
-#include <vcl/scheduler.hxx>
 
 #include <set>
-#include <chrono>
-#include <thread>
 
 UIObjectUnoObj::UIObjectUnoObj(std::unique_ptr<UIObject> pObj):
     UIObjectBase(m_aMutex),
diff --git a/vcl/source/uitest/uno/uiobject_uno.hxx b/vcl/source/uitest/uno/uiobject_uno.hxx
index 9ce3f135aa14..2f98ab7c04a6 100644
--- a/vcl/source/uitest/uno/uiobject_uno.hxx
+++ b/vcl/source/uitest/uno/uiobject_uno.hxx
@@ -12,11 +12,8 @@
 
 #include <cppuhelper/compbase.hxx>
 #include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/ui/test/XUIObject.hpp>
-#include <com/sun/star/beans/PropertyValues.hpp>
 
 #include <memory>
 #include <condition_variable>
diff --git a/vcl/source/window/aboutdialog.cxx b/vcl/source/window/aboutdialog.cxx
index 483aec85017e..4c8fb048bb9f 100644
--- a/vcl/source/window/aboutdialog.cxx
+++ b/vcl/source/window/aboutdialog.cxx
@@ -7,39 +7,11 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <config_features.h>
-#include <osl/process.h>
-#include <sal/log.hxx>
-#include <osl/diagnose.h>
-#include <rtl/character.hxx>
 #include <vcl/layout.hxx>
-#include <vcl/weld.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <aboutdialog.hxx>
 
-#include <tools/stream.hxx>
-#include <rtl/bootstrap.hxx>
-#include <unotools/configmgr.hxx>
-#include <unotools/bootstrap.hxx>
-#include <com/sun/star/uno/Any.h>
-#include <vcl/graph.hxx>
-#include <vcl/graphicfilter.hxx>
-#include <i18nlangtag/languagetag.hxx>
-
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/system/SystemShellExecute.hpp>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/anytostring.hxx>
-#include <cppuhelper/exc_hlp.hxx>
-#include <cppuhelper/bootstrap.hxx>
-#include <basegfx/numeric/ftools.hxx>
-#include <com/sun/star/geometry/RealRectangle2D.hpp>
-
-#include <config_buildid.h>
-#include <rtl/ustrbuf.hxx>
-#include <vcl/bitmap.hxx>
-
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star;
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 8c9a7bb3c2d3..cb16145c6085 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <rtl/ustring.hxx>
 #include <osl/module.hxx>
 #include <vcl/abstdlg.hxx>
 #include <vcl/bitmapex.hxx>
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index efb0284fc283..1795d0496829 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -19,8 +19,7 @@
 
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
-#include <vcl/window.hxx>
-#include <vcl/svapp.hxx>
+#include <tools/solar.h>
 #include <accel.h>
 #include <vcl/accel.hxx>
 #include <map>
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index a2bced8fc047..b50c610645f4 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -17,78 +17,22 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <config_features.h>
-
-#include <i18nlangtag/mslangid.hxx>
-
-#include <tools/time.hxx>
-
-#include <unotools/fontcfg.hxx>
-#include <unotools/confignode.hxx>
-
 #include <vcl/layout.hxx>
-#include <vcl/salgtype.hxx>
-#include <vcl/event.hxx>
 #include <vcl/fixed.hxx>
-#include <vcl/help.hxx>
-#include <vcl/cursor.hxx>
-#include <vcl/svapp.hxx>
 #include <vcl/window.hxx>
-#include <vcl/syswin.hxx>
-#include <vcl/syschild.hxx>
-#include <vcl/dockwin.hxx>
 #include <vcl/menu.hxx>
 #include <vcl/wrkwin.hxx>
-#include <vcl/wall.hxx>
-#include <vcl/gradient.hxx>
-#include <vcl/button.hxx>
-#include <vcl/taskpanelist.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/toolkit/unowrap.hxx>
-#include <vcl/gdimtf.hxx>
-#include <vcl/pdfextoutdevdata.hxx>
 #include <vcl/popupmenuwindow.hxx>
-#include <vcl/lazydelete.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/settings.hxx>
-
-// declare system types in sysdata.hxx
-#include <vcl/sysdata.hxx>
-
-#include <salframe.hxx>
-#include <salobj.hxx>
-#include <salinst.hxx>
-#include <salgdi.hxx>
-#include <svdata.hxx>
-#include <fontinstance.hxx>
+
 #include <window.h>
-#include <toolbox.h>
-#include <outdev.h>
-#include <PhysicalFontCollection.hxx>
 #include <brdwin.hxx>
-#include <helpwin.hxx>
-#include <sallayout.hxx>
-#include <dndlistenercontainer.hxx>
-#include <dndeventdispatcher.hxx>
 
 #include <com/sun/star/accessibility/XAccessible.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
-#include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
-#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
-#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
-#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XServiceName.hpp>
-
-#include <sal/macros.h>
-#include <rtl/strbuf.hxx>
-#include <sal/log.hxx>
 
-#include <set>
-#include <typeinfo>
+#include <sal/log.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 70976df86988..fe5a34f942e3 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -28,13 +28,8 @@
 #include <vcl/syswin.hxx>
 #include <vcl/dockwin.hxx>
 #include <vcl/floatwin.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/gradient.hxx>
-#include <vcl/image.hxx>
-#include <vcl/virdev.hxx>
 #include <vcl/help.hxx>
 #include <vcl/edit.hxx>
-#include <vcl/metric.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/ptrstyle.hxx>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index b4678d20d77e..c114a660ca3e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -12,16 +12,13 @@
 #include <memory>
 #include <unordered_map>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
-#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
 
 #include <i18nutil/unicode.hxx>
 #include <osl/module.hxx>
-#include <osl/file.hxx>
 #include <sal/log.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <unotools/resmgr.hxx>
 #include <vcl/builder.hxx>
-#include <vcl/builderfactory.hxx>
 #include <vcl/button.hxx>
 #include <vcl/calendar.hxx>
 #include <vcl/dialog.hxx>
@@ -63,7 +60,6 @@
 #include <strings.hrc>
 #include <aboutdialog.hxx>
 #include <treeglue.hxx>
-#include <tools/svlibrary.h>
 #include <tools/diagnose_ex.h>
 
 #ifdef DISABLE_DYNLOADING
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 3b1b355b33d4..6889ee7c63e2 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -20,7 +20,6 @@
 #include <vcl/window.hxx>
 #include <vcl/virdev.hxx>
 
-#include <sal/types.h>
 #include <tools/debug.hxx>
 
 #include <salobj.hxx>
diff --git a/vcl/source/window/debug.cxx b/vcl/source/window/debug.cxx
index ee056719d1f2..4b3d41137970 100644
--- a/vcl/source/window/debug.cxx
+++ b/vcl/source/window/debug.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <vcl/window.hxx>
-#include <vcl/outdev.hxx>
 #include <tools/debug.hxx>
 
 #include <window.h>
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 767d1e2b8392..5a5c164abc30 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -8,10 +8,8 @@
  */
 
 #include <comphelper/random.hxx>
-#include <rtl/math.hxx>
 #include <rtl/string.hxx>
 #include <sal/log.hxx>
-#include <tools/time.hxx>
 #include <vcl/keycodes.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/debugevent.hxx>
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index b6e462ba72ea..1c6dbda3375b 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -25,16 +25,12 @@
 #include <postmac.h>
 #endif
 
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/util/thePathSettings.hpp>
 #include <com/sun/star/frame/theGlobalEventBroadcaster.hpp>
 #include <comphelper/lok.hxx>
 #include <comphelper/scopeguard.hxx>
 #include <comphelper/processfactory.hxx>
 #include <officecfg/Office/Common.hxx>
-#include <osl/file.hxx>
-
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
 
 #include <svdata.hxx>
 #include <window.h>
@@ -54,14 +50,9 @@
 #include <vcl/button.hxx>
 #include <vcl/mnemonic.hxx>
 #include <vcl/dialog.hxx>
-#include <vcl/tabctrl.hxx>
-#include <vcl/tabpage.hxx>
-#include <vcl/decoview.hxx>
-#include <vcl/toolkit/unowrap.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/uitest/uiobject.hxx>
 #include <vcl/uitest/logger.hxx>
-#include <vcl/virdev.hxx>
 #include <vcl/IDialogRenderable.hxx>
 #include <messagedialog.hxx>
 #include <salframe.hxx>
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 6721455ff94c..f63cb6782b39 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -19,6 +19,7 @@
 
 
 #include <svdata.hxx>
+#include <window.h>
 
 #include "dlgctrl.hxx"
 #include <vcl/event.hxx>
@@ -29,7 +30,6 @@
 #include <vcl/tabctrl.hxx>
 #include <vcl/button.hxx>
 #include <vcl/settings.hxx>
-#include <vcl/unohelp.hxx>
 #include <sal/log.hxx>
 #include <i18nlangtag/languagetag.hxx>
 
diff --git a/vcl/source/window/dlgctrl.hxx b/vcl/source/window/dlgctrl.hxx
index c4ecb0ce47b2..d14f8e32672f 100644
--- a/vcl/source/window/dlgctrl.hxx
+++ b/vcl/source/window/dlgctrl.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_VCL_SOURCE_WINDOW_DLGCTRL_HXX
 #define INCLUDED_VCL_SOURCE_WINDOW_DLGCTRL_HXX
 
-#include <window.h>
+#include <vcl/window.hxx>
 
 vcl::Window* ImplGetChildWindow( vcl::Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable );
 
diff --git a/vcl/source/window/dndeventdispatcher.cxx b/vcl/source/window/dndeventdispatcher.cxx
index 158019d3ab32..9af6ab6e76c3 100644
--- a/vcl/source/window/dndeventdispatcher.cxx
+++ b/vcl/source/window/dndeventdispatcher.cxx
@@ -19,8 +19,6 @@
 
 #include <dndeventdispatcher.hxx>
 #include <dndlistenercontainer.hxx>
-#include <window.h>
-#include <svdata.hxx>
 #include <sal/log.hxx>
 
 #include <osl/mutex.hxx>
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 257b863bba39..45708e8d709f 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -23,7 +23,6 @@
 
 #include <brdwin.hxx>
 #include <svdata.hxx>
-#include <salframe.hxx>
 #include <window.h>
 
 #include <vcl/event.hxx>
@@ -32,9 +31,6 @@
 #include <vcl/toolbox.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/timer.hxx>
-#include <vcl/idle.hxx>
-#include <vcl/lineinfo.hxx>
-#include <vcl/toolkit/unowrap.hxx>
 #include <vcl/settings.hxx>
 
 #define DOCKWIN_FLOATSTYLES         (WB_SIZEABLE | WB_MOVEABLE | WB_CLOSEABLE | WB_STANDALONE | WB_ROLLABLE )
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index baa7da9c7a34..6ac2562d2f41 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -27,13 +27,11 @@
 #include <vcl/svapp.hxx>
 #include <vcl/timer.hxx>
 #include <vcl/idle.hxx>
-#include <vcl/toolkit/unowrap.hxx>
 #include <vcl/settings.hxx>
 
 #include <svdata.hxx>
 #include <window.h>
 #include <brdwin.hxx>
-#include <salframe.hxx>
 
 #define DOCKWIN_FLOATSTYLES         (WB_SIZEABLE | WB_MOVEABLE | WB_CLOSEABLE | WB_STANDALONE | WB_ROLLABLE )
 
diff --git a/vcl/source/window/errinf.cxx b/vcl/source/window/errinf.cxx
index bdc5aa16c6c6..f1e9109f5afb 100644
--- a/vcl/source/window/errinf.cxx
+++ b/vcl/source/window/errinf.cxx
@@ -18,15 +18,14 @@
  */
 
 #include <osl/diagnose.h>
-#include <rtl/strbuf.hxx>
+#include <rtl/instance.hxx>
 #include <sal/log.hxx>
 
 #include <tools/debug.hxx>
 #include <vcl/errinf.hxx>
-#include <vcl/window.hxx>
 
+#include <algorithm>
 #include <vector>
-#include <limits.h>
 
 class ErrorHandler;
 class TheErrorRegistry: public rtl::Static<ErrorRegistry, TheErrorRegistry> {};
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 4cba7187f86f..e6d52a240e5e 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -28,10 +28,6 @@
 #include <svdata.hxx>
 #include <salframe.hxx>
 #include <config_features.h>
-#include <com/sun/star/awt/MouseEvent.hpp>
-#include <com/sun/star/awt/KeyModifier.hpp>
-#include <com/sun/star/awt/MouseButton.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
 #include <comphelper/scopeguard.hxx>
 
 namespace vcl {
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index 78a4ce0b31a1..934754aa4c49 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -18,11 +18,9 @@
  */
 
 #include <vcl/wrkwin.hxx>
-#include <vcl/bitmap.hxx>
 #include <vcl/introwin.hxx>
 
 #include <svdata.hxx>
-#include <salframe.hxx>
 
 void IntroWindow::ImplInitIntroWindowData()
 {
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index 8aeb7b07cb74..451e859f6aa6 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -20,7 +20,6 @@
 #include <sal/config.h>
 
 #include <accel.h>
-#include <salinst.hxx>
 #include <salframe.hxx>
 #include <svdata.hxx>
 
diff --git a/vcl/source/window/keyevent.cxx b/vcl/source/window/keyevent.cxx
index e4c19c88c8d8..eca00d411463 100644
--- a/vcl/source/window/keyevent.cxx
+++ b/vcl/source/window/keyevent.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <com/sun/star/awt/KeyEvent.hpp>
-#include <com/sun/star/awt/KeyModifier.hpp>
 #include <vcl/event.hxx>
 
 KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx
index 9a17eb4874a2..376d0d08af6f 100644
--- a/vcl/source/window/legacyaccessibility.cxx
+++ b/vcl/source/window/legacyaccessibility.cxx
@@ -18,20 +18,9 @@
  */
 
 
-#include <svdata.hxx>
+#include <window.h>
 
 #include "dlgctrl.hxx"
-#include <vcl/event.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/layout.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/tabpage.hxx>
-#include <vcl/tabctrl.hxx>
-#include <vcl/button.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/unohelp.hxx>
-
-#include <com/sun/star/i18n/XCharacterClassification.hpp>
 
 using namespace ::com::sun::star;
 
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index e25d80ba1be9..71465b16bf26 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <tools/diagnose_ex.h>
-#include <tools/stream.hxx>
 #include <sal/log.hxx>
 
 #include <comphelper/lok.hxx>
@@ -28,22 +27,12 @@
 #include <vcl/event.hxx>
 #include <vcl/help.hxx>
 #include <vcl/floatwin.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/timer.hxx>
 #include <vcl/decoview.hxx>
-#include <vcl/bitmap.hxx>
 #include <vcl/menu.hxx>
-#include <vcl/button.hxx>
-#include <vcl/gradient.hxx>
-#include <vcl/i18nhelp.hxx>
 #include <vcl/taskpanelist.hxx>
 #include <vcl/controllayout.hxx>
-#include <vcl/toolbox.hxx>
-#include <vcl/dockingarea.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/commandinfoprovider.hxx>
-#include <vcl/IDialogRenderable.hxx>
-#include <impglyphitem.hxx>
 
 #include <salinst.hxx>
 #include <svdata.hxx>
@@ -59,15 +48,10 @@
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/accessibility/XAccessible.hpp>
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <vcl/toolkit/unowrap.hxx>
 
-#include <vcl/unohelp.hxx>
 #include <vcl/configsettings.hxx>
 
-#include <vcl/lazydelete.hxx>
-#include <vcl/vcllayout.hxx>
-
 #include <map>
 #include <string_view>
 #include <vector>
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index ba9025a3367c..e9d93765bb9a 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -24,7 +24,6 @@
 #include <vcl/dockingarea.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/taskpanelist.hxx>
-#include <vcl/virdev.hxx>
 #include <sal/log.hxx>
 
 #include <salframe.hxx>
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index bc1af67bc991..f009c24dfc87 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -23,12 +23,10 @@
 #include "bufferdevice.hxx"
 
 #include <sal/log.hxx>
-#include <salmenu.hxx>
 #include <salframe.hxx>
 #include <svdata.hxx>
 #include <vcl/decoview.hxx>
 #include <vcl/settings.hxx>
-#include <vcl/virdev.hxx>
 #include <window.h>
 
 MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, vcl::Window* pParent, WinBits nStyle ) :
diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx
index e05672510b7a..7e55f0c3ed32 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -25,8 +25,8 @@
 #include <svdata.hxx>
 #include <vcl/i18nhelp.hxx>
 #include <vcl/settings.hxx>
+#include <vcl/vcllayout.hxx>
 #include <vcl/window.hxx>
-#include <impglyphitem.hxx>
 
 using namespace css;
 using namespace vcl;
diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx
index a41dc9eaef2c..5f8ad813b3cf 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -18,13 +18,11 @@
  */
 
 #include <vcl/vclenum.hxx>
+#include <vcl/glyphitem.hxx>
 #include <vcl/image.hxx>
 #include <vcl/keycod.hxx>
 #include <vcl/menu.hxx>
-#include <vcl/vcllayout.hxx>
-#include <fontinstance.hxx>
-
-#include <com/sun/star/i18n/XCharacterClassification.hpp>
+#include <salmenu.hxx>
 
 #include <memory>
 #include <vector>
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index 92ba8c7ab171..2387d485fb13 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -20,7 +20,6 @@
 #include "menuwindow.hxx"
 #include "menuitemlist.hxx"
 
-#include <salmenu.hxx>
 #include <vcl/help.hxx>
 #include <vcl/menu.hxx>
 #include <vcl/settings.hxx>
diff --git a/vcl/source/window/menuwindow.hxx b/vcl/source/window/menuwindow.hxx
index f60d8f85e454..dcd81dea2e18 100644
--- a/vcl/source/window/menuwindow.hxx
+++ b/vcl/source/window/menuwindow.hxx
@@ -21,8 +21,6 @@
 #define INCLUDED_VCL_SOURCE_WINDOW_MENUWINDOW_HXX
 
 #include <sal/types.h>
-#include <tools/link.hxx>
-#include <tools/solar.h>
 #include <vcl/event.hxx>
 
 class HelpEvent;
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 06c8d6949c94..1190c6ba0f95 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -26,9 +26,7 @@
 
 #include <vcl/ITiledRenderable.hxx>
 #include <vcl/svapp.hxx>
-#include <vcl/salgtype.hxx>
 #include <vcl/window.hxx>
-#include <vcl/floatwin.hxx>
 #include <vcl/cursor.hxx>
 #include <vcl/sysdata.hxx>
 #include <vcl/event.hxx>
@@ -36,7 +34,6 @@
 #include <sal/types.h>
 
 #include <window.h>
-#include <outdev.h>
 #include <svdata.hxx>
 #include <salobj.hxx>
 #include <salgdi.hxx>
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 457c71be82dd..02a431239f56 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -20,18 +20,8 @@
 #include <strings.hrc>
 #include <bitmaps.hlst>
 #include <svdata.hxx>
-#include <brdwin.hxx>
-#include <window.h>
 
-#include <vcl/textrectinfo.hxx>
-#include <vcl/metric.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/fixed.hxx>
 #include <vcl/msgbox.hxx>
-#include <vcl/button.hxx>
-#include <vcl/mnemonic.hxx>
-#include <vcl/settings.hxx>
 
 static void ImplInitMsgBoxImageList()
 {
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 2d83e3074b63..1804004137c3 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -20,10 +20,10 @@
 #include <config_features.h>
 #include <vcl/gdimtf.hxx>
 #include <vcl/window.hxx>
-#include <vcl/dialog.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/cursor.hxx>
 #include <vcl/settings.hxx>
+#include <vcl/syswin.hxx>
 
 #include <sal/types.h>
 #include <sal/log.hxx>
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index f2780f2eda5e..a9ddf591a768 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -26,30 +26,22 @@
 #include <vcl/dialog.hxx>
 #include <vcl/button.hxx>
 #include <vcl/wall.hxx>
-#include <vcl/status.hxx>
 #include <vcl/decoview.hxx>
 #include <vcl/configsettings.hxx>
 #include <vcl/help.hxx>
 #include <vcl/layout.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/tabpage.hxx>
-#include <vcl/unohelp.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/builderfactory.hxx>
 #include <vcl/lstbox.hxx>
-#include <jobset.h>
 
 #include <unotools/localedatawrapper.hxx>
 
-#include <rtl/strbuf.hxx>
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
 
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/awt/Size.hpp>
 
 using namespace vcl;
 using namespace com::sun::star;
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 85e9d20229ab..27d96f56bfaf 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -22,7 +22,6 @@
 #include <o3tl/float_int_conversion.hxx>
 #include <tools/time.hxx>
 
-#include <strings.hrc>
 #include <bitmaps.hlst>
 #include <svdata.hxx>
 #include <scrwnd.hxx>
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index 9f5633a7d658..d7fee9b1b755 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -23,19 +23,15 @@
 #include <vcl/event.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/window.hxx>
-#include <vcl/virdev.hxx>
 #include <vcl/settings.hxx>
 
-#include <unotools/fontcfg.hxx>
 #include <unotools/configmgr.hxx>
 #include <unotools/confignode.hxx>
 
 #include <comphelper/processfactory.hxx>
 
 #include <salframe.hxx>
-#include <svdata.hxx>
 #include <brdwin.hxx>
-#include <PhysicalFontCollection.hxx>
 
 #include <window.h>
 
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 4396b6296729..6a12d0cada6c 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -24,7 +24,6 @@
 #include <vcl/svapp.hxx>
 #include <vcl/syswin.hxx>
 #include <vcl/taskpanelist.hxx>
-#include <vcl/gradient.hxx>
 #include <vcl/lineinfo.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/ptrstyle.hxx>
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 9549497afbc9..8e234964ee27 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -19,21 +19,15 @@
 
 #include <string.h>
 
-#include <tools/debug.hxx>
 #include <sal/log.hxx>
 
 #include <vcl/event.hxx>
 #include <vcl/wall.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/decoview.hxx>
-#include <vcl/image.hxx>
 #include <vcl/help.hxx>
 #include <vcl/splitwin.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/ptrstyle.hxx>
 
-#include <vcl/vclenum.hxx>
-
 #include <svdata.hxx>
 #include <strings.hrc>
 
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 55374fd45902..ef7feeab2ee0 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -17,26 +17,18 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <vcl/syswin.hxx>
 #include <vcl/window.hxx>
 #include <vcl/taskpanelist.hxx>
 #include <sal/log.hxx>
 
-// declare system types in sysdata.hxx
-#include <vcl/sysdata.hxx>
-
 #include <salframe.hxx>
-#include <salobj.hxx>
-#include <salgdi.hxx>
 #include <svdata.hxx>
 #include <window.h>
 #include <brdwin.hxx>
-#include <helpwin.hxx>
 
 #include <com/sun/star/awt/XTopWindow.hpp>
 
-#include <set>
-#include <typeinfo>
-
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::datatransfer::clipboard;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c34a36ea1357..6c65d3209e32 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -23,6 +23,7 @@
 #include <vcl/decoview.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/help.hxx>
+#include <vcl/vcllayout.hxx>
 #include <vcl/status.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/settings.hxx>
@@ -33,8 +34,6 @@
 #include <svdata.hxx>
 #include <window.h>
 
-#include <sallayout.hxx>
-
 #define STATUSBAR_OFFSET_X      STATUSBAR_OFFSET
 #define STATUSBAR_OFFSET_Y      2
 #define STATUSBAR_OFFSET_TEXTY  3
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index d98eabd3ff93..2ba10a2bcc75 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -17,11 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <config_java.h>
-
-#include <rtl/process.h>
-#include <rtl/ref.hxx>
-
 #include <vcl/window.hxx>
 #include <vcl/sysdata.hxx>
 #include <vcl/svapp.hxx>
@@ -29,17 +24,9 @@
 
 #include <window.h>
 #include <salinst.hxx>
-#include <salframe.hxx>
 #include <salobj.hxx>
 #include <svdata.hxx>
 
-#if HAVE_FEATURE_JAVA
-#include <jni.h>
-#include <jvmaccess/virtualmachine.hxx>
-#include <com/sun/star/java/JavaVirtualMachine.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-
 using namespace ::com::sun::star;
 
 static void ImplSysChildProc( SystemChildWindow* pInst, SalObjEvent nEvent )
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 76d6a7c30b05..aa0964524e35 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -21,9 +21,6 @@
 #include <sal/config.h>
 #include <sal/log.hxx>
 
-#include <cstdlib>
-
-
 #include <vcl/accel.hxx>
 #include <vcl/layout.hxx>
 #include <vcl/settings.hxx>
@@ -32,10 +29,8 @@
 #include <vcl/event.hxx>
 #include <vcl/syswin.hxx>
 #include <vcl/taskpanelist.hxx>
-#include <vcl/toolkit/unowrap.hxx>
 #include <vcl/tabctrl.hxx>
 #include <vcl/tabpage.hxx>
-#include <vcl/mnemonic.hxx>
 
 #include <rtl/strbuf.hxx>
 
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index ad3c12e0578d..825aec67e617 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -20,16 +20,10 @@
 #include <vcl/accel.hxx>
 #include <vcl/event.hxx>
 #include <vcl/layout.hxx>
-#include <vcl/svapp.hxx>
 #include <vcl/tabpage.hxx>
-#include <vcl/tabctrl.hxx>
 #include <vcl/bitmapex.hxx>
 #include <vcl/settings.hxx>
 
-#include <svdata.hxx>
-
-#include <com/sun/star/accessibility/XAccessible.hpp>
-
 void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle )
 {
     if ( !(nStyle & WB_NODIALOGCONTROL) )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 6a4d1c2c3aaa..dc95384128cf 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -24,7 +24,6 @@
 #include <vcl/accel.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/help.hxx>
-#include <vcl/bitmap.hxx>
 #include <vcl/mnemonic.hxx>
 #include <vcl/gradient.hxx>
 #include <vcl/layout.hxx>
@@ -41,15 +40,12 @@
 #include <svdata.hxx>
 #include <window.h>
 #include <toolbox.h>
-#include <salframe.hxx>
 #include <spin.hxx>
 #if defined(_WIN32)
 #include <svsys.h>
 #endif
 
 #include <cstdlib>
-#include <limits>
-#include <string.h>
 #include <vector>
 #include <math.h>
 
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index f2844e59e0b0..ba92d20db57a 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -24,7 +24,6 @@
 
 #include <vcl/svapp.hxx>
 #include <vcl/idle.hxx>
-#include <vcl/help.hxx>
 #include <vcl/bitmap.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/mnemonic.hxx>
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 02e10941d61d..e9cff73fbe58 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <config_features.h>
 #include <rtl/strbuf.hxx>
 #include <sal/log.hxx>
 
@@ -30,16 +29,11 @@
 #include <vcl/vclevent.hxx>
 #include <vcl/window.hxx>
 #include <vcl/syswin.hxx>
-#include <vcl/syschild.hxx>
 #include <vcl/dockwin.hxx>
 #include <vcl/wall.hxx>
 #include <vcl/fixed.hxx>
-#include <vcl/gradient.hxx>
-#include <vcl/button.hxx>
 #include <vcl/taskpanelist.hxx>
-#include <vcl/dialog.hxx>
 #include <vcl/toolkit/unowrap.hxx>
-#include <vcl/gdimtf.hxx>
 #include <vcl/lazydelete.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/settings.hxx>
@@ -49,7 +43,6 @@
 #include <vcl/transfer.hxx>
 
 #include <vcl/uitest/uiobject.hxx>
-#include <vcl/uitest/uitest.hxx>
 
 #include <salframe.hxx>
 #include <salobj.hxx>
@@ -61,21 +54,19 @@
 #include <outdev.h>
 #include <brdwin.hxx>
 #include <helpwin.hxx>
-#include <dndlistenercontainer.hxx>
 
-#include <com/sun/star/awt/XDisplayConnection.hpp>
 #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
-#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
+#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
+#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
 #include <com/sun/star/rendering/CanvasFactory.hpp>
 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
 #include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 #include <unotools/configmgr.hxx>
-#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
 #include <tools/debug.hxx>
 
 #include <cassert>
-#include <set>
 #include <typeinfo>
 
 #ifdef _WIN32 // see #140456#
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 3a6e4709bfd4..3869ee771a7d 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -20,17 +20,13 @@
 #include <limits.h>
 
 #include <o3tl/float_int_conversion.hxx>
-#include <tools/poly.hxx>
 #include <sal/log.hxx>
 
-#include <vcl/bitmap.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/event.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/layout.hxx>
 #include <vcl/timer.hxx>
-#include <vcl/metric.hxx>
-#include <vcl/virdev.hxx>
 #include <vcl/window.hxx>
 #include <vcl/scrbar.hxx>
 #include <vcl/dockwin.hxx>
@@ -38,10 +34,7 @@
 #include <vcl/builder.hxx>
 
 #include <window.h>
-#include <fontinstance.hxx>
-#include <outdev.h>
 #include <svdata.hxx>
-#include <salbmp.hxx>
 #include <salgdi.hxx>
 #include <salframe.hxx>
 #include <scrwnd.hxx>
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index c096b0340565..089b24c0fec7 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -24,8 +24,6 @@
 #include <unotools/localedatawrapper.hxx>
 
 #include <comphelper/lok.hxx>
-#include <vcl/i18nhelp.hxx>
-#include <vcl/unohelp.hxx>
 #include <vcl/timer.hxx>
 #include <vcl/event.hxx>
 #include <vcl/GestureEvent.hxx>
@@ -39,7 +37,6 @@
 #include <vcl/dockwin.hxx>
 #include <vcl/menu.hxx>
 #include <vcl/virdev.hxx>
-#include <vcl/lazydelete.hxx>
 #include <vcl/uitest/logger.hxx>
 #include <vcl/ptrstyle.hxx>
 
@@ -51,7 +48,6 @@
 #include <window.h>
 #include <helpwin.hxx>
 #include <brdwin.hxx>
-#include <salgdi.hxx>
 #include <dndlistenercontainer.hxx>
 
 #include <com/sun/star/datatransfer/dnd/XDragSource.hpp>


More information about the Libreoffice-commits mailing list