[Libreoffice-commits] core.git: sw/IwyuFilter_sw.yaml sw/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 8 10:04:39 UTC 2020


 sw/IwyuFilter_sw.yaml                               |  108 ++++++++++++++++++++
 sw/source/uibase/index/idxmrk.cxx                   |   19 ---
 sw/source/uibase/index/toxmgr.cxx                   |    2 
 sw/source/uibase/lingu/hhcwrp.cxx                   |    7 -
 sw/source/uibase/lingu/hyp.cxx                      |    6 -
 sw/source/uibase/lingu/olmenu.cxx                   |   21 ---
 sw/source/uibase/lingu/sdrhhcwrap.cxx               |   12 --
 sw/source/uibase/misc/glosdoc.cxx                   |    2 
 sw/source/uibase/misc/glshell.cxx                   |    5 
 sw/source/uibase/misc/numberingtypelistbox.cxx      |    4 
 sw/source/uibase/misc/redlndlg.cxx                  |    4 
 sw/source/uibase/misc/swruler.cxx                   |    3 
 sw/source/uibase/ribbar/concustomshape.cxx          |   10 -
 sw/source/uibase/ribbar/conform.cxx                 |    2 
 sw/source/uibase/ribbar/conpoly.cxx                 |    5 
 sw/source/uibase/ribbar/conrect.cxx                 |    3 
 sw/source/uibase/ribbar/drawbase.cxx                |    4 
 sw/source/uibase/ribbar/dselect.cxx                 |    1 
 sw/source/uibase/ribbar/inputwin.cxx                |    4 
 sw/source/uibase/ribbar/workctrl.cxx                |    8 -
 sw/source/uibase/shells/annotsh.cxx                 |   26 ----
 sw/source/uibase/shells/basesh.cxx                  |   23 ----
 sw/source/uibase/shells/beziersh.cxx                |    5 
 sw/source/uibase/shells/drawdlg.cxx                 |    9 -
 sw/source/uibase/shells/drawsh.cxx                  |   10 -
 sw/source/uibase/shells/drformsh.cxx                |    8 -
 sw/source/uibase/shells/drwbassh.cxx                |    9 -
 sw/source/uibase/shells/drwtxtex.cxx                |   19 ---
 sw/source/uibase/shells/drwtxtsh.cxx                |   10 -
 sw/source/uibase/shells/frmsh.cxx                   |   18 ---
 sw/source/uibase/shells/grfsh.cxx                   |   20 ---
 sw/source/uibase/shells/grfshex.cxx                 |   18 ---
 sw/source/uibase/shells/langhelper.cxx              |    5 
 sw/source/uibase/shells/listsh.cxx                  |   15 --
 sw/source/uibase/shells/mediash.cxx                 |   31 -----
 sw/source/uibase/shells/navsh.cxx                   |    7 -
 sw/source/uibase/shells/olesh.cxx                   |    7 -
 sw/source/uibase/shells/slotadd.cxx                 |   10 -
 sw/source/uibase/shells/tabsh.cxx                   |   10 -
 sw/source/uibase/shells/textdrw.cxx                 |    2 
 sw/source/uibase/shells/textfld.cxx                 |   24 ----
 sw/source/uibase/shells/textidx.cxx                 |    6 -
 sw/source/uibase/shells/textsh.cxx                  |   34 ------
 sw/source/uibase/shells/textsh1.cxx                 |   29 -----
 sw/source/uibase/shells/textsh2.cxx                 |   13 --
 sw/source/uibase/shells/txtattr.cxx                 |    6 -
 sw/source/uibase/shells/txtcrsr.cxx                 |    5 
 sw/source/uibase/shells/txtnum.cxx                  |    4 
 sw/source/uibase/sidebar/PageColumnControl.cxx      |    4 
 sw/source/uibase/sidebar/PageFooterPanel.cxx        |    8 -
 sw/source/uibase/sidebar/PageFormatPanel.cxx        |    5 
 sw/source/uibase/sidebar/PageHeaderPanel.cxx        |    8 -
 sw/source/uibase/sidebar/PageMarginControl.cxx      |    5 
 sw/source/uibase/sidebar/PageMarginPopup.cxx        |    1 
 sw/source/uibase/sidebar/PageOrientationControl.cxx |    2 
 sw/source/uibase/sidebar/PageSizeControl.cxx        |    2 
 sw/source/uibase/sidebar/PageStylesPanel.cxx        |    8 -
 sw/source/uibase/sidebar/StylePresetsPanel.cxx      |   13 --
 sw/source/uibase/sidebar/SwPanelFactory.cxx         |    2 
 sw/source/uibase/sidebar/TableEditPanel.cxx         |    1 
 sw/source/uibase/sidebar/ThemePanel.cxx             |   14 --
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx      |    4 
 sw/source/uibase/table/chartins.cxx                 |    9 -
 sw/source/uibase/table/swtablerep.cxx               |   30 -----
 sw/source/uibase/table/tablemgr.cxx                 |    7 -
 65 files changed, 122 insertions(+), 614 deletions(-)

New commits:
commit a01a5bd9bce5c7ac9c2954e9f35f57a5bbcff77a
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Sun Dec 29 23:40:36 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jan 8 11:03:57 2020 +0100

    tdf#42949 Fix IWYU warnings in sw/source/uibase/[i-t]*/*cxx
    
    Found with bin/find-unneeded-includes
    Only removal proposals are dealt with here.
    
    Change-Id: I53139566ff41c8ee748945b39cd70b66fed8dc97
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85973
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/IwyuFilter_sw.yaml b/sw/IwyuFilter_sw.yaml
index f20dd464f00c..a6c19e9d05c8 100644
--- a/sw/IwyuFilter_sw.yaml
+++ b/sw/IwyuFilter_sw.yaml
@@ -608,3 +608,111 @@ blacklist:
     sw/source/uibase/dochdl/swdtflvr.cxx:
     # OSL_BIGENDIAN is being checked
     - osl/endian.h
+    sw/source/uibase/shells/basesh.cxx:
+    # Actually used
+    - comphelper/scopeguard.hxx
+    sw/source/uibase/shells/slotadd.cxx:
+    # Needed for swslots.hxx
+    - config_options.h
+    - cmdid.h
+    - unomid.h
+    - svx/unomid.hxx
+    - svl/globalnameitem.hxx
+    - editeng/memberids.h
+    - svl/imageitm.hxx
+    - svl/rectitem.hxx
+    - sfx2/objitem.hxx
+    - sfx2/objsh.hxx
+    - svx/rulritem.hxx
+    - sfx2/zoomitem.hxx
+    - svx/viewlayoutitem.hxx
+    - svx/zoomslideritem.hxx
+    - svx/hlnkitem.hxx
+    - svx/SmartTagItem.hxx
+    - svl/ptitem.hxx
+    - svx/pageitem.hxx
+    - svl/srchitem.hxx
+    - sfx2/tplpitem.hxx
+    - sfx2/watermarkitem.hxx
+    - editeng/wrlmitem.hxx
+    - editeng/protitem.hxx
+    - editeng/opaqitem.hxx
+    - editeng/tstpitem.hxx
+    - editeng/autokernitem.hxx
+    - editeng/keepitem.hxx
+    - editeng/kernitem.hxx
+    - editeng/spltitem.hxx
+    - editeng/brushitem.hxx
+    - editeng/wghtitem.hxx
+    - editeng/shaditem.hxx
+    - editeng/pbinitem.hxx
+    - editeng/ulspitem.hxx
+    - editeng/prntitem.hxx
+    - editeng/orphitem.hxx
+    - editeng/widwitem.hxx
+    - editeng/lineitem.hxx
+    - editeng/pmdlitem.hxx
+    - editeng/cmapitem.hxx
+    - editeng/langitem.hxx
+    - editeng/formatbreakitem.hxx
+    - editeng/hyphenzoneitem.hxx
+    - editeng/escapementitem.hxx
+    - editeng/lspcitem.hxx
+    - editeng/adjustitem.hxx
+    - editeng/crossedoutitem.hxx
+    - editeng/fontitem.hxx
+    - editeng/shdditem.hxx
+    - editeng/udlnitem.hxx
+    - editeng/postitem.hxx
+    - editeng/fhgtitem.hxx
+    - editeng/contouritem.hxx
+    - editeng/colritem.hxx
+    - editeng/boxitem.hxx
+    - editeng/sizeitem.hxx
+    - editeng/lrspitem.hxx
+    - svx/xlnstit.hxx
+    - svx/xlnedit.hxx
+    - svx/xfillit0.hxx
+    - svx/xflclit.hxx
+    - svx/xflgrit.hxx
+    - svx/xflhtit.hxx
+    - svx/xbtmpit.hxx
+    - svx/xlineit0.hxx
+    - svx/xlnwtit.hxx
+    - svx/xlndsit.hxx
+    - svx/xlnclit.hxx
+    - svx/xtextit0.hxx
+    - svx/xftadit.hxx
+    - svx/xftdiit.hxx
+    - svx/xftstit.hxx
+    - svx/xftmrit.hxx
+    - svx/xftouit.hxx
+    - svx/xftshit.hxx
+    - svx/xftshcit.hxx
+    - svx/xftshxy.hxx
+    - svx/grafctrl.hxx
+    - paratr.hxx
+    - fmtinfmt.hxx
+    - fmtsrnd.hxx
+    - envimg.hxx
+    - fmtline.hxx
+    - svx/clipfmtitem.hxx
+    - editeng/blinkitem.hxx
+    - svl/slstitm.hxx
+    - editeng/paravertalignitem.hxx
+    - editeng/charreliefitem.hxx
+    - editeng/charrotateitem.hxx
+    - editeng/charscaleitem.hxx
+    - svx/postattr.hxx
+    - sfx2/frame.hxx
+    - svx/chrtitem.hxx
+    - svx/drawitem.hxx
+    - svx/xflftrit.hxx
+    - svx/xlncapit.hxx
+    - svx/xlinjoit.hxx
+    - svx/galleryitem.hxx
+    - sfx2/msg.hxx
+    sw/source/uibase/shells/textsh.cxx:
+    # Needed for defines in swslots.hxx
+    - globals.hrc
+
diff --git a/sw/source/uibase/index/idxmrk.cxx b/sw/source/uibase/index/idxmrk.cxx
index a4f4f631c753..a6deaa821b9a 100644
--- a/sw/source/uibase/index/idxmrk.cxx
+++ b/sw/source/uibase/index/idxmrk.cxx
@@ -17,28 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <hintids.hxx>
-#include <svl/stritem.hxx>
-#include <sfx2/dispatch.hxx>
-#include <svl/eitem.hxx>
-#include <editeng/scripttypeitem.hxx>
-#include <svl/itemset.hxx>
-#include <editeng/langitem.hxx>
-#include <swtypes.hxx>
 #include <idxmrk.hxx>
-#include <txttxmrk.hxx>
 #include <wrtsh.hxx>
-#include <view.hxx>
-#include <multmrk.hxx>
-#include <swundo.hxx>
 #include <cmdid.h>
-#include <swmodule.hxx>
-#include <fldmgr.hxx>
-#include <fldbas.hxx>
-#include <swcont.hxx>
-#include <svl/cjkoptions.hxx>
-#include <ndtxt.hxx>
-#include <breakit.hxx>
 
 SFX_IMPL_CHILDWINDOW_WITHID(SwInsertIdxMarkWrapper, FN_INSERT_IDX_ENTRY_DLG)
 
diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx
index 0c594c51e0cc..53223fc91ff1 100644
--- a/sw/source/uibase/index/toxmgr.cxx
+++ b/sw/source/uibase/index/toxmgr.cxx
@@ -18,14 +18,12 @@
  */
 
 #include <wrtsh.hxx>
-#include <shellres.hxx>
 #include <swwait.hxx>
 #include <view.hxx>
 #include <toxmgr.hxx>
 #include <doc.hxx>
 #include <IDocumentUndoRedo.hxx>
 #include <swundo.hxx>
-#include <globals.hrc>
 
 // handle indexes with TOXMgr
 SwTOXMgr::SwTOXMgr(SwWrtShell* pShell):
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index f110c5f5fe7a..168f6246a33c 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -21,10 +21,8 @@
 #include <view.hxx>
 #include <wrtsh.hxx>
 #include <swundo.hxx>
-#include <globals.hrc>
 #include <splargs.hxx>
 
-#include <editeng/unolingu.hxx>
 #include <editeng/langitem.hxx>
 #include <editeng/fontitem.hxx>
 #include <rtl/ustring.hxx>
@@ -39,15 +37,10 @@
 #include <index.hxx>
 #include <pam.hxx>
 #include <swcrsr.hxx>
-#include <viscrs.hxx>
 #include <ndtxt.hxx>
 #include <fmtruby.hxx>
 #include <breakit.hxx>
 
-#include <olmenu.hxx>
-
-#include <unomid.h>
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::uno;
diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx
index e26333e8d481..d7d0c87a5bc4 100644
--- a/sw/source/uibase/lingu/hyp.cxx
+++ b/sw/source/uibase/lingu/hyp.cxx
@@ -17,24 +17,18 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <initui.hxx>
 #include <view.hxx>
 #include <edtwin.hxx>
 #include <wrtsh.hxx>
-#include <globals.hrc>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
-#include <linguistic/lngprops.hxx>
 #include <com/sun/star/linguistic2/XLinguProperties.hpp>
 #include <swwait.hxx>
 
 #include <hyp.hxx>
 #include <mdiexp.hxx>
-#include <olmenu.hxx>
 #include <strings.hrc>
 
-#include <unomid.h>
-
 #include <memory>
 
 #define PSH         (&pView->GetWrtShell())
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index 97053459853f..8098a6a4c7fd 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -21,25 +21,16 @@
 #include <cmdid.h>
 #include <strings.hrc>
 #include <doc.hxx>
-#include <docsh.hxx>
 #include <edtwin.hxx>
 #include <helpids.h>
-#include <hintids.hxx>
 #include <langhelper.hxx>
-#include <ndtxt.hxx>
 #include <bitmaps.hlst>
 #include <olmenu.hxx>
-#include <swabstdlg.hxx>
 #include <swmodule.hxx>
 #include <swtypes.hxx>
 #include <swundo.hxx>
-#include <uitool.hxx>
-#include <unomid.h>
 #include <view.hxx>
-#include <viewopt.hxx>
 #include <wrtsh.hxx>
-#include <wview.hxx>
-#include <textsh.hxx>
 
 #include <comphelper/lok.hxx>
 #include <comphelper/anytostring.hxx>
@@ -47,43 +38,31 @@
 #include <cppuhelper/exc_hlp.hxx>
 #include <editeng/acorrcfg.hxx>
 #include <editeng/svxacorr.hxx>
-#include <editeng/langitem.hxx>
 #include <editeng/splwrap.hxx>
-#include <editeng/brushitem.hxx>
 #include <editeng/unolingu.hxx>
 #include <editeng/editview.hxx>
-#include <i18nlangtag/mslangid.hxx>
 #include <i18nlangtag/languagetag.hxx>
-#include <linguistic/lngprops.hxx>
 #include <linguistic/misc.hxx>
-#include <osl/file.hxx>
 #include <rtl/string.hxx>
 #include <vcl/commandinfoprovider.hxx>
-#include <vcl/graphicfilter.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
-#include <sfx2/sfxdlg.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svl/itemset.hxx>
 #include <svl/languageoptions.hxx>
 #include <svl/stritem.hxx>
 #include <svtools/langtab.hxx>
-#include <svx/dlgutil.hxx>
-#include <svx/svxids.hrc>
 #include <unotools/lingucfg.hxx>
 #include <unotools/linguprops.hxx>
-#include <vcl/layout.hxx>
 #include <vcl/settings.hxx>
-#include <sal/macros.h>
 
 #include <map>
 
 #include <com/sun/star/document/XDocumentLanguages.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/i18n/ScriptType.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
 #include <com/sun/star/uno/Any.hxx>
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index bd7b43e377e7..d21ffaa24209 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -17,23 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <hintids.hxx>
-#include <svx/svditer.hxx>
 #include <svx/svdotext.hxx>
-#include <editeng/editdata.hxx>
 #include <svx/svdpagv.hxx>
-#include <svx/svdogrp.hxx>
 #include <sfx2/printer.hxx>
-#include <svx/svdmodel.hxx>
-#include <editeng/langitem.hxx>
-#include <linguistic/lngprops.hxx>
-#include <sfx2/sfxuno.hxx>
 #include <svx/svdview.hxx>
-#include <editeng/unolingu.hxx>
-#include <unotools/localedatawrapper.hxx>
 #include <drawdoc.hxx>
 #include "sdrhhcwrap.hxx"
-#include <frmfmt.hxx>
 #include <docsh.hxx>
 #include <wrtsh.hxx>
 #include <view.hxx>
@@ -41,7 +30,6 @@
 #include <doc.hxx>
 #include <IDocumentDeviceAccess.hxx>
 #include <IDocumentDrawModelAccess.hxx>
-#include <docary.hxx>
 #include <edtwin.hxx>
 
 using namespace ::com::sun::star;
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 69a2df2237cc..868158732834 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -32,14 +32,12 @@
 #include <unotools/pathoptions.hxx>
 #include <unotools/tempfile.hxx>
 #include <swtypes.hxx>
-#include <uitool.hxx>
 #include <glosdoc.hxx>
 #include <shellio.hxx>
 #include <swunohelper.hxx>
 
 #include <unoatxt.hxx>
 #include <swerror.h>
-#include <globals.hrc>
 
 #include <memory>
 
diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx
index 174913cfddc2..c84545422bad 100644
--- a/sw/source/uibase/misc/glshell.cxx
+++ b/sw/source/uibase/misc/glshell.cxx
@@ -22,16 +22,12 @@
 #include <svl/stritem.hxx>
 #include <sfx2/printer.hxx>
 #include <sfx2/request.hxx>
-#include <sfx2/sfxsids.hrc>
-#include <svl/srchitem.hxx>
 #include <svl/macitem.hxx>
 #include <gloshdl.hxx>
 
 #include <editeng/acorrcfg.hxx>
-#include <sfx2/app.hxx>
 #include <sfx2/objface.hxx>
 #include <sfx2/viewfrm.hxx>
-#include <uitool.hxx>
 #include <wrtsh.hxx>
 #include <view.hxx>
 #include <glshell.hxx>
@@ -43,7 +39,6 @@
 #include <shellio.hxx>
 #include <initui.hxx>
 #include <cmdid.h>
-#include <swerror.h>
 #include <strings.hrc>
 
 #define ShellClass_SwWebGlosDocShell
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index 36e4787aec91..d484cce5dd3a 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -18,19 +18,15 @@
  */
 
 #include <numberingtypelistbox.hxx>
-#include <cnttab.hxx>
 #include <com/sun/star/style/NumberingType.hpp>
 #include <com/sun/star/text/DefaultNumberingProvider.hpp>
 #include <com/sun/star/text/XDefaultNumberingProvider.hpp>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/text/XNumberingTypeInfo.hpp>
 #include <editeng/numitem.hxx>
-#include <svx/dialogs.hrc>
 #include <svx/strarray.hxx>
 #include <osl/diagnose.h>
 
-#include <unomid.h>
-
 using namespace com::sun::star;
 
 struct SwNumberingTypeListBox_Impl
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index e746b7357b07..86da5fa73df2 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -45,12 +45,8 @@
 
 #include <vector>
 #include <svx/svxdlg.hxx>
-#include <svx/dialogs.hrc>
-#include <svx/svxids.hrc>
 #include <bitmaps.hlst>
 
-#include <unomid.h>
-
 #include <docsh.hxx>
 
 #include <IDocumentRedlineAccess.hxx>
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index d500ce3006d2..1cf12719c3d3 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -16,14 +16,11 @@
 #include <viewsh.hxx>
 #include <edtwin.hxx>
 #include <PostItMgr.hxx>
-#include <viewopt.hxx>
 #include <view.hxx>
 #include <cmdid.h>
 #include <sfx2/request.hxx>
-#include <svx/svxids.hrc>
 #include <vcl/commandevent.hxx>
 #include <vcl/event.hxx>
-#include <vcl/svapp.hxx>
 #include <vcl/window.hxx>
 #include <vcl/settings.hxx>
 #include <strings.hrc>
diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx
index 2c5564ecd0a2..a90652f1b6ef 100644
--- a/sw/source/uibase/ribbar/concustomshape.cxx
+++ b/sw/source/uibase/ribbar/concustomshape.cxx
@@ -17,23 +17,13 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <sfx2/bindings.hxx>
-#include <sfx2/htmlmode.hxx>
-#include <svx/sdtacitm.hxx>
 #include <svx/svdobj.hxx>
 #include <svx/sdtagitm.hxx>
-#include <svx/sdtakitm.hxx>
-#include <svx/sdtaditm.hxx>
-#include <svx/sdtaaitm.hxx>
 #include <svx/svdview.hxx>
-#include <svx/svdocapt.hxx>
 #include <editeng/eeitem.hxx>
-#include <editeng/outlobj.hxx>
-#include <cmdid.h>
 #include <view.hxx>
 #include <edtwin.hxx>
 #include <wrtsh.hxx>
-#include <viewopt.hxx>
 #include <drawbase.hxx>
 #include <concustomshape.hxx>
 #include <svx/gallery.hxx>
diff --git a/sw/source/uibase/ribbar/conform.cxx b/sw/source/uibase/ribbar/conform.cxx
index 88fefd1fefd9..a61a0d725312 100644
--- a/sw/source/uibase/ribbar/conform.cxx
+++ b/sw/source/uibase/ribbar/conform.cxx
@@ -17,9 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <svx/fmglob.hxx>
 #include <svx/svdview.hxx>
-#include <svx/fmshell.hxx>
 #include <vcl/ptrstyle.hxx>
 
 #include <swmodule.hxx>
diff --git a/sw/source/uibase/ribbar/conpoly.cxx b/sw/source/uibase/ribbar/conpoly.cxx
index 39da4b60fba8..481722734702 100644
--- a/sw/source/uibase/ribbar/conpoly.cxx
+++ b/sw/source/uibase/ribbar/conpoly.cxx
@@ -17,17 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <svx/svdmark.hxx>
-#include <svx/svdview.hxx>
-#include <svx/svdopath.hxx>
 #include <svx/svxids.hrc>
+#include <vcl/event.hxx>
 
 #include <view.hxx>
 #include <edtwin.hxx>
 #include <wrtsh.hxx>
 #include <drawbase.hxx>
 #include <conpoly.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
 
 ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
                 SwDrawBase(pWrtShell, pEditWin, pSwView)
diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx
index bd4bec4d9832..3484c4a557c7 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <sfx2/bindings.hxx>
-#include <sfx2/htmlmode.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svx/sdtacitm.hxx>
 #include <svx/svdobj.hxx>
@@ -28,13 +27,11 @@
 #include <svx/sdtaaitm.hxx>
 #include <svx/svdview.hxx>
 #include <svx/svdocapt.hxx>
-#include <svx/svxids.hrc>
 #include <editeng/outlobj.hxx>
 #include <cmdid.h>
 #include <view.hxx>
 #include <edtwin.hxx>
 #include <wrtsh.hxx>
-#include <viewopt.hxx>
 #include <drawbase.hxx>
 #include <conrect.hxx>
 
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index 5c9d714ce175..f2b13d8d1372 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -22,7 +22,6 @@
 #include <svx/svdview.hxx>
 #include <svx/svdobj.hxx>
 #include <svl/ptitem.hxx>
-#include <svx/svxids.hrc>
 #include <editeng/sizeitem.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/bindings.hxx>
@@ -30,14 +29,13 @@
 #include <fmtclds.hxx>
 #include <frmfmt.hxx>
 #include <cmdid.h>
-#include <basesh.hxx>
 #include <view.hxx>
 #include <wrtsh.hxx>
 #include <drawbase.hxx>
 #include <edtwin.hxx>
-#include <caption.hxx>
 #include <swmodule.hxx>
 #include <swundo.hxx>
+#include <SwCapObjType.hxx>
 #include <SwRewriter.hxx>
 #include <strings.hrc>
 
diff --git a/sw/source/uibase/ribbar/dselect.cxx b/sw/source/uibase/ribbar/dselect.cxx
index c06b134c38bb..a70583fda5dc 100644
--- a/sw/source/uibase/ribbar/dselect.cxx
+++ b/sw/source/uibase/ribbar/dselect.cxx
@@ -19,7 +19,6 @@
 
 #include <sfx2/bindings.hxx>
 #include <sfx2/viewfrm.hxx>
-#include <svx/svxids.hrc>
 #include <view.hxx>
 #include <edtwin.hxx>
 #include <wrtsh.hxx>
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 1c278137cb16..cc1bc1705050 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -27,17 +27,14 @@
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/dispatch.hxx>
 #include <svx/ruler.hxx>
-#include <svl/zforlist.hxx>
 #include <svl/stritem.hxx>
 #include <vcl/event.hxx>
-#include <vcl/settings.hxx>
 
 #include <swtypes.hxx>
 #include <cmdid.h>
 #include <swmodule.hxx>
 #include <wrtsh.hxx>
 #include <view.hxx>
-#include <calc.hxx>
 #include <inputwin.hxx>
 #include <fldbas.hxx>
 #include <fldmgr.hxx>
@@ -52,7 +49,6 @@
 #include <pam.hxx>
 
 #include <swundo.hxx>
-#include <dbui.hrc>
 
 #include <IDocumentContentOperations.hxx>
 
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 6ca3ce946f71..65f1f48acf0e 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -17,20 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <string>
 #include <i18nutil/unicode.hxx>
-#include <svl/eitem.hxx>
-#include <sfx2/htmlmode.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/bindings.hxx>
-#include <sfx2/msgpool.hxx>
 #include <swmodule.hxx>
 #include <view.hxx>
 #include <initui.hxx>
-#include <viewopt.hxx>
 #include <docsh.hxx>
 #include <gloshdl.hxx>
-#include <glosdoc.hxx>
 #include <gloslst.hxx>
 #include <workctrl.hxx>
 #include <strings.hrc>
@@ -39,7 +33,6 @@
 #include <wrtsh.hxx>
 #include <cppuhelper/queryinterface.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <svl/imageitm.hxx>
 #include <vcl/event.hxx>
 #include <vcl/fixed.hxx>
 #include <vcl/lstbox.hxx>
@@ -50,7 +43,6 @@
 #include <vcl/field.hxx>
 #include <vcl/svapp.hxx>
 #include <svx/dialmgr.hxx>
-#include <svx/dialogs.hrc>
 #include <svx/strings.hrc>
 #include <bitmaps.hlst>
 #include <toolkit/helper/vclunohelper.hxx>
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index e6478adf3292..c62232e2aee1 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -27,12 +27,10 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/linguistic2/XThesaurus.hpp>
 
-#include <i18nlangtag/mslangid.hxx>
 #include <i18nutil/transliteration.hxx>
 #include <sfx2/objface.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
 #include <editeng/eeitem.hxx>
 #include <editeng/flstitem.hxx>
@@ -51,47 +49,30 @@
 #include <editeng/hyphenzoneitem.hxx>
 #include <editeng/udlnitem.hxx>
 #include <editeng/fontitem.hxx>
-#include <editeng/fhgtitem.hxx>
 #include <svx/clipfmtitem.hxx>
 #include <svl/stritem.hxx>
 #include <svl/slstitm.hxx>
 #include <editeng/colritem.hxx>
-#include <editeng/wghtitem.hxx>
 #include <editeng/contouritem.hxx>
-#include <editeng/postitem.hxx>
 #include <editeng/frmdiritem.hxx>
-#include <svx/postattr.hxx>
-#include <svx/svdoutl.hxx>
 #include <svl/whiter.hxx>
 #include <svl/cjkoptions.hxx>
 #include <svl/ctloptions.hxx>
 #include <unotools/useroptions.hxx>
 #include <editeng/flditem.hxx>
-#include <editeng/editstat.hxx>
 #include <svx/hlnkitem.hxx>
 #include <sfx2/htmlmode.hxx>
 #include <editeng/langitem.hxx>
-#include <editeng/unolingu.hxx>
 #include <editeng/scripttypeitem.hxx>
-#include <editeng/writingmodeitem.hxx>
 #include <swundo.hxx>
 #include <doc.hxx>
 #include <viewopt.hxx>
 #include <wrtsh.hxx>
-#include <uitool.hxx>
 #include <chrdlgmodes.hxx>
-#include <pardlg.hxx>
-#include <swdtflvr.hxx>
-#include <drwtxtsh.hxx>
-#include <swmodule.hxx>
-#include <initui.hxx>
 #include <edtwin.hxx>
-#include <swwait.hxx>
-#include <docstat.hxx>
 #include <SwRewriter.hxx>
 
 #include <cmdid.h>
-#include <globals.hrc>
 #include <strings.hrc>
 #include <breakit.hxx>
 #include <annotsh.hxx>
@@ -102,22 +83,16 @@
 #include <swtypes.hxx>
 
 #include <svx/svxdlg.hxx>
-#include <svx/dialogs.hrc>
 
-#include <svx/svxids.hrc>
 #include <vcl/EnumContext.hxx>
 #include <svl/itempool.hxx>
 #include <editeng/outliner.hxx>
-#include <editeng/editeng.hxx>
 #include <editeng/editview.hxx>
 
 #include <svl/languageoptions.hxx>
-#include <svtools/langtab.hxx>
 
-#include <docsh.hxx>
 #include <svl/undo.hxx>
 #include <swabstdlg.hxx>
-#include <app.hrc>
 
 #include <comphelper/string.hxx>
 #include <comphelper/propertysequence.hxx>
@@ -125,7 +100,6 @@
 
 #include <langhelper.hxx>
 
-#include <tools/diagnose_ex.h>
 #include <memory>
 
 using namespace ::com::sun::star;
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index e5dbc9f9eb3a..252d432e8558 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -22,21 +22,15 @@
 #include <sal/config.h>
 
 #include <hintids.hxx>
-#include <svl/urihelper.hxx>
 #include <svl/languageoptions.hxx>
-#include <svx/svxids.hrc>
 #include <sfx2/linkmgr.hxx>
 #include <sfx2/htmlmode.hxx>
 #include <svx/imapdlg.hxx>
 #include <sfx2/dispatch.hxx>
-#include <sfx2/docfile.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/request.hxx>
 #include <svl/whiter.hxx>
 #include <svl/visitem.hxx>
-#include <sfx2/objitem.hxx>
-#include <vcl/graphicfilter.hxx>
-#include <svx/gallery.hxx>
 #include <editeng/langitem.hxx>
 #include <svx/clipfmtitem.hxx>
 #include <svx/contdlg.hxx>
@@ -44,21 +38,16 @@
 #include <vcl/inputctx.hxx>
 #include <svl/slstitm.hxx>
 #include <svl/ptitem.hxx>
-#include <svl/itemiter.hxx>
 #include <svl/stritem.hxx>
 #include <editeng/colritem.hxx>
 #include <editeng/fhgtitem.hxx>
 #include <editeng/fontitem.hxx>
 #include <editeng/shaditem.hxx>
 #include <editeng/boxitem.hxx>
-#include <svl/srchitem.hxx>
-#include <editeng/ulspitem.hxx>
-#include <editeng/lrspitem.hxx>
 #include <editeng/brushitem.hxx>
 #include <editeng/opaqitem.hxx>
 #include <editeng/sizeitem.hxx>
 #include <svx/flagsdef.hxx>
-#include <svx/xflclit.hxx>
 #include <editeng/scripttypeitem.hxx>
 #include <sfx2/objface.hxx>
 #include <fmturl.hxx>
@@ -74,9 +63,6 @@
 #include <basesh.hxx>
 #include <viewopt.hxx>
 #include <fontcfg.hxx>
-#include <docstat.hxx>
-#include <usrfld.hxx>
-#include <expfld.hxx>
 #include <fmtsrnd.hxx>
 #include <fldmgr.hxx>
 #include <frmmgr.hxx>
@@ -84,27 +70,20 @@
 #include <mdiexp.hxx>
 #include <swdtflvr.hxx>
 #include <pagedesc.hxx>
-#include <convert.hxx>
 #include <fmtcol.hxx>
 #include <edtwin.hxx>
 #include <tblafmt.hxx>
-#include <caption.hxx>
 #include <swwait.hxx>
 #include <cmdid.h>
-#include <globals.hrc>
 #include <strings.hrc>
-#include <globals.h>
 #include <unotxdoc.hxx>
-#include <fmtinfmt.hxx>
 #include <doc.hxx>
 #include <IDocumentSettingAccess.hxx>
 #include <IDocumentUndoRedo.hxx>
 #include <swabstdlg.hxx>
 #include <modcfg.hxx>
-#include <instable.hxx>
 #include <svx/fmshell.hxx>
 #include <SwRewriter.hxx>
-#include <unomid.h>
 #include <svx/galleryitem.hxx>
 #include <com/sun/star/gallery/GalleryItemType.hpp>
 #include <memory>
@@ -115,8 +94,6 @@
 
 #include <svx/svxdlg.hxx>
 
-#include <SwStyleNameMapper.hxx>
-#include <poolfmt.hxx>
 #include <shellres.hxx>
 #include <UndoTable.hxx>
 
diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx
index 35e2afcec1ac..4764decede3b 100644
--- a/sw/source/uibase/shells/beziersh.cxx
+++ b/sw/source/uibase/shells/beziersh.cxx
@@ -19,11 +19,9 @@
 
 #include <cmdid.h>
 #include <svx/svdview.hxx>
-#include <svl/srchitem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/whiter.hxx>
 #include <svx/svdopath.hxx>
-#include <svx/svxids.hrc>
 #include <vcl/EnumContext.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/dispatch.hxx>
@@ -33,15 +31,12 @@
 #include <wrtsh.hxx>
 #include <view.hxx>
 #include <edtwin.hxx>
-#include <globals.hrc>
 #include <drawbase.hxx>
 #include <beziersh.hxx>
 #define ShellClass_SwBezierShell
 #include <sfx2/msg.hxx>
 #include <swslots.hxx>
 
-#include <unomid.h>
-
 SFX_IMPL_INTERFACE(SwBezierShell, SwBaseShell)
 
 void SwBezierShell::InitInterface_Impl()
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 0437340ebf98..78c49e0e5488 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -17,17 +17,13 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <svx/svxids.hrc>
 #include <sfx2/request.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svx/svdview.hxx>
-#include <svx/drawitem.hxx>
 
-#include <svx/xtable.hxx>
 #include <view.hxx>
 #include <wrtsh.hxx>
-#include <docsh.hxx>
 #include <cmdid.h>
 
 #include <drawsh.hxx>
@@ -39,12 +35,7 @@
 #include <svx/xflclit.hxx>
 #include <svx/chrtitem.hxx>
 #include <svx/xlnwtit.hxx>
-#include <svx/xfillit0.hxx>
 #include <svx/xflgrit.hxx>
-#include <comphelper/lok.hxx>
-#include <LibreOfficeKit/LibreOfficeKitEnums.h>
-
-#include <com/sun/star/drawing/FillStyle.hpp>
 
 using namespace com::sun::star::drawing;
 
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index d1b72f12ca82..958a38b2a39a 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -26,8 +26,6 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/objface.hxx>
 #include <sfx2/viewfrm.hxx>
-#include <svl/itemiter.hxx>
-#include <svl/srchitem.hxx>
 #include <svx/extrusionbar.hxx>
 #include <svx/fontworkbar.hxx>
 #include <uitool.hxx>
@@ -35,16 +33,11 @@
 #include <textboxhelper.hxx>
 #include <wview.hxx>
 #include <swmodule.hxx>
-#include <swwait.hxx>
 #include <doc.hxx>
 #include <docsh.hxx>
-#include <docstat.hxx>
-#include <IDocumentStatistics.hxx>
-#include <tools/diagnose_ex.h>
 
 #include <svx/svdoashp.hxx>
 #include <svx/xfillit0.hxx>
-#include <svx/xtable.hxx>
 #include <vcl/EnumContext.hxx>
 #include <svx/svdoole2.hxx>
 #include <sfx2/opengrf.hxx>
@@ -52,12 +45,10 @@
 #include <svx/svdundo.hxx>
 #include <svx/xbtmpit.hxx>
 #include <svx/sdasitm.hxx>
-#include <svx/svxids.hrc>
 
 #include <swundo.hxx>
 #include <wrtsh.hxx>
 #include <cmdid.h>
-#include <globals.hrc>
 #include <strings.hrc>
 #include <drwbassh.hxx>
 #include <drawsh.hxx>
@@ -65,7 +56,6 @@
 #define ShellClass_SwDrawShell
 #include <sfx2/msg.hxx>
 #include <swslots.hxx>
-#include <swabstdlg.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx
index d34a3d667dfd..2e2f5fd5210b 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -17,18 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <hintids.hxx>
 #include <svx/hlnkitem.hxx>
 #include <svx/svdview.hxx>
 #include <svl/whiter.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/objface.hxx>
-#include <sfx2/app.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/dispatch.hxx>
 #include <vcl/EnumContext.hxx>
-#include <svl/srchitem.hxx>
-#include <svx/fmglob.hxx>
 #include <svx/svdouno.hxx>
 #include <com/sun/star/form/FormButtonType.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -37,10 +33,8 @@
 #include <tools/urlobj.hxx>
 
 #include <viewopt.hxx>
-#include <swmodule.hxx>
 #include <wrtsh.hxx>
 #include <cmdid.h>
-#include <globals.hrc>
 #include <drwbassh.hxx>
 #include <drformsh.hxx>
 #include <svl/urihelper.hxx>
@@ -52,8 +46,6 @@
 #include <sfx2/msg.hxx>
 #include <swslots.hxx>
 
-#include <unomid.h>
-
 using namespace ::com::sun::star;
 
 SFX_IMPL_INTERFACE(SwDrawFormShell, SwDrawBaseShell)
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 12d87bab691b..cb44b8955e31 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -23,13 +23,10 @@
 #include <sfx2/request.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/viewfrm.hxx>
-#include <svl/aeitem.hxx>
 #include <svx/svdview.hxx>
-#include <svl/srchitem.hxx>
 #include <svl/whiter.hxx>
 #include <svx/swframevalidation.hxx>
 #include <svx/anchorid.hxx>
-#include <sfx2/htmlmode.hxx>
 #include <drawdoc.hxx>
 #include <uitool.hxx>
 #include <fmtornt.hxx>
@@ -41,26 +38,20 @@
 #include <viewopt.hxx>
 #include <dcontact.hxx>
 #include <frmfmt.hxx>
-#include <wrap.hxx>
 #include <drawbase.hxx>
 #include <drwbassh.hxx>
 #include <swdtflvr.hxx>
-#include <svx/svdogrp.hxx>
-#include <svx/svdpage.hxx>
 #include <svx/svditer.hxx>
 #define ShellClass_SwDrawBaseShell
 #include <sfx2/msg.hxx>
-#include <svx/svxids.hrc>
 #include <swslots.hxx>
 #include <svx/svxdlg.hxx>
-#include <svx/dialogs.hrc>
 #include <swabstdlg.hxx>
 #include <swundo.hxx>
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <com/sun/star/text/VertOrientation.hpp>
 #include <com/sun/star/text/RelOrientation.hpp>
 #include <IDocumentDrawModelAccess.hxx>
-#include <memory>
 #include <fmtfollowtextflow.hxx>
 
 using namespace ::com::sun::star;
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index c63f96eb563c..120c6a162004 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -21,7 +21,6 @@
 #include <com/sun/star/linguistic2/XThesaurus.hpp>
 
 #include <comphelper/string.hxx>
-#include <i18nlangtag/mslangid.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
@@ -40,12 +39,9 @@
 #include <editeng/crossedoutitem.hxx>
 #include <editeng/shdditem.hxx>
 #include <editeng/udlnitem.hxx>
-#include <editeng/fontitem.hxx>
 #include <editeng/fhgtitem.hxx>
 #include <editeng/colritem.hxx>
-#include <editeng/wghtitem.hxx>
 #include <editeng/contouritem.hxx>
-#include <editeng/postitem.hxx>
 #include <editeng/frmdiritem.hxx>
 #include <editeng/urlfieldhelper.hxx>
 #include <svx/svdoutl.hxx>
@@ -54,50 +50,35 @@
 #include <svl/whiter.hxx>
 #include <svl/cjkoptions.hxx>
 #include <svl/ctloptions.hxx>
-#include <svtools/langtab.hxx>
 #include <svl/languageoptions.hxx>
 #include <editeng/flditem.hxx>
 #include <editeng/editstat.hxx>
 #include <svx/clipfmtitem.hxx>
 #include <svx/hlnkitem.hxx>
 #include <svx/svxdlg.hxx>
-#include <svx/svxids.hrc>
 #include <sfx2/htmlmode.hxx>
-#include <svl/slstitm.hxx>
 #include <editeng/langitem.hxx>
-#include <editeng/unolingu.hxx>
 #include <editeng/scripttypeitem.hxx>
 #include <editeng/writingmodeitem.hxx>
 #include <editeng/eeitem.hxx>
-#include <editeng/editeng.hxx>
 #include <editeng/editdata.hxx>
 #include <editeng/outliner.hxx>
 #include <editeng/editview.hxx>
-#include <vcl/outdev.hxx>
 #include <vcl/unohelp2.hxx>
 #include <editeng/hyphenzoneitem.hxx>
-#include <tools/diagnose_ex.h>
 
 #include <cmdid.h>
 #include <doc.hxx>
-#include <docstat.hxx>
 #include <drwtxtsh.hxx>
 #include <edtwin.hxx>
-#include <globals.hrc>
 #include <hintids.hxx>
-#include <initui.hxx>
 #include <langhelper.hxx>
 #include <chrdlgmodes.hxx>
-#include <pardlg.hxx>
-#include <string.h>
-#include <swdtflvr.hxx>
 #include <swmodule.hxx>
-#include <swwait.hxx>
 #include <uitool.hxx>
 #include <viewopt.hxx>
 #include <wrtsh.hxx>
 #include <wview.hxx>
-#include <svx/chrtitem.hxx>
 
 #include <swabstdlg.hxx>
 #include <memory>
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 674ed73378bf..23e4728f6a5a 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -22,15 +22,12 @@
 #include <i18nutil/transliteration.hxx>
 #include <svl/slstitm.hxx>
 #include <svl/stritem.hxx>
-#include <svl/cjkoptions.hxx>
 #include <editeng/fontitem.hxx>
-#include <editeng/langitem.hxx>
 #include <svx/svdview.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/objface.hxx>
 #include <svx/svdotext.hxx>
 #include <svx/sdooitm.hxx>
-#include <svx/svxids.hrc>
 #include <editeng/editeng.hxx>
 #include <editeng/editview.hxx>
 #include <editeng/eeitem.hxx>
@@ -54,13 +51,10 @@
 #include <view.hxx>
 #include <wrtsh.hxx>
 #include <viewopt.hxx>
-#include <initui.hxx>
 #include <drwtxtsh.hxx>
-#include <swundo.hxx>
 #include <breakit.hxx>
 
 #include <cmdid.h>
-#include <globals.hrc>
 
 #define ShellClass_SwDrawTextShell
 #include <sfx2/msg.hxx>
@@ -68,13 +62,9 @@
 #include <uitool.hxx>
 #include <wview.hxx>
 #include <swmodule.hxx>
-#include <svx/dialogs.hrc>
 #include <svx/svdoashp.hxx>
 #include <svx/svxdlg.hxx>
-#include <svx/xtable.hxx>
-#include <cppuhelper/bootstrap.hxx>
 #include <comphelper/processfactory.hxx>
-#include <swabstdlg.hxx>
 #include <IDocumentUndoRedo.hxx>
 #include <memory>
 
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 324dcdec9ea8..7a5a63011b01 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -21,13 +21,8 @@
 
 #include <hintids.hxx>
 #include <svl/whiter.hxx>
-#include <vcl/imapobj.hxx>
-#include <svtools/miscopt.hxx>
-#include <svl/srchitem.hxx>
-#include <vcl/imap.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <basic/sbstar.hxx>
-#include <svl/rectitem.hxx>
 #include <svl/ptitem.hxx>
 #include <svl/stritem.hxx>
 #include <svl/intitem.hxx>
@@ -35,7 +30,6 @@
 #include <editeng/colritem.hxx>
 #include <editeng/lineitem.hxx>
 #include <editeng/boxitem.hxx>
-#include <editeng/protitem.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/objface.hxx>
@@ -55,29 +49,19 @@
 #include <swmodule.hxx>
 #include <wrtsh.hxx>
 #include <wview.hxx>
-#include <frmatr.hxx>
 #include <uitool.hxx>
 #include <frmfmt.hxx>
 #include <frmsh.hxx>
 #include <frmmgr.hxx>
-#include <frmdlg.hxx>
-#include <swevent.hxx>
-#include <usrpref.hxx>
 #include <edtwin.hxx>
 #include <swdtflvr.hxx>
-#include <swwait.hxx>
-#include <docstat.hxx>
-#include <IDocumentStatistics.hxx>
+#include <viewopt.hxx>
 
 #include <cmdid.h>
-#include <cfgitems.hxx>
-#include <globals.hrc>
 #include <strings.hrc>
 #include <swabstdlg.hxx>
 
-#include <svx/dialogs.hrc>
 #include <svx/svxdlg.hxx>
-#include <svx/svxids.hrc>
 
 #include <docsh.hxx>
 #include <svx/drawitem.hxx>
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 0b417f441e76..1d91400926a3 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -23,51 +23,36 @@
 #include <svl/stritem.hxx>
 #include <svl/whiter.hxx>
 #include <svl/urihelper.hxx>
+#include <sfx2/bindings.hxx>
 #include <sfx2/docfile.hxx>
-#include <sfx2/dispatch.hxx>
 #include <sfx2/objface.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <editeng/sizeitem.hxx>
-#include <editeng/protitem.hxx>
 #include <sfx2/request.hxx>
 #include <vcl/EnumContext.hxx>
-#include <svl/srchitem.hxx>
 #include <sfx2/htmlmode.hxx>
-#include <svx/sdgluitm.hxx>
-#include <svx/sdgcoitm.hxx>
-#include <svx/sdggaitm.hxx>
-#include <svx/sdgtritm.hxx>
-#include <svx/sdginitm.hxx>
-#include <svx/sdgmoitm.hxx>
 #include <svx/svdview.hxx>
 #include <editeng/brushitem.hxx>
 #include <svx/grfflt.hxx>
 #include <svx/compressgraphicdialog.hxx>
-#include <vcl/GraphicNativeTransform.hxx>
 #include <svx/tbxcolor.hxx>
 #include <drawdoc.hxx>
-#include <fmturl.hxx>
 #include <view.hxx>
 #include <wrtsh.hxx>
 #include <viewopt.hxx>
 #include <swmodule.hxx>
-#include <frmatr.hxx>
 #include <swundo.hxx>
 #include <uitool.hxx>
 #include <docsh.hxx>
 #include <grfsh.hxx>
 #include <frmmgr.hxx>
-#include <frmdlg.hxx>
 #include <frmfmt.hxx>
 #include <grfatr.hxx>
-#include <usrpref.hxx>
-#include <edtwin.hxx>
 #include <swwait.hxx>
 #include <svx/extedit.hxx>
 #include <svx/graphichelper.hxx>
 #include <doc.hxx>
 #include <IDocumentDrawModelAccess.hxx>
-#include <svx/svxids.hrc>
 #include <svx/drawitem.hxx>
 #define ShellClass_SwGrfShell
 
@@ -77,9 +62,6 @@
 #include <unocrsr.hxx>
 #include <memory>
 
-#include <comphelper/lok.hxx>
-#include <LibreOfficeKit/LibreOfficeKitEnums.h>
-
 #define TOOLBOX_NAME "colorbar"
 
 class SwGrfShell::SwExternalToolEdit
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx
index 95237f233af4..5cd0e1cc58a0 100644
--- a/sw/source/uibase/shells/grfshex.cxx
+++ b/sw/source/uibase/shells/grfshex.cxx
@@ -17,38 +17,20 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <docary.hxx>
-#include <grfsh.hxx>
 #include <wrtsh.hxx>
 #include <view.hxx>
 #include <textsh.hxx>
-#include <viewopt.hxx>
-#include <swundo.hxx>
-#include <caption.hxx>
-#include <vcl/graphicfilter.hxx>
-#include <sfx2/htmlmode.hxx>
 #include <drawdoc.hxx>
 #include <doc.hxx>
 #include <IDocumentDrawModelAccess.hxx>
 #include <docsh.hxx>
-#include <frmfmt.hxx>
-#include <frmmgr.hxx>
-#include <vcl/weld.hxx>
 #include <svx/svdomedia.hxx>
-#include <svx/svdview.hxx>
-#include <svx/svdpagv.hxx>
-#include <SwStyleNameMapper.hxx>
 #include <sfx2/filedlghelper.hxx>
 
 #include <sfx2/request.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svl/stritem.hxx>
 #include <avmedia/mediawindow.hxx>
-#include <vcl/svapp.hxx>
-
-// -> #111827#
-#include <SwRewriter.hxx>
-// <- #111827#
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 32a6cb1a5793..90904b37dcdc 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -27,15 +27,14 @@
 #include <charfmt.hxx>
 
 #include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/sfxdlg.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <editeng/eeitem.hxx>
 #include <editeng/editeng.hxx>
 #include <editeng/editdata.hxx>
 #include <editeng/outliner.hxx>
 #include <editeng/editview.hxx>
-#include <editeng/scripttypeitem.hxx>
 #include <editeng/langitem.hxx>
 
 #include <svl/languageoptions.hxx>
@@ -49,8 +48,6 @@
 #include <view.hxx>
 #include <viewopt.hxx>
 
-#include <swabstdlg.hxx>
-
 #include <langhelper.hxx>
 #include <memory>
 
diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx
index 723a231ce0fd..1beb2bf489a9 100644
--- a/sw/source/uibase/shells/listsh.cxx
+++ b/sw/source/uibase/shells/listsh.cxx
@@ -18,32 +18,17 @@
  */
 
 #include <cmdid.h>
-#include <hintids.hxx>
-#include <editeng/sizeitem.hxx>
-#include <editeng/brushitem.hxx>
-#include <sfx2/app.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/objface.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/viewfrm.hxx>
-#include <svl/stritem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/whiter.hxx>
-#include <svl/intitem.hxx>
-#include <svl/srchitem.hxx>
-#include <svx/svxids.hrc>
 
 #include <numrule.hxx>
-#include <fmtornt.hxx>
 #include <wrtsh.hxx>
-#include <swmodule.hxx>
-#include <frmatr.hxx>
-#include <globals.hrc>
-#include <uinums.hxx>
 #include <listsh.hxx>
-#include <poolfmt.hxx>
 #include <view.hxx>
-#include <edtwin.hxx>
 
 #define ShellClass_SwListShell
 #include <sfx2/msg.hxx>
diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx
index 44ee00225128..932b2feb6529 100644
--- a/sw/source/uibase/shells/mediash.cxx
+++ b/sw/source/uibase/shells/mediash.cxx
@@ -18,42 +18,12 @@
  */
 
 #include <cmdid.h>
-#include <hintids.hxx>
-#include <svl/stritem.hxx>
 #include <svl/whiter.hxx>
-#include <svl/urihelper.hxx>
-#include <sfx2/dispatch.hxx>
-#include <editeng/sizeitem.hxx>
-#include <editeng/protitem.hxx>
 #include <sfx2/request.hxx>
-#include <svl/srchitem.hxx>
-#include <sfx2/htmlmode.hxx>
-#include <svx/sdgluitm.hxx>
-#include <svx/sdgcoitm.hxx>
-#include <svx/sdggaitm.hxx>
-#include <svx/sdgtritm.hxx>
-#include <svx/sdginitm.hxx>
-#include <svx/sdgmoitm.hxx>
 #include <svx/svdview.hxx>
-#include <editeng/brushitem.hxx>
-#include <svx/grfflt.hxx>
-#include <fmturl.hxx>
 #include <view.hxx>
 #include <wrtsh.hxx>
-#include <viewopt.hxx>
-#include <swmodule.hxx>
-#include <frmatr.hxx>
-#include <swundo.hxx>
-#include <uitool.hxx>
-#include <docsh.hxx>
 #include <mediash.hxx>
-#include <frmmgr.hxx>
-#include <frmdlg.hxx>
-#include <frmfmt.hxx>
-#include <grfatr.hxx>
-#include <usrpref.hxx>
-#include <edtwin.hxx>
-#include <swwait.hxx>
 
 #include <sfx2/objface.hxx>
 #include <vcl/EnumContext.hxx>
@@ -64,7 +34,6 @@
 #define ShellClass_SwMediaShell
 #include <sfx2/msg.hxx>
 #include <swslots.hxx>
-#include <swabstdlg.hxx>
 #include <memory>
 
 SFX_IMPL_INTERFACE(SwMediaShell, SwBaseShell)
diff --git a/sw/source/uibase/shells/navsh.cxx b/sw/source/uibase/shells/navsh.cxx
index cb3c7370722d..b5b9021cc1ac 100644
--- a/sw/source/uibase/shells/navsh.cxx
+++ b/sw/source/uibase/shells/navsh.cxx
@@ -9,21 +9,14 @@
 
 #include <cmdid.h>
 #include <svx/svdview.hxx>
-#include <svl/srchitem.hxx>
-#include <svl/eitem.hxx>
 #include <svl/whiter.hxx>
-#include <svx/svdopath.hxx>
 #include <sfx2/request.hxx>
-#include <sfx2/dispatch.hxx>
 #include <sfx2/objface.hxx>
 #include <wrtsh.hxx>
 #include <view.hxx>
-#include <edtwin.hxx>
-#include <globals.hrc>
 #include <navsh.hxx>
 #define ShellClass_SwNavigationShell
 #include <swslots.hxx>
-#include <unomid.h>
 #include <navmgr.hxx>
 
 SFX_IMPL_INTERFACE(SwNavigationShell, SwBaseShell)
diff --git a/sw/source/uibase/shells/olesh.cxx b/sw/source/uibase/shells/olesh.cxx
index c688072f9094..b8207d200c94 100644
--- a/sw/source/uibase/shells/olesh.cxx
+++ b/sw/source/uibase/shells/olesh.cxx
@@ -17,19 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <sfx2/app.hxx>
-#include <sfx2/request.hxx>
 #include <sfx2/objface.hxx>
-#include <sfx2/objitem.hxx>
 #include <vcl/EnumContext.hxx>
-#include <wrtsh.hxx>
 #include <view.hxx>
-#include <globals.hrc>
 #include <frmsh.hxx>
 #include <olesh.hxx>
 
-#include <cmdid.h>
-
 #define ShellClass_SwOleShell
 #include <sfx2/msg.hxx>
 #include <swslots.hxx>
diff --git a/sw/source/uibase/shells/slotadd.cxx b/sw/source/uibase/shells/slotadd.cxx
index 9f29aa6a8e58..a4f4fe72e9b7 100644
--- a/sw/source/uibase/shells/slotadd.cxx
+++ b/sw/source/uibase/shells/slotadd.cxx
@@ -19,8 +19,6 @@
 
 #include <config_options.h>
 
-#include <hintids.hxx>
-#include <uiitems.hxx>
 #include <cmdid.h>
 #include <unomid.h>
 #include <svx/unomid.hxx>
@@ -28,7 +26,6 @@
 #include <svl/globalnameitem.hxx>
 #include <editeng/memberids.h>
 #include <svl/imageitm.hxx>
-#include <svl/aeitem.hxx>
 #include <svl/rectitem.hxx>
 #include <sfx2/objitem.hxx>
 #include <sfx2/objsh.hxx>
@@ -79,7 +76,6 @@
 #include <editeng/boxitem.hxx>
 #include <editeng/sizeitem.hxx>
 #include <editeng/lrspitem.hxx>
-#include <svx/xgrad.hxx>
 #include <svx/xlnstit.hxx>
 #include <svx/xlnedit.hxx>
 #include <svx/xfillit0.hxx>
@@ -102,15 +98,10 @@
 #include <svx/xftshxy.hxx>
 #include <svx/grafctrl.hxx>
 
-#include <fmtornt.hxx>
 #include <paratr.hxx>
 #include <fmtinfmt.hxx>
-#include <fmtfsize.hxx>
 #include <fmtsrnd.hxx>
 #include <envimg.hxx>
-#include <frmatr.hxx>
-#include <cfgitems.hxx>
-#include <grfatr.hxx>
 #include <fmtline.hxx>
 #include <svx/clipfmtitem.hxx>
 #include <editeng/blinkitem.hxx>
@@ -130,7 +121,6 @@
 #include <svx/xflftrit.hxx>
 #include <svx/xlncapit.hxx>
 #include <svx/xlinjoit.hxx>
-#include <svx/AffineMatrixItem.hxx>
 #include <svx/galleryitem.hxx>
 
 #define SFX_TYPEMAP
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 2c292bd9b72e..9ee2f5784703 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -22,15 +22,12 @@
 #include <svl/stritem.hxx>
 #include <svl/whiter.hxx>
 #include <unotools/moduleoptions.hxx>
-#include <svx/rulritem.hxx>
-#include <svl/srchitem.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/ulspitem.hxx>
 #include <editeng/brushitem.hxx>
 #include <editeng/boxitem.hxx>
 #include <editeng/shaditem.hxx>
 #include <editeng/spltitem.hxx>
-#include <editeng/langitem.hxx>
 #include <editeng/keepitem.hxx>
 #include <editeng/lineitem.hxx>
 #include <editeng/colritem.hxx>
@@ -38,8 +35,6 @@
 #include <svx/numinf.hxx>
 #include <svx/svddef.hxx>
 #include <svx/svxdlg.hxx>
-#include <svx/svxids.hrc>
-#include <svl/zformat.hxx>
 #include <sfx2/bindings.hxx>
 #include <vcl/weld.hxx>
 #include <sfx2/request.hxx>
@@ -53,7 +48,6 @@
 #include <editeng/itemtype.hxx>
 
 #include <fmtornt.hxx>
-#include <fmtclds.hxx>
 #include <fmtlsplt.hxx>
 #include <fmtrowsplt.hxx>
 #include <fmtfsize.hxx>
@@ -64,7 +58,6 @@
 #include <uitool.hxx>
 #include <inputwin.hxx>
 #include <uiitems.hxx>
-#include <usrpref.hxx>
 #include <tabsh.hxx>
 #include <swtablerep.hxx>
 #include <tablemgr.hxx>
@@ -74,11 +67,10 @@
 #include <swtable.hxx>
 #include <docsh.hxx>
 #include <tblsel.hxx>
+#include <viewopt.hxx>
 
-#include <app.hrc>
 #include <strings.hrc>
 #include <cmdid.h>
-#include <globals.hrc>
 #include <unobaseclass.hxx>
 
 #define ShellClass_SwTableShell
diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx
index c495e9b1b7aa..0303576e2fd6 100644
--- a/sw/source/uibase/shells/textdrw.cxx
+++ b/sw/source/uibase/shells/textdrw.cxx
@@ -37,8 +37,6 @@
 #include <svl/urihelper.hxx>
 #include <avmedia/mediawindow.hxx>
 
-#include <unomid.h>
-
 using namespace ::com::sun::star;
 
 void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget, const OUString& rText)
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index c65d5d65da6a..a025187c8d75 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -19,18 +19,14 @@
 
 #include <AnnotationWin.hxx>
 #include <comphelper/lok.hxx>
-#include <chrdlgmodes.hxx>
 #include <hintids.hxx>
 #include <IDocumentFieldsAccess.hxx>
-#include <editeng/eeitem.hxx>
-#include <editeng/kernitem.hxx>
-#include <editeng/outliner.hxx>
+#include <sfx2/bindings.hxx>
 #include <sfx2/lnkbase.hxx>
 #include <fmtfld.hxx>
 #include <txtfld.hxx>
 #include <svl/itempool.hxx>
 #include <tools/lineend.hxx>
-#include <unotools/useroptions.hxx>
 #include <svl/whiter.hxx>
 #include <svl/eitem.hxx>
 #include <svl/macitem.hxx>
@@ -39,45 +35,27 @@
 #include <svx/postattr.hxx>
 #include <svx/hlnkitem.hxx>
 #include <svx/svxdlg.hxx>
-#include <svx/svxids.hrc>
-#include <sfx2/linkmgr.hxx>
-#include <unotools/localedatawrapper.hxx>
-#include <sfx2/dispatch.hxx>
 #include <fmtinfmt.hxx>
 #include <fldwrap.hxx>
 #include <redline.hxx>
 #include <view.hxx>
 #include <viewopt.hxx>
 #include <wrtsh.hxx>
-#include <basesh.hxx>
-#include <flddat.hxx>
-#include <numrule.hxx>
 #include <textsh.hxx>
-#include <docsh.hxx>
 #include <docufld.hxx>
-#include <usrfld.hxx>
 #include <ddefld.hxx>
-#include <expfld.hxx>
 #include <fldmgr.hxx>
 #include <uitool.hxx>
 #include <cmdid.h>
 #include <strings.hrc>
-#include <sfx2/app.hxx>
-#include <svx/dialogs.hrc>
 #include <sfx2/event.hxx>
 #include <swabstdlg.hxx>
 #include <doc.hxx>
-#include <app.hrc>
-#include <edtwin.hxx>
 #include <PostItMgr.hxx>
-#include <cstddef>
-#include <memory>
 #include <swmodule.hxx>
-#include <MarkManager.hxx>
 #include <xmloff/odffields.hxx>
 #include <IDocumentContentOperations.hxx>
 #include <IDocumentUndoRedo.hxx>
-#include <svx/numfmtsh.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/zformat.hxx>
 #include <IMark.hxx>
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index 53b5fa1969f2..8247dbdbfbb9 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -20,9 +20,7 @@
 #include <hintids.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/viewfrm.hxx>
-#include <svl/stritem.hxx>
 #include <svl/eitem.hxx>
-#include <svx/svxids.hrc>
 #include <editeng/sizeitem.hxx>
 #include <fmtfsize.hxx>
 #include <fldbas.hxx>
@@ -31,14 +29,10 @@
 #include <cmdid.h>
 #include <view.hxx>
 #include <wrtsh.hxx>
-#include <swundo.hxx>
 #include <textsh.hxx>
 #include <idxmrk.hxx>
-#include <cnttab.hxx>
 #include <toxmgr.hxx>
 #include <swabstdlg.hxx>
-#include <globals.hrc>
-#include <memory>
 
 void SwTextShell::ExecIdx(SfxRequest const &rReq)
 {
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 35e589e3b961..ef1341d078bc 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -22,35 +22,24 @@
 #include <hintids.hxx>
 #include <comphelper/string.hxx>
 #include <svl/globalnameitem.hxx>
-#include <svl/ownlist.hxx>
+#include <sfx2/bindings.hxx>
 #include <sfx2/frmdescr.hxx>
 #include <sfx2/objface.hxx>
-#include <sfx2/lnkbase.hxx>
 #include <sfx2/viewfrm.hxx>
 
-#include <vcl/errinf.hxx>
-#include <svx/svdview.hxx>
-#include <svx/svxids.hrc>
+#include <i18nutil/transliteration.hxx>
+#include <svl/eitem.hxx>
 #include <svl/ptitem.hxx>
 #include <svl/stritem.hxx>
 #include <unotools/moduleoptions.hxx>
-#include <sfx2/fcontnr.hxx>
 #include <svx/hlnkitem.hxx>
-#include <svl/srchitem.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/docfile.hxx>
-#include <svl/urihelper.hxx>
-#include <basic/sbxvar.hxx>
 #include <svl/whiter.hxx>
 #include <sfx2/request.hxx>
-#include <editeng/opaqitem.hxx>
 #include <editeng/fontitem.hxx>
-#include <editeng/adjustitem.hxx>
 #include <editeng/boxitem.hxx>
 #include <editeng/sizeitem.hxx>
 #include <editeng/svxacorr.hxx>
 #include <editeng/scripttypeitem.hxx>
-#include <vcl/graphicfilter.hxx>
 #include <sfx2/htmlmode.hxx>
 #include <svtools/htmlcfg.hxx>
 #include <com/sun/star/embed/Aspects.hpp>
@@ -61,7 +50,6 @@
 #include <wdocsh.hxx>
 #include <fmtinfmt.hxx>
 #include <fmtclds.hxx>
-#include <fmtsrnd.hxx>
 #include <fmtfsize.hxx>
 #include <swmodule.hxx>
 #include <wrtsh.hxx>
@@ -77,36 +65,24 @@
 #include <frmfmt.hxx>
 #include <tablemgr.hxx>
 #include <swundo.hxx>
-#include <shellio.hxx>
-#include <frmdlg.hxx>
-#include <usrpref.hxx>
-#include <swtable.hxx>
-#include <tblafmt.hxx>
-#include <caption.hxx>
-#include <idxmrk.hxx>
-#include <poolfmt.hxx>
 #include <breakit.hxx>
-#include <modcfg.hxx>
-#include <column.hxx>
 #include <edtwin.hxx>
 #include <strings.hrc>
-#include <swerror.h>
 #include <unochart.hxx>
-#include <tgrditem.hxx>
 #include <chartins.hxx>
+#include <viewopt.hxx>
 
 #define ShellClass_SwTextShell
 #include <sfx2/msg.hxx>
 #include <vcl/EnumContext.hxx>
 #include <swslots.hxx>
 #include <SwRewriter.hxx>
+#include <SwCapObjType.hxx>
 
 using namespace ::com::sun::star;
 
 #include <svx/svxdlg.hxx>
-#include <svx/dialogs.hrc>
 #include <swabstdlg.hxx>
-#include <unomid.h>
 #include <IDocumentDrawModelAccess.hxx>
 #include <drawdoc.hxx>
 #include <svtools/embedhlp.hxx>
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index a8e329b806b4..104bd7dbf999 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -22,29 +22,21 @@
 
 #include <hintids.hxx>
 #include <cmdid.h>
-#include <helpids.h>
 #include <comphelper/lok.hxx>
 
 #include <i18nutil/unicode.hxx>
 #include <i18nlangtag/languagetag.hxx>
-#include <svl/languageoptions.hxx>
-#include <editeng/langitem.hxx>
 #include <svtools/langtab.hxx>
 #include <svl/slstitm.hxx>
-#include <svl/grabbagitem.hxx>
-#include <string.h>
 #include <svl/stritem.hxx>
 #include <sfx2/htmlmode.hxx>
 #include <svl/whiter.hxx>
 #include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/objitem.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <vcl/unohelp2.hxx>
 #include <vcl/weld.hxx>
 #include <sfx2/request.hxx>
 #include <svl/eitem.hxx>
-#include <svl/macitem.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/colritem.hxx>
 #include <editeng/tstpitem.hxx>
@@ -55,39 +47,26 @@
 #include <IDocumentDrawModelAccess.hxx>
 #include <IDocumentSettingAccess.hxx>
 #include <charfmt.hxx>
-#include <editeng/fontitem.hxx>
 #include <svx/SmartTagItem.hxx>
 #include <fmtinfmt.hxx>
-#include <swwait.hxx>
 #include <wrtsh.hxx>
 #include <wview.hxx>
 #include <swmodule.hxx>
 #include <viewopt.hxx>
 #include <uitool.hxx>
-#include <swevent.hxx>
-#include <pagedesc.hxx>
 #include <textsh.hxx>
 #include <IMark.hxx>
 #include <swdtflvr.hxx>
-#include <docstat.hxx>
-#include <outline.hxx>
-#include <tablemgr.hxx>
 #include <swundo.hxx>
 #include <reffld.hxx>
 #include <docsh.hxx>
-#include <mdiexp.hxx>
 #include <inputwin.hxx>
 #include <chrdlgmodes.hxx>
-#include <pardlg.hxx>
-#include <frmatr.hxx>
 #include <fmtcol.hxx>
 #include <cellatr.hxx>
 #include <edtwin.hxx>
-#include <redlndlg.hxx>
 #include <fldmgr.hxx>
-#include <globals.hrc>
 #include <strings.hrc>
-#include <app.hrc>
 #include <paratr.hxx>
 #include <vcl/svapp.hxx>
 #include <sfx2/app.hxx>
@@ -95,34 +74,26 @@
 #include <SwSmartTagMgr.hxx>
 #include <editeng/acorrcfg.hxx>
 #include <swabstdlg.hxx>
-#include <IDocumentStatistics.hxx>
 #include <sfx2/sfxdlg.hxx>
-#include <unotools/lingucfg.hxx>
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
-#include <com/sun/star/util/XChangesBatch.hpp>
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/linguistic2/ProofreadingResult.hpp>
 #include <com/sun/star/linguistic2/XDictionary.hpp>
 #include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
 #include <editeng/unolingu.hxx>
-#include <unotools/syslocaleoptions.hxx>
 #include <doc.hxx>
 #include <drawdoc.hxx>
 #include <view.hxx>
-#include <ndtxt.hxx>
 #include <pam.hxx>
 #include <sfx2/objface.hxx>
 #include <langhelper.hxx>
 #include <uiitems.hxx>
-#include <tools/diagnose_ex.h>
 #include <svx/nbdtmgfact.hxx>
 #include <svx/nbdtmg.hxx>
 #include <SwRewriter.hxx>
-#include <svx/svdmodel.hxx>
 #include <svx/drawitem.hxx>
-#include <svx/svxids.hrc>
 #include <numrule.hxx>
 #include <memory>
 #include <xmloff/odffields.hxx>
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index 1dbcf1639fc2..0438d42aa3b1 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -17,12 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <cstdarg>
-
-#include <svl/eitem.hxx>
-#include <svl/whiter.hxx>
-#include <sfx2/event.hxx>
-#include <sfx2/dispatch.hxx>
+#include <sfx2/bindings.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svl/stritem.hxx>
 #include <svl/itemset.hxx>
@@ -43,14 +38,8 @@
 #include <wrtsh.hxx>
 #include <swtypes.hxx>
 #include <cmdid.h>
-#include <swevent.hxx>
 #include <textsh.hxx>
 #include <swabstdlg.hxx>
-#include <dbui.hrc>
-
-#include <unomid.h>
-
-#include <memory>
 
 using namespace ::svx;
 using namespace ::com::sun::star;
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index c7fb5cc28965..839e7f760e47 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -21,9 +21,7 @@
 
 #include <svl/whiter.hxx>
 #include <svl/stritem.hxx>
-#include <svl/itemiter.hxx>
 #include <svl/ctloptions.hxx>
-#include <svx/svxids.hrc>
 #include <swmodule.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/request.hxx>
@@ -39,16 +37,13 @@
 #include <editeng/frmdiritem.hxx>
 #include <editeng/cmapitem.hxx>
 #include <paratr.hxx>
-#include <comphelper/lok.hxx>
 
 #include <fmtinfmt.hxx>
-#include <docsh.hxx>
 #include <wrtsh.hxx>
 #include <view.hxx>
 #include <viewopt.hxx>
 #include <uitool.hxx>
 #include <textsh.hxx>
-#include <num.hxx>
 #include <swundo.hxx>
 #include <fmtcol.hxx>
 
@@ -56,7 +51,6 @@
 #include <globals.h>
 #include <SwStyleNameMapper.hxx>
 #include <swabstdlg.hxx>
-#include <outline.hxx>
 #include <memory>
 
 const sal_uInt32 nFontInc = 40;      // 2pt
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index 17f8d74c6042..4ca50d6dab4e 100644
--- a/sw/source/uibase/shells/txtcrsr.cxx
+++ b/sw/source/uibase/shells/txtcrsr.cxx
@@ -23,27 +23,22 @@
 
 #include <sfx2/request.hxx>
 #include <svl/eitem.hxx>
-#include <basic/sbxvar.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/bindings.hxx>
 
 #include <view.hxx>
 #include <wrtsh.hxx>
 #include <textsh.hxx>
-#include <num.hxx>
 #include <edtwin.hxx>
 #include <doc.hxx>
 #include <docsh.hxx>
 
 #include <cmdid.h>
-#include <globals.h>
 #include <globals.hrc>
 
 #include <svx/svdouno.hxx>
 #include <svx/fmshell.hxx>
 #include <svx/sdrobjectfilter.hxx>
-#include <svx/svxids.hrc>
-#include <outline.hxx>
 
 using namespace ::com::sun::star;
 
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 91efc3e2b8bc..3b2fb5ab1457 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <hintids.hxx>
 #include <sfx2/request.hxx>
 #include <svl/eitem.hxx>
 #include <svl/stritem.hxx>
@@ -32,14 +31,11 @@
 #include <wdocsh.hxx>
 #include <poolfmt.hxx>
 #include <textsh.hxx>
-#include <uiitems.hxx>
 #include <swabstdlg.hxx>
 #include <SwStyleNameMapper.hxx>
-#include <globals.hrc>
 #include <sfx2/tabdlg.hxx>
 #include <svx/nbdtmg.hxx>
 #include <svx/nbdtmgfact.hxx>
-#include <svx/svxids.hrc>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/bindings.hxx>
 #include <memory>
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx
index 5ad207982059..6532472e5a9e 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -21,16 +21,12 @@
 #include "PageColumnControl.hxx"
 
 #include <cmdid.h>
-#include <swtypes.hxx>
 
-#include <svx/sidebar/ValueSetWithTextControl.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <svl/intitem.hxx>
-#include <vcl/settings.hxx>
 #include <svx/pageitem.hxx>
-#include <svx/svxids.hrc>
 
 namespace sw { namespace sidebar {
 
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.cxx b/sw/source/uibase/sidebar/PageFooterPanel.cxx
index a08e527d158e..b9d60703b6ba 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.cxx
@@ -17,22 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #include <sal/config.h>
-#include <swtypes.hxx>
 #include <svl/intitem.hxx>
 #include <svl/eitem.hxx>
-#include <editeng/sizeitem.hxx>
-#include <editeng/paperinf.hxx>
-#include <svx/svxids.hrc>
 #include <svx/dlgutil.hxx>
 #include <svx/rulritem.hxx>
 #include <svx/svdtrans.hxx>
 #include "PageFooterPanel.hxx"
-#include <sfx2/sidebar/ControlFactory.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/bindings.hxx>
-#include <sfx2/viewsh.hxx>
-#include <sfx2/objsh.hxx>
-#include <uitool.hxx>
 #include <cmdid.h>
 
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 5ffc7f2f7eeb..8a237f049ced 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -22,23 +22,18 @@
 #include <svl/intitem.hxx>
 #include <editeng/sizeitem.hxx>
 #include <editeng/paperinf.hxx>
-#include <svx/svxids.hrc>
 #include <svx/dlgutil.hxx>
 #include <svx/rulritem.hxx>
 #include <svx/svdtrans.hxx>
 #include "PageFormatPanel.hxx"
 #include "PageMarginUtils.hxx"
-#include <sfx2/sidebar/ControlFactory.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/module.hxx>
-#include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <pageformatpanel.hrc>
 #include <cmdid.h>
-#include <uitool.hxx>
-#include <svtools/unitconv.hxx>
 #include <svtools/optionsdrawinglayer.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <vcl/settings.hxx>
diff --git a/sw/source/uibase/sidebar/PageHeaderPanel.cxx b/sw/source/uibase/sidebar/PageHeaderPanel.cxx
index f0c06d5511f4..ffa0e2f07272 100644
--- a/sw/source/uibase/sidebar/PageHeaderPanel.cxx
+++ b/sw/source/uibase/sidebar/PageHeaderPanel.cxx
@@ -17,22 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #include <sal/config.h>
-#include <swtypes.hxx>
 #include <svl/intitem.hxx>
 #include <svl/eitem.hxx>
-#include <editeng/sizeitem.hxx>
-#include <editeng/paperinf.hxx>
-#include <svx/svxids.hrc>
 #include <svx/dlgutil.hxx>
 #include <svx/rulritem.hxx>
 #include <svx/svdtrans.hxx>
 #include "PageHeaderPanel.hxx"
-#include <sfx2/sidebar/ControlFactory.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/bindings.hxx>
-#include <sfx2/viewsh.hxx>
-#include <sfx2/objsh.hxx>
-#include <uitool.hxx>
 #include <cmdid.h>
 
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 4d66d901569a..69aa012d7340 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -20,8 +20,6 @@
 #include <memory>
 #include <sal/config.h>
 
-#include <cstdlib>
-
 #include "PageMarginControl.hxx"
 #include <strings.hrc>
 
@@ -30,7 +28,6 @@
 #include <sfx2/dispatch.hxx>
 #include <sfx2/module.hxx>
 #include <sfx2/viewfrm.hxx>
-#include <svx/svxids.hrc>
 #include <svx/pageitem.hxx>
 #include <svx/rulritem.hxx>
 #include <svl/itempool.hxx>
@@ -45,8 +42,6 @@
 #include <com/sun/star/beans/NamedValue.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
 
-#include <vcl/settings.hxx>
-
 #define SWPAGE_LEFT_GVALUE      "Sw_Page_Left"
 #define SWPAGE_RIGHT_GVALUE     "Sw_Page_Right"
 #define SWPAGE_TOP_GVALUE       "Sw_Page_Top"
diff --git a/sw/source/uibase/sidebar/PageMarginPopup.cxx b/sw/source/uibase/sidebar/PageMarginPopup.cxx
index 91536cce9470..29a27c3106d8 100644
--- a/sw/source/uibase/sidebar/PageMarginPopup.cxx
+++ b/sw/source/uibase/sidebar/PageMarginPopup.cxx
@@ -18,7 +18,6 @@
  */
 #include <PageMarginPopup.hxx>
 #include "PageMarginControl.hxx"
-#include <svx/pageitem.hxx>
 #include <vcl/toolbox.hxx>
 
 SFX_IMPL_TOOLBOX_CONTROL(PageMarginPopup, SfxVoidItem);
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx
index 9d9caa418b1d..14403f660a80 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.cxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx
@@ -23,11 +23,9 @@
 #include <com/sun/star/document/XUndoManagerSupplier.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
 
-#include <swtypes.hxx>
 #include <sfx2/viewsh.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewfrm.hxx>
-#include <svx/svxids.hrc>
 #include <cmdid.h>
 
 namespace {
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index ae224e062925..cd38ccf29953 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -21,8 +21,6 @@
 #include "PageSizeControl.hxx"
 
 #include <cmdid.h>
-#include <swtypes.hxx>
-#include <svx/svxids.hrc>
 #include <svx/pageitem.hxx>
 #include <svx/sidebar/ValueSetWithTextControl.hxx>
 
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index dfb4bf41099f..4ca5ba227d42 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -17,14 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #include <sal/config.h>
-#include <swtypes.hxx>
 #include <svl/intitem.hxx>
-#include <editeng/sizeitem.hxx>
-#include <editeng/paperinf.hxx>
-#include <svx/svxids.hrc>
 #include <svx/colorbox.hxx>
-#include <svx/dlgutil.hxx>
-#include <svx/rulritem.hxx>
 #include <svx/drawitem.hxx>
 #include <svx/xfillit0.hxx>
 #include <svx/xflclit.hxx>
@@ -33,10 +27,8 @@
 #include <svx/xbtmpit.hxx>
 #include <svx/SvxNumOptionsTabPageHelper.hxx>
 #include "PageStylesPanel.hxx"
-#include <sfx2/sidebar/ControlFactory.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/bindings.hxx>
-#include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
 #include <cmdid.h>
 
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index 2e83338d6f1a..add7d794ccf7 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -12,25 +12,13 @@
 
 #include "StylePresetsPanel.hxx"
 
-#include <swtypes.hxx>
-#include <cmdid.h>
-
-#include <svl/intitem.hxx>
-#include <svx/svxids.hrc>
-#include <svx/dlgutil.hxx>
-#include <svx/rulritem.hxx>
 #include <vcl/image.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/svapp.hxx>
 
-#include <sfx2/sidebar/ControlFactory.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/StylePreviewRenderer.hxx>
 
-#include <com/sun/star/frame/DocumentTemplates.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 
 #include <sfx2/doctempl.hxx>
@@ -38,7 +26,6 @@
 #include <shellio.hxx>
 #include <docsh.hxx>
 
-#include <comphelper/documentconstants.hxx>
 #include <sfx2/docfile.hxx>
 
 namespace sw { namespace sidebar {
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index 4c7f28e1753e..91697e1d7ad0 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -31,10 +31,8 @@
 #include <redlndlg.hxx>
 
 #include <sfx2/sidebar/SidebarPanelBase.hxx>
-#include <sfx2/sfxbasecontroller.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <vcl/window.hxx>
-#include <rtl/ref.hxx>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <comphelper/namedvaluecollection.hxx>
 #include <cppuhelper/compbase.hxx>
diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx
index c8c0bf0cec55..a363fc6bddf3 100644
--- a/sw/source/uibase/sidebar/TableEditPanel.cxx
+++ b/sw/source/uibase/sidebar/TableEditPanel.cxx
@@ -18,7 +18,6 @@
 #include <svtools/unitconv.hxx>
 #include <swmodule.hxx>
 #include <usrpref.hxx>
-#include <svx/svxids.hrc>
 
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index d2f6e64cd08b..88c8239ee7b6 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -12,25 +12,11 @@
 
 #include "ThemePanel.hxx"
 
-#include <swtypes.hxx>
-#include <cmdid.h>
-
-#include <svl/intitem.hxx>
-#include <svx/svxids.hrc>
-#include <svx/dlgutil.hxx>
-#include <svx/rulritem.hxx>
-
-#include <sfx2/sidebar/ControlFactory.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
 
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 
 #include <editeng/fontitem.hxx>
-#include <editeng/boxitem.hxx>
-#include <editeng/borderline.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/virdev.hxx>
 #include <charatr.hxx>
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index f87afb188735..5475806390e7 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -20,16 +20,12 @@
 #include "WrapPropertyPanel.hxx"
 
 #include <cmdid.h>
-#include <swtypes.hxx>
 #include <svx/spacinglistbox.hxx>
-#include <svx/svxids.hrc>
 #include <svx/svdtrans.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
-#include <sfx2/sidebar/ControlFactory.hxx>
 #include <svl/eitem.hxx>
 #include <vcl/commandinfoprovider.hxx>
-#include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/ulspitem.hxx>
diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx
index c83cc1982986..b9e5f1e5103b 100644
--- a/sw/source/uibase/table/chartins.cxx
+++ b/sw/source/uibase/table/chartins.cxx
@@ -19,12 +19,9 @@
 
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/dispatch.hxx>
-#include <sfx2/basedlgs.hxx>
 #include <IDocumentUndoRedo.hxx>
 #include <IDocumentChartDataProviderAccess.hxx>
 
-#include <sfx2/app.hxx>
-#include <swtypes.hxx>
 #include <swmodule.hxx>
 #include <wrtsh.hxx>
 #include <docsh.hxx>
@@ -32,20 +29,14 @@
 #include <chartins.hxx>
 #include <tablemgr.hxx>
 #include <frmfmt.hxx>
-#include <swtable.hxx>
-#include <tblsel.hxx>
 #include <unochart.hxx>
-#include <doc.hxx>
 
 #include <edtwin.hxx>
 
 #include <cmdid.h>
 #include <anchoredobject.hxx>
 
-#include <comphelper/classids.hxx>
-
 #include <cppuhelper/bootstrap.hxx>
-#include <cppuhelper/component_context.hxx>
 #include <comphelper/propertysequence.hxx>
 #include <com/sun/star/awt/Point.hpp>
 #include <com/sun/star/awt/Size.hpp>
diff --git a/sw/source/uibase/table/swtablerep.cxx b/sw/source/uibase/table/swtablerep.cxx
index 78248cf00b9e..97e8522335a2 100644
--- a/sw/source/uibase/table/swtablerep.cxx
+++ b/sw/source/uibase/table/swtablerep.cxx
@@ -17,37 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <hintids.hxx>
-#include <svl/stritem.hxx>
-#include <svl/intitem.hxx>
-#include <editeng/keepitem.hxx>
-#include <editeng/formatbreakitem.hxx>
-#include <editeng/ulspitem.hxx>
-#include <editeng/frmdiritem.hxx>
-#include <svl/ctloptions.hxx>
-#include <swmodule.hxx>
-#include <fmtornt.hxx>
-#include <fmtpdsc.hxx>
-#include <fmtlsplt.hxx>
-
-#include <svtools/htmlcfg.hxx>
-#include <fmtrowsplt.hxx>
-#include <sfx2/htmlmode.hxx>
-
-#include <docsh.hxx>
-#include <wrtsh.hxx>
-#include <view.hxx>
-#include <viewopt.hxx>
-#include <uitool.hxx>
-#include <frmatr.hxx>
-
+#include <tabcol.hxx>
 #include "tablepg.hxx"
-#include <tablemgr.hxx>
-#include <pagedesc.hxx>
-#include <poolfmt.hxx>
-#include <SwStyleNameMapper.hxx>
 
-#include <cmdid.h>
 #include <swtablerep.hxx>
 #include <memory>
 
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index 313cec6df5de..77adc6b2e716 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -25,28 +25,21 @@
 #include <com/sun/star/embed/EmbedVerbs.hpp>
 #include <com/sun/star/embed/XComponentSupplier.hpp>
 
-#include <sot/storage.hxx>
 #include <comphelper/classids.hxx>
 #include <svx/charthelper.hxx>
 #include <svtools/embedhlp.hxx>
 
 #include <edtwin.hxx>
 #include <wrtsh.hxx>
-#include <cmdid.h>
-#include <frmatr.hxx>
 #include <view.hxx>
-#include <basesh.hxx>
 #include <swundo.hxx>
 #include <tablemgr.hxx>
 #include <frmfmt.hxx>
-#include <instable.hxx>
-#include <swerror.h>
 #include <swabstdlg.hxx>
 #include <swcli.hxx>
 #include <docsh.hxx>
 #include <unotbl.hxx>
 #include <unochart.hxx>
-#include <memory>
 
 #include <comphelper/lok.hxx>
 


More information about the Libreoffice-commits mailing list