[Libreoffice-commits] core.git: basctl/source chart2/source cui/source dbaccess/qa dbaccess/source editeng/source formula/source include/IwyuFilter_include.yaml include/sfx2 include/svx oox/source sc/inc sc/qa scripting/source sc/source sd/source sfx2/inc sfx2/source starmath/source svx/source sw/source writerfilter/source writerperfect/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 25 12:42:56 UTC 2019


 basctl/source/basicide/IDEComboBox.cxx                  |    2 +
 basctl/source/basicide/basdoc.hxx                       |    1 
 basctl/source/basicide/baside2.cxx                      |    1 
 basctl/source/basicide/baside2b.cxx                     |    1 
 basctl/source/basicide/baside3.cxx                      |    1 
 basctl/source/basicide/basides1.cxx                     |    1 
 basctl/source/basicide/basides2.cxx                     |    1 
 basctl/source/basicide/basides3.cxx                     |    1 
 basctl/source/basicide/basidesh.cxx                     |    1 
 basctl/source/basicide/basobj3.cxx                      |    2 +
 basctl/source/basicide/bastype2.cxx                     |    2 +
 basctl/source/basicide/bastypes.cxx                     |    1 
 basctl/source/basicide/brkdlg.cxx                       |    1 
 basctl/source/basicide/localizationmgr.cxx              |    1 
 basctl/source/basicide/macrodlg.cxx                     |    3 +
 basctl/source/basicide/moduldl2.cxx                     |    2 +
 basctl/source/basicide/moduldlg.cxx                     |    2 +
 basctl/source/basicide/scriptdocument.cxx               |    2 +
 basctl/source/dlged/managelang.cxx                      |    1 
 chart2/source/controller/dialogs/dlg_NumberFormat.hxx   |    1 
 cui/source/dialogs/SpellDialog.cxx                      |    1 
 cui/source/options/treeopt.cxx                          |    1 
 dbaccess/qa/extras/dialog-save.cxx                      |    1 
 dbaccess/qa/extras/empty-stdlib-save.cxx                |    1 
 dbaccess/qa/extras/nolib-save.cxx                       |    1 
 dbaccess/source/core/inc/ModelImpl.hxx                  |    1 
 dbaccess/source/ui/dlg/dbfindex.cxx                     |    1 
 editeng/source/editeng/impedit2.cxx                     |    1 
 formula/source/ui/dlg/funcpage.cxx                      |    1 
 include/IwyuFilter_include.yaml                         |   18 +++++++++
 include/sfx2/DocumentMetadataAccess.hxx                 |    5 +-
 include/sfx2/DocumentSigner.hxx                         |   12 ++++--
 include/sfx2/app.hxx                                    |   29 +++-----------
 include/sfx2/basedlgs.hxx                               |    5 --
 include/sfx2/bindings.hxx                               |   16 ++++----
 include/sfx2/brokenpackageint.hxx                       |    7 ++-
 include/sfx2/charmapcontrol.hxx                         |    3 -
 include/sfx2/charmappopup.hxx                           |    2 -
 include/sfx2/charwin.hxx                                |    2 -
 include/sfx2/childwin.hxx                               |    9 +---
 include/sfx2/classificationhelper.hxx                   |   10 +----
 include/sfx2/ctrlitem.hxx                               |    5 --
 include/sfx2/dialoghelper.hxx                           |    1 
 include/sfx2/dinfdlg.hxx                                |    3 -
 include/sfx2/dispatch.hxx                               |   22 -----------
 include/sfx2/docfac.hxx                                 |    7 ---
 include/sfx2/docfile.hxx                                |   32 ++++++----------
 include/sfx2/docfilt.hxx                                |    8 +---
 include/sfx2/docinf.hxx                                 |    4 +-
 include/sfx2/docinsert.hxx                              |    2 -
 include/sfx2/dockwin.hxx                                |    5 +-
 include/sfx2/docmacromode.hxx                           |   10 +++--
 include/sfx2/doctempl.hxx                               |    2 -
 include/svx/ClassificationCommon.hxx                    |    1 
 include/svx/srchdlg.hxx                                 |    1 
 oox/source/export/drawingml.cxx                         |    1 
 sc/inc/filtuno.hxx                                      |    2 +
 sc/qa/extras/scddelinkobj.cxx                           |    1 
 sc/qa/extras/scddelinksobj.cxx                          |    1 
 sc/source/core/data/validat.cxx                         |    1 
 sc/source/core/tool/compiler.cxx                        |    1 
 sc/source/ui/cctrl/cbnumberformat.cxx                   |    1 
 sc/source/ui/docshell/impex.cxx                         |    1 
 sc/source/ui/drawfunc/drawsh.cxx                        |    1 
 sc/source/ui/drawfunc/fusel.cxx                         |    1 
 sc/source/ui/inc/navipi.hxx                             |    1 
 sc/source/ui/miscdlgs/anyrefdg.cxx                      |    1 
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx         |    1 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx    |    1 
 sc/source/ui/sidebar/CellBorderStyleControl.cxx         |    1 
 sc/source/ui/sidebar/CellLineStyleControl.cxx           |    1 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx      |    1 
 sc/source/ui/unoobj/docuno.cxx                          |    1 
 sc/source/ui/unoobj/scdetect.cxx                        |    1 
 sc/source/ui/unoobj/styleuno.cxx                        |    1 
 sc/source/ui/unoobj/warnpassword.cxx                    |    1 
 sc/source/ui/view/prevwsh.cxx                           |    1 
 sc/source/ui/view/tabview5.cxx                          |    1 
 sc/source/ui/view/tabvwsh5.cxx                          |    1 
 sc/source/ui/view/viewutil.cxx                          |    1 
 scripting/source/dlgprov/dlgprov.cxx                    |    1 
 sd/source/ui/animations/CustomAnimationPane.cxx         |    1 
 sd/source/ui/app/tmplctrl.cxx                           |    1 
 sd/source/ui/dlg/LayerTabBar.cxx                        |    1 
 sd/source/ui/dlg/NavigatorChildWindow.cxx               |    1 
 sd/source/ui/framework/factories/ChildWindowPane.cxx    |    1 
 sd/source/ui/func/fubullet.cxx                          |    1 
 sd/source/ui/func/fuformatpaintbrush.cxx                |    1 
 sd/source/ui/inc/SpellDialogChildWindow.hxx             |    1 
 sd/source/ui/inc/animobjs.hxx                           |    1 
 sd/source/ui/sidebar/MasterPagesSelector.cxx            |    1 
 sd/source/ui/slideshow/slideshowimpl.cxx                |    1 
 sd/source/ui/unoidl/sddetect.cxx                        |    1 
 sd/source/ui/view/ViewShellImplementation.cxx           |    1 
 sd/source/ui/view/ViewShellManager.cxx                  |    1 
 sd/source/ui/view/outlnvsh.cxx                          |    1 
 sd/source/ui/view/outlview.cxx                          |    1 
 sd/source/ui/view/presvish.cxx                          |    1 
 sd/source/ui/view/sdview4.cxx                           |    1 
 sfx2/inc/preventduplicateinteraction.hxx                |    1 
 sfx2/inc/saveastemplatedlg.hxx                          |    2 +
 sfx2/source/appl/app.cxx                                |    1 
 sfx2/source/appl/appinit.cxx                            |    1 
 sfx2/source/appl/appserv.cxx                            |    1 
 sfx2/source/appl/appuno.cxx                             |    1 
 sfx2/source/appl/fileobj.cxx                            |    2 +
 sfx2/source/appl/sfxpicklist.cxx                        |    1 
 sfx2/source/appl/shutdownicon.cxx                       |    2 -
 sfx2/source/appl/shutdowniconaqua.mm                    |    1 
 sfx2/source/control/charwin.cxx                         |    2 +
 sfx2/source/control/recentdocsview.cxx                  |    1 
 sfx2/source/control/templatedefaultview.cxx             |    1 
 sfx2/source/dialog/filedlghelper.cxx                    |    3 +
 sfx2/source/dialog/infobar.cxx                          |    1 
 sfx2/source/dialog/mgetempl.cxx                         |    1 
 sfx2/source/dialog/navigat.cxx                          |    1 
 sfx2/source/dialog/recfloat.cxx                         |    2 +
 sfx2/source/dialog/titledockwin.cxx                     |    1 
 sfx2/source/dialog/tplcitem.cxx                         |    1 
 sfx2/source/dialog/versdlg.cxx                          |    1 
 sfx2/source/doc/docfile.cxx                             |    1 
 sfx2/source/doc/docmacromode.cxx                        |    2 +
 sfx2/source/doc/doctemplates.cxx                        |    1 
 sfx2/source/doc/objstor.cxx                             |    1 
 sfx2/source/doc/saveastemplatedlg.cxx                   |    1 
 sfx2/source/doc/sfxbasemodel.cxx                        |    1 
 sfx2/source/doc/templatedlg.cxx                         |    2 +
 sfx2/source/inc/statcach.hxx                            |    1 
 sfx2/source/sidebar/DeckTitleBar.cxx                    |    1 
 sfx2/source/sidebar/FocusManager.cxx                    |    1 
 sfx2/source/sidebar/SidebarController.cxx               |    1 
 sfx2/source/sidebar/SidebarDockingWindow.cxx            |    2 +
 sfx2/source/sidebar/TabBar.cxx                          |    1 
 sfx2/source/view/classificationcontroller.cxx           |    1 
 starmath/source/document.cxx                            |    1 
 starmath/source/mathmlexport.cxx                        |    1 
 starmath/source/smdetect.cxx                            |    1 
 svx/source/dialog/ClassificationCommon.cxx              |    1 
 svx/source/dialog/ClassificationDialog.cxx              |    1 
 svx/source/dialog/compressgraphicdialog.cxx             |    1 
 svx/source/dialog/srchdlg.cxx                           |    1 
 svx/source/dialog/svxruler.cxx                          |    2 +
 svx/source/form/databaselocationinput.cxx               |    1 
 svx/source/form/fmundo.cxx                              |    1 
 svx/source/gallery2/galbrws2.cxx                        |    1 
 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx     |    1 
 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx |    2 +
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx      |    1 
 svx/source/sidebar/paragraph/ParaSpacingWindow.cxx      |    2 +
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx     |    1 
 svx/source/sidebar/text/TextCharacterSpacingControl.cxx |    2 +
 svx/source/sidebar/text/TextUnderlineControl.cxx        |    2 +
 svx/source/stbctrls/selctrl.cxx                         |    1 
 svx/source/stbctrls/zoomctrl.cxx                        |    2 +
 svx/source/tbxctrls/colrctrl.cxx                        |    1 
 svx/source/tbxctrls/extrusioncontrols.cxx               |    1 
 svx/source/tbxctrls/fillctrl.cxx                        |    1 
 svx/source/tbxctrls/layctrl.cxx                         |    2 +
 sw/source/core/doc/docglbl.cxx                          |    2 +
 sw/source/core/edit/edfcol.cxx                          |    1 
 sw/source/core/ole/ndole.cxx                            |    1 
 sw/source/filter/basflt/iodetect.cxx                    |    1 
 sw/source/filter/xml/swxml.cxx                          |    1 
 sw/source/ui/config/optpage.cxx                         |    1 
 sw/source/ui/dialog/uiregionsw.cxx                      |    1 
 sw/source/ui/fldui/fldpage.cxx                          |    1 
 sw/source/ui/fldui/fldtdlg.cxx                          |    1 
 sw/source/ui/frmdlg/column.cxx                          |    1 
 sw/source/ui/index/swuiidxmrk.cxx                       |    1 
 sw/source/uibase/app/appenv.cxx                         |    1 
 sw/source/uibase/app/applab.cxx                         |    1 
 sw/source/uibase/app/docst.cxx                          |    1 
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx    |    1 
 sw/source/uibase/dialog/regionsw.cxx                    |    1 
 sw/source/uibase/dialog/watermarkdialog.cxx             |    2 +
 sw/source/uibase/dochdl/swdtflvr.cxx                    |    1 
 sw/source/uibase/docvw/HeaderFooterWin.cxx              |    1 
 sw/source/uibase/docvw/PageBreakWin.cxx                 |    1 
 sw/source/uibase/docvw/romenu.cxx                       |    1 
 sw/source/uibase/docvw/srcedtw.cxx                      |    1 
 sw/source/uibase/fldui/fldmgr.cxx                       |    1 
 sw/source/uibase/lingu/olmenu.cxx                       |    1 
 sw/source/uibase/ribbar/conrect.cxx                     |    1 
 sw/source/uibase/ribbar/drawbase.cxx                    |    1 
 sw/source/uibase/ribbar/dselect.cxx                     |    1 
 sw/source/uibase/shells/beziersh.cxx                    |    1 
 sw/source/uibase/shells/drawdlg.cxx                     |    1 
 sw/source/uibase/shells/drawsh.cxx                      |    1 
 sw/source/uibase/shells/drwbassh.cxx                    |    1 
 sw/source/uibase/shells/grfsh.cxx                       |    1 
 sw/source/uibase/shells/langhelper.cxx                  |    1 
 sw/source/uibase/shells/listsh.cxx                      |    1 
 sw/source/uibase/shells/tabsh.cxx                       |    1 
 sw/source/uibase/shells/textsh.cxx                      |    1 
 sw/source/uibase/shells/txtattr.cxx                     |    1 
 sw/source/uibase/sidebar/PageColumnControl.cxx          |    1 
 sw/source/uibase/sidebar/PageFormatPanel.cxx            |    1 
 sw/source/uibase/sidebar/PageMarginControl.cxx          |    1 
 sw/source/uibase/sidebar/PageOrientationControl.cxx     |    1 
 sw/source/uibase/sidebar/PageSizeControl.cxx            |    1 
 sw/source/uibase/uitest/uiobject.cxx                    |    1 
 sw/source/uibase/uiview/uivwimp.cxx                     |    1 
 sw/source/uibase/uiview/viewmdi.cxx                     |    1 
 sw/source/uibase/uiview/viewport.cxx                    |    1 
 sw/source/uibase/uiview/viewprt.cxx                     |    1 
 sw/source/uibase/uiview/viewsrch.cxx                    |    1 
 sw/source/uibase/uiview/viewtab.cxx                     |    1 
 sw/source/uibase/uno/unomodule.cxx                      |    2 +
 sw/source/uibase/uno/unotxvw.cxx                        |    1 
 sw/source/uibase/utlui/bookctrl.cxx                     |    1 
 sw/source/uibase/utlui/content.cxx                      |    1 
 sw/source/uibase/utlui/glbltree.cxx                     |    1 
 sw/source/uibase/utlui/gotodlg.cxx                      |    1 
 sw/source/uibase/utlui/navipi.cxx                       |    1 
 sw/source/uibase/utlui/tmplctrl.cxx                     |    1 
 sw/source/uibase/web/wview.cxx                          |    1 
 sw/source/uibase/wrtsh/move.cxx                         |    1 
 sw/source/uibase/wrtsh/select.cxx                       |    1 
 sw/source/uibase/wrtsh/wrtsh2.cxx                       |    1 
 sw/source/uibase/wrtsh/wrtsh3.cxx                       |    1 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx          |    2 +
 writerperfect/source/writer/WordPerfectImportFilter.cxx |    1 
 222 files changed, 314 insertions(+), 133 deletions(-)

New commits:
commit 4304226d79849b31fd0ded168cee45a91f240363
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Sun Mar 17 01:11:29 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Mar 25 13:42:28 2019 +0100

    tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*
    
    Found with bin/find-unneeded-includes
    Only removal proposals are dealt with here.
    
    Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4
    Reviewed-on: https://gerrit.libreoffice.org/69481
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/basctl/source/basicide/IDEComboBox.cxx b/basctl/source/basicide/IDEComboBox.cxx
index 4e240e988a74..b10dd7479e85 100644
--- a/basctl/source/basicide/IDEComboBox.cxx
+++ b/basctl/source/basicide/IDEComboBox.cxx
@@ -25,6 +25,8 @@
 #include <managelang.hxx>
 
 #include <sfx2/dispatch.hxx>
+#include <sfx2/frame.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <svtools/langtab.hxx>
 
 namespace basctl
diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx
index 6fbc64836e3c..f06b7cf9fe23 100644
--- a/basctl/source/basicide/basdoc.hxx
+++ b/basctl/source/basicide/basdoc.hxx
@@ -24,6 +24,7 @@
 #include <svx/ifaceids.hxx>
 #include <vcl/vclptr.hxx>
 #include <sfx2/printer.hxx>
+#include <sfx2/objsh.hxx>
 #include <memory>
 
 namespace basctl
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index a178268fea0e..d778df39a729 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -44,6 +44,7 @@
 #include <sfx2/docfile.hxx>
 #include <sfx2/printer.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <sot/exchange.hxx>
 #include <svl/aeitem.hxx>
 #include <svl/srchitem.hxx>
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 728ac019d167..db2beb883100 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -37,6 +37,7 @@
 #include <comphelper/string.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <vcl/weld.hxx>
 #include <svl/urihelper.hxx>
 #include <svx/svxids.hrc>
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index ca885f3ca67e..a5db64351238 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -43,6 +43,7 @@
 #include <comphelper/processfactory.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/aeitem.hxx>
 #include <svl/visitem.hxx>
 #include <svl/whiter.hxx>
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 54c750716630..18675fd7245e 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -44,6 +44,7 @@
 #include <sfx2/minfitem.hxx>
 #include <sfx2/printer.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/svxids.hrc>
 #include <svl/aeitem.hxx>
 #include <svl/intitem.hxx>
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 55c830fac4b6..1715afb81f98 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -30,6 +30,7 @@
 #include <vcl/textview.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/signaturestate.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <com/sun/star/container/XNamed.hpp>
 
 namespace basctl
diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx
index 8e4d1e67d30e..b9a9e21a0fa1 100644
--- a/basctl/source/basicide/basides3.cxx
+++ b/basctl/source/basicide/basides3.cxx
@@ -25,6 +25,7 @@
 #include <xmlscript/xmldlg_imexp.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <tools/diagnose_ex.h>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/uno/XComponentContext.hpp>
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index c21aa3039584..4f4739e2cc52 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -37,6 +37,7 @@
 #include <sfx2/infobar.hxx>
 #include <sfx2/minfitem.hxx>
 #include <sfx2/objface.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/aeitem.hxx>
 #include <svl/srchitem.hxx>
 
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index ca2356fa8d7a..f9b50882cff7 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -33,7 +33,9 @@
 #include <dlged.hxx>
 #include <com/sun/star/script/XLibraryContainerPassword.hpp>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <sal/log.hxx>
 #include <svtools/ehdl.hxx>
 
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 129865c4087c..2ed3e6d81804 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -32,7 +32,9 @@
 #include <com/sun/star/frame/ModuleManager.hpp>
 #include <comphelper/processfactory.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <vcl/builderfactory.hxx>
+#include <vcl/event.hxx>
 
 #include <initializer_list>
 #include <memory>
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 169ee1818bdf..6fe3475c49e8 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -30,6 +30,7 @@
 #include <sal/log.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/passwd.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <svl/intitem.hxx>
 #include <svl/stritem.hxx>
 #include <svl/srchdefs.hxx>
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index 1296d57d1673..e7132e7469ed 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -24,6 +24,7 @@
 #include <basidesh.hxx>
 
 #include <sfx2/dispatch.hxx>
+#include <sfx2/sfxsids.hrc>
 
 namespace basctl
 {
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 4310e511cc63..970307c0a6dc 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/resource/MissingResourceException.hpp>
 #include <com/sun/star/resource/XStringResourceSupplier.hpp>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <tools/debug.hxx>
 
 namespace basctl
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index ea1c467b2e5b..7105ada78f78 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -31,9 +31,12 @@
 #include <basic/sbmod.hxx>
 #include <com/sun/star/script/XLibraryContainer2.hpp>
 
+#include <sfx2/app.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/frame.hxx>
 #include <sfx2/minfitem.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <vcl/weld.hxx>
 
 #include <map>
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 5a763aa465b9..728de23842fa 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -31,6 +31,8 @@
 #include <sfx2/dispatch.hxx>
 #include <sfx2/filedlghelper.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <sfx2/viewfrm.hxx>
 #include <tools/urlobj.hxx>
 #include <tools/diagnose_ex.h>
 #include <vcl/svlbitm.hxx>
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 4aa659697d4e..4e96d7e16450 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -32,7 +32,9 @@
 #include <comphelper/processfactory.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/frame.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <svl/stritem.hxx>
 #include <vcl/builderfactory.hxx>
 #include <vcl/weld.hxx>
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index e6daf0ca6dfc..49cf31b5957b 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -32,6 +32,7 @@
 #include <com/sun/star/document/MacroExecMode.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
 #include <com/sun/star/awt/XWindow2.hpp>
 #include <com/sun/star/document/XEmbeddedScripts.hpp>
 #include <com/sun/star/script/vba/XVBACompatibility.hpp>
@@ -39,6 +40,7 @@
 #include <com/sun/star/script/ModuleInfo.hpp>
 #include <com/sun/star/script/ModuleType.hpp>
 
+#include <sfx2/app.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/docfile.hxx>
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index 1162a16ff3ed..33380b1cedec 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -32,6 +32,7 @@
 #include <comphelper/sequence.hxx>
 #include <editeng/unolingu.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <svtools/langtab.hxx>
 #include <svx/langbox.hxx>
 #include <vcl/unohelp.hxx>
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
index 6bd79a00e837..f0c69702f14e 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.hxx
@@ -23,6 +23,7 @@
 
 namespace weld { class Window; }
 class SfxItemSet;
+class SfxItemPool;
 
 namespace chart
 {
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 0d6c5c961255..01ee8ea62997 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -27,6 +27,7 @@
 #include "SpellAttrib.hxx"
 #include <sfx2/dispatch.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/undo.hxx>
 #include <unotools/lingucfg.hxx>
 #include <vcl/textdata.hxx>
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index d149d2e97975..69c18962cdcb 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -86,6 +86,7 @@
 #include <sfx2/shell.hxx>
 #include <sfx2/tplpitem.hxx>
 #include <sfx2/viewsh.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/languageoptions.hxx>
 #include <svtools/helpopt.hxx>
 #include <svtools/miscopt.hxx>
diff --git a/dbaccess/qa/extras/dialog-save.cxx b/dbaccess/qa/extras/dialog-save.cxx
index 9d67e0b45d54..bbf3b2df3481 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -30,6 +30,7 @@
 #include <sfx2/objsh.hxx>
 #include <sfx2/sfxmodelfactory.hxx>
 #include <svl/intitem.hxx>
+#include <vcl/svapp.hxx>
 
 #include <basic/sbxdef.hxx>
 
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 8e38fe03a951..3ca43b87a0fe 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -30,6 +30,7 @@
 #include <sfx2/objsh.hxx>
 #include <sfx2/sfxmodelfactory.hxx>
 #include <svl/intitem.hxx>
+#include <vcl/svapp.hxx>
 
 #include <basic/sbxdef.hxx>
 
diff --git a/dbaccess/qa/extras/nolib-save.cxx b/dbaccess/qa/extras/nolib-save.cxx
index c8c8d2ec8727..edc42869d4e9 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -30,6 +30,7 @@
 #include <sfx2/objsh.hxx>
 #include <sfx2/sfxmodelfactory.hxx>
 #include <svl/intitem.hxx>
+#include <vcl/svapp.hxx>
 
 #include <basic/sbxdef.hxx>
 
diff --git a/dbaccess/source/core/inc/ModelImpl.hxx b/dbaccess/source/core/inc/ModelImpl.hxx
index ab4276c4e5cf..0771f07b6194 100644
--- a/dbaccess/source/core/inc/ModelImpl.hxx
+++ b/dbaccess/source/core/inc/ModelImpl.hxx
@@ -39,6 +39,7 @@
 #include <com/sun/star/lang/NotInitializedException.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
 #include <com/sun/star/sdb/XBookmarksSupplier.hpp>
 #include <com/sun/star/sdb/XCompletedConnection.hpp>
 #include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index f5016d239428..734af6e961bc 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -20,6 +20,7 @@
 #include "dbfindex.hxx"
 #include <comphelper/processfactory.hxx>
 #include <osl/file.hxx>
+#include <osl/thread.hxx>
 #include <tools/config.hxx>
 #include <sfx2/app.hxx>
 #include <dbu_dlg.hxx>
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 5304855c4aa6..eb8961ced3ac 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <vcl/svapp.hxx>
 #include <vcl/window.hxx>
 #include <editeng/lspcitem.hxx>
 #include <editeng/flditem.hxx>
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index 6e1ff81e426c..ce8c23da4eff 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -22,6 +22,7 @@
 #include <svl/zforlist.hxx>
 #include <svl/stritem.hxx>
 #include <vcl/builderfactory.hxx>
+#include <vcl/event.hxx>
 #include <formula/IFunctionDescription.hxx>
 
 #include "funcpage.hxx"
diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index 71144952bc24..18363b93fbb3 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -677,3 +677,21 @@ blacklist:
     include/drawinglayer/primitive3d/baseprimitive3d.hxx:
     # base class has to be a complete type
     - com/sun/star/graphic/XPrimitive3D.hpp
+    include/sfx2/asyncfunc.hxx:
+    # base class has to be a complete type
+    - com/sun/star/lang/XUnoTunnel.hpp
+    include/sfx2/charwin.hxx:
+    # Needed for implicit dtor
+    - vcl/virdev.hxx
+    include/sfx2/dinfdlg.hxx:
+    # Needed for implicit dtor
+    - com/sun/star/document/CmisProperty.hpp
+    include/sfx2/docfile.hxx:
+    # Full type needed for template
+    - tools/link.hxx
+    include/sfx2/docstoragemodifylistener.hxx:
+    # base class has to be a complete type
+    - com/sun/star/util/XModifyListener.hpp
+    include/sfx2/DocumentMetadataAccess.hxx:
+    # base class has to be a complete type
+    - com/sun/star/rdf/XDocumentMetadataAccess.hpp
diff --git a/include/sfx2/DocumentMetadataAccess.hxx b/include/sfx2/DocumentMetadataAccess.hxx
index cf5a2ddbcbac..dd0881ad0a91 100644
--- a/include/sfx2/DocumentMetadataAccess.hxx
+++ b/include/sfx2/DocumentMetadataAccess.hxx
@@ -24,9 +24,7 @@
 
 #include <sfx2/dllapi.h>
 
-#include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
-#include <com/sun/star/rdf/XRepositorySupplier.hpp>
 
 #include <cppuhelper/implbase.hxx>
 
@@ -47,6 +45,9 @@ namespace com { namespace sun { namespace star { namespace embed {
 namespace com { namespace sun { namespace star { namespace frame {
     class XModel;
 } } } }
+
+namespace com::sun::star::uno { class XComponentContext; }
+
 class SfxObjectShell;
 
 namespace sfx2 {
diff --git a/include/sfx2/DocumentSigner.hxx b/include/sfx2/DocumentSigner.hxx
index 1f4326ef3976..8059cb9cbd24 100644
--- a/include/sfx2/DocumentSigner.hxx
+++ b/include/sfx2/DocumentSigner.hxx
@@ -13,10 +13,16 @@
 
 #include <sal/config.h>
 #include <sfx2/dllapi.h>
+#include <rtl/ustring.hxx>
 
-#include <memory>
-
-#include <com/sun/star/security/XCertificate.hpp>
+namespace com::sun::star::security
+{
+class XCertificate;
+}
+namespace com::sun::star::uno
+{
+template <typename> class Reference;
+}
 
 namespace sfx2
 {
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 2cbab66b9ec4..dce9f2c4de03 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -25,37 +25,23 @@
 #include <sal/types.h>
 #include <vcl/errcode.hxx>
 #include <svl/poolitem.hxx>
-#include <vcl/image.hxx>
-#include <com/sun/star/script/XLibraryContainer.hpp>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-
-// too many files including sfx2/app.hxx use VCL Application class but don't include the
-// header file because in former times SfxApplication was derived from it
-#include <vcl/svapp.hxx>
+#include <vcl/bitmapex.hxx>
+#include <tools/link.hxx>
 
 #include <sfx2/shell.hxx>
 
-class Timer;
-class WorkWindow;
-class ISfxTemplateCommon;
+namespace com::sun::star::script { class XLibraryContainer; }
+
+namespace weld { class Window; }
+
 class BasicManager;
 class DdeService;
-class PrinterDialog;
-class Point;
-namespace tools { class Rectangle; }
-class AppSettings;
 struct SfxChildWinContextFactory;
 class SfxAppData_Impl;
-class SfxBindings;
 class SfxChildWinFactArr_Impl;
-class SfxChildWindow;
 class SfxDispatcher;
-class SfxEventConfiguration;
 class SfxEventHint;
 class SfxItemSet;
-class SfxMedium;
-class SfxMenuCtrlFactArr_Impl;
-class SfxNewFileDialog;
 class SfxObjectShell;
 class SfxObjectShellArr_Impl;
 class SfxObjectShellLock;
@@ -65,7 +51,6 @@ class SfxStbCtrlFactArr_Impl;
 class SfxTbxCtrlFactArr_Impl;
 class SfxViewFrame;
 class SfxViewFrameArr_Impl;
-class SfxViewShell;
 class SfxViewShellArr_Impl;
 class StarBASIC;
 class SfxWorkWindow;
@@ -75,13 +60,11 @@ namespace vcl { class Window; }
 struct SfxChildWinFactory;
 struct SfxStbCtrlFactory;
 struct SfxTbxCtrlFactory;
-class ModalDialog;
 class SbxArray;
 class SbxValue;
 
 namespace sfx2
 {
-    class SvLinkSource;
     namespace sidebar {
         class Theme;
     }
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 893481e2d4d5..f58feba3cba2 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -23,23 +23,20 @@
 #include <sal/config.h>
 #include <sfx2/dllapi.h>
 #include <sal/types.h>
-#include <vcl/builder.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/floatwin.hxx>
-#include <vcl/timer.hxx>
 #include <vcl/weld.hxx>
 
-class TabPage;
 class SfxTabPage;
 class SfxBindings;
 class SfxChildWindow;
 struct SfxChildWinInfo;
 class SfxItemSet;
-class SfxItemPool;
 class OKButton;
 class CancelButton;
 class HelpButton;
 class Button;
+class Timer;
 
 // class SfxModalDialog --------------------------------------------------
 
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index 89663708cd82..33b8e4a58cac 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -27,22 +27,24 @@
 #include <o3tl/typed_flags_set.hxx>
 #include <sfx2/dllapi.h>
 #include <sal/types.h>
-#include <rtl/strbuf.hxx>
 #include <tools/link.hxx>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatchRecorder.hpp>
 #include <com/sun/star/uno/Reference.h>
-#include <sfx2/viewfrm.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/SfxBroadcaster.hxx>
+#include <sfx2/shell.hxx>
+
+namespace com::sun::star::frame { class XDispatch; }
+namespace com::sun::star::frame { class XDispatchProvider; }
+namespace com::sun::star::frame { class XDispatchRecorder; }
+namespace com::sun::star::frame { class XFrame; }
+namespace com::sun::star::util { struct URL; }
 
-class SystemWindow;
 class SfxSlot;
 class SfxSlotServer;
 class SfxControllerItem;
 class SfxStateCache;
 class SfxItemSet;
 class SfxDispatcher;
-class SfxBindings;
 class SfxBindings_Impl;
 class Timer;
 class SfxWorkWindow;
diff --git a/include/sfx2/brokenpackageint.hxx b/include/sfx2/brokenpackageint.hxx
index 64f624696bb3..5d822cba0084 100644
--- a/include/sfx2/brokenpackageint.hxx
+++ b/include/sfx2/brokenpackageint.hxx
@@ -23,9 +23,10 @@
 #include <sal/config.h>
 #include <rtl/ref.hxx>
 #include <sfx2/dllapi.h>
-#include <com/sun/star/document/BrokenPackageRequest.hpp>
-#include <com/sun/star/task/XInteractionApprove.hpp>
-#include <com/sun/star/task/XInteractionDisapprove.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+namespace com::sun::star::task { class XInteractionRequest; }
 
 class RequestPackageReparation_Impl;
 class SFX2_DLLPUBLIC RequestPackageReparation
diff --git a/include/sfx2/charmapcontrol.hxx b/include/sfx2/charmapcontrol.hxx
index 970e3fa6d1d9..9b58bdd6a4da 100644
--- a/include/sfx2/charmapcontrol.hxx
+++ b/include/sfx2/charmapcontrol.hxx
@@ -23,12 +23,11 @@
 #include <sal/config.h>
 #include <sfx2/dllapi.h>
 #include <sfx2/tbxctrl.hxx>
-#include <com/sun/star/frame/XFrame.hpp>
 #include <sfx2/charwin.hxx>
 #include <vcl/button.hxx>
 #include <deque>
 
-class SvxCharViewControl;
+namespace com::sun::star::frame { class XFrame; }
 
 class SFX2_DLLPUBLIC SfxCharmapCtrl : public SfxPopupWindow
 {
diff --git a/include/sfx2/charmappopup.hxx b/include/sfx2/charmappopup.hxx
index 30b187030ab9..98c178534fa5 100644
--- a/include/sfx2/charmappopup.hxx
+++ b/include/sfx2/charmappopup.hxx
@@ -23,8 +23,6 @@
 #include <sfx2/tbxctrl.hxx>
 #include <sfx2/dllapi.h>
 
-#include <functional>
-
 class SFX2_DLLPUBLIC CharmapPopup : public SfxToolBoxControl
 {
 public:
diff --git a/include/sfx2/charwin.hxx b/include/sfx2/charwin.hxx
index 2915c7b05ed1..9b5c070942b9 100644
--- a/include/sfx2/charwin.hxx
+++ b/include/sfx2/charwin.hxx
@@ -20,8 +20,8 @@
 #ifndef INCLUDED_SFX2_INC_CHARWIN_HXX
 #define INCLUDED_SFX2_INC_CHARWIN_HXX
 
-#include <sfx2/tbxctrl.hxx>
 #include <sfx2/dllapi.h>
+#include <vcl/ctrl.hxx>
 #include <vcl/customweld.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/weld.hxx>
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 8d99f20642de..b6a81b6ec655 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -26,20 +26,17 @@
 #include <sal/types.h>
 #include <o3tl/typed_flags_set.hxx>
 #include <vcl/window.hxx>
-#include <com/sun/star/frame/XFrame.hpp>
 
-#include <sfx2/shell.hxx>
 #include <sfx2/chalign.hxx>
 
-#include <sfx2/bindings.hxx>
-    // complete SfxBindings for complete SfxChildWinCtor, SfxChildWinContextCtor
-    // under -fsanitize=function
+namespace com::sun::star::frame { class XFrame; }
 
 class SfxWorkWindow;
 class SfxModule;
-class SfxShell;
 class SfxChildWindow;
 class SfxChildWindowContext;
+class SfxBindings;
+class SfxModelessDialogController;
 
 enum class SfxChildWindowFlags
 {
diff --git a/include/sfx2/classificationhelper.hxx b/include/sfx2/classificationhelper.hxx
index 2be662aa1a9c..3f8c2d0b997c 100644
--- a/include/sfx2/classificationhelper.hxx
+++ b/include/sfx2/classificationhelper.hxx
@@ -13,18 +13,14 @@
 #include <memory>
 #include <vector>
 
-#include <com/sun/star/document/XDocumentProperties.hpp>
-
 #include <rtl/ustring.hxx>
 #include <sfx2/dllapi.h>
 #include <sfx2/infobar.hxx>
 
-class SfxObjectShell;
+namespace com::sun::star::beans { class XPropertyContainer; }
+namespace com::sun::star::document { class XDocumentProperties; }
+
 class SfxViewFrame;
-namespace basegfx
-{
-class BColor;
-}
 
 /// Return code of SfxClassificationHelper::CheckPaste().
 enum class SfxClassificationCheckPasteResult
diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
index 78ac2d1a6fe2..7788baa952d4 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -24,13 +24,8 @@
 #include <sal/types.h>
 #include <svl/poolitem.hxx>
 #include <tools/debug.hxx>
-#if defined( DBG_UTIL )
-#include <sfx2/msg.hxx>
-#endif
 
-class SfxPoolItem;
 class SfxBindings;
-class SvStream;
 
 class SFX2_DLLPUBLIC SfxControllerItem
 {
diff --git a/include/sfx2/dialoghelper.hxx b/include/sfx2/dialoghelper.hxx
index b0d9ae5b5cfe..e60c1293192c 100644
--- a/include/sfx2/dialoghelper.hxx
+++ b/include/sfx2/dialoghelper.hxx
@@ -18,7 +18,6 @@ class DateTime;
 class LocaleDataWrapper;
 namespace vcl { class Window; }
 class OutputDevice;
-class VclBuilderContainer;
 
 //when two tab pages both have the same basic layout with a preview on the
 //right, get both of their non-preview areas to request the same size so that
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index ee1d81c9c1cb..fbe01ba61311 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -30,9 +30,6 @@
 #include <svl/zforlist.hxx>
 
 #include <vcl/headbar.hxx>
-#include <svtools/svmedit.hxx>
-
-#include <unotools/syslocale.hxx>
 
 #include <vcl/edit.hxx>
 #include <vcl/field.hxx>
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index 899957133024..14fa0a7aca2d 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -26,39 +26,19 @@
 #include <sal/types.h>
 
 #include <sfx2/bindings.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <vcl/menu.hxx>
 #include <o3tl/typed_flags_set.hxx>
 #include <o3tl/span.hxx>
 
 #include <initializer_list>
 
 class SfxSlotServer;
-class SfxShell;
 class SfxRequest;
-class SfxHintPoster;
 class SfxViewFrame;
-class SfxBindings;
 class SfxItemSet;
-class SfxPopupMenuManager;
 class SfxModule;
+class Point;
 struct SfxDispatcher_Impl;
 
-namespace com
-{
-    namespace sun
-    {
-        namespace star
-        {
-            namespace frame
-            {
-                class XDispatch;
-            }
-        }
-    }
-}
-
-
 enum class SfxDispatcherPopFlags
 {
     NONE          = 0,
diff --git a/include/sfx2/docfac.hxx b/include/sfx2/docfac.hxx
index 1efdc6f90578..84503fb0768a 100644
--- a/include/sfx2/docfac.hxx
+++ b/include/sfx2/docfac.hxx
@@ -23,19 +23,14 @@
 #include <sfx2/dllapi.h>
 #include <sal/types.h>
 
-// SFX_IMPL_MODULE_LIB
-#include <osl/module.hxx>
 #include <rtl/ustring.hxx>
-
-#include <sfx2/objsh.hxx>
+#include <sfx2/shell.hxx>
 #include <memory>
 
-class SfxMedium;
 class SfxFilter;
 class SfxViewFactory;
 struct SfxObjectFactory_Impl;
 class SfxFilterContainer;
-class SfxBindings;
 
 typedef void (*SfxVoidFunc)();
 
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 64c18b05dcf8..a8fae8409bb9 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -21,41 +21,33 @@
 #define INCLUDED_SFX2_DOCFILE_HXX
 
 #include <memory>
-#include <com/sun/star/io/XSeekable.hpp>
 #include <sal/config.h>
 #include <sfx2/dllapi.h>
 #include <sfx2/signaturestate.hxx>
 #include <svl/lockfilecommon.hxx>
 #include <sal/types.h>
-#include <com/sun/star/graphic/XGraphic.hpp>
-#include <com/sun/star/util/RevisionTag.hpp>
-#include <com/sun/star/util/DateTime.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/ucb/XContent.hpp>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <com/sun/star/security/XCertificate.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <cppuhelper/weak.hxx>
 #include <rtl/ustring.hxx>
-#include <svl/lstner.hxx>
 #include <svl/itemset.hxx>
 #include <tools/link.hxx>
 #include <tools/stream.hxx>
-#include <ucbhelper/content.hxx>
+
+namespace com::sun::star::beans { struct PropertyValue; }
+namespace com::sun::star::embed { class XStorage; }
+namespace com::sun::star::graphic { class XGraphic; }
+namespace com::sun::star::io { class XInputStream; }
+namespace com::sun::star::security { class XCertificate; }
+namespace com::sun::star::task { class XInteractionHandler; }
+namespace com::sun::star::ucb { class XCommandEnvironment; }
+namespace com::sun::star::ucb { class XContent; }
+namespace com::sun::star::util { struct DateTime; }
+namespace com::sun::star::util { struct RevisionTag; }
+namespace ucbhelper { class Content; }
 
 class SvKeyValueIterator;
-class SfxObjectFactory;
 class SfxFilter;
 class SfxMedium_Impl;
 class INetURLObject;
-class SfxObjectShell;
 class SfxFrame;
-class Timer;
 class DateTime;
 
 namespace weld
diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx
index 2cd8d5fa0fb2..393bc39e12c2 100644
--- a/include/sfx2/docfilt.hxx
+++ b/include/sfx2/docfilt.hxx
@@ -19,10 +19,6 @@
 #ifndef INCLUDED_SFX2_DOCFILT_HXX
 #define INCLUDED_SFX2_DOCFILT_HXX
 
-#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/beans/UnknownPropertyException.hpp>
-#include <com/sun/star/lang/WrappedTargetException.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
 #include <comphelper/documentconstants.hxx>
 #include <rtl/ustring.hxx>
 #include <sal/config.h>
@@ -33,7 +29,9 @@
 
 #include <memory>
 
-class SfxFilterContainer;
+namespace com::sun::star::embed { class XStorage; }
+namespace com::sun::star::uno { template <typename > class Reference; }
+
 class SotStorage;
 
 class SFX2_DLLPUBLIC SfxFilter
diff --git a/include/sfx2/docinf.hxx b/include/sfx2/docinf.hxx
index e31c69756b75..23cca9ce1025 100644
--- a/include/sfx2/docinf.hxx
+++ b/include/sfx2/docinf.hxx
@@ -23,7 +23,6 @@
 #include <sfx2/dllapi.h>
 #include <sal/types.h>
 #include <vcl/errcode.hxx>
-#include <com/sun/star/uno/Reference.hxx>
 
 
 class GDIMetaFile;
@@ -35,6 +34,9 @@ namespace com { namespace sun { namespace star {
     }
 } } }
 
+namespace com::sun::star::uno { template <typename > class Reference; }
+namespace com::sun::star::uno { template <typename > class Sequence; }
+
 
 namespace sfx2 {
 
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index d7712fb4324e..56c16ac2653b 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -22,7 +22,6 @@
 
 #include <rtl/ustring.hxx>
 #include <sfx2/dllapi.h>
-#include <sfx2/docfile.hxx>
 #include <vcl/errcode.hxx>
 #include <tools/link.hxx>
 #include <memory>
@@ -31,6 +30,7 @@
 namespace sfx2 { class FileDialogHelper; }
 namespace weld { class Window; }
 class SfxItemSet;
+class SfxMedium;
 enum class FileDialogFlags;
 
 typedef ::std::vector< std::unique_ptr<SfxMedium> > SfxMediumList;
diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx
index e75c043f0c19..95be9d6444dc 100644
--- a/include/sfx2/dockwin.hxx
+++ b/include/sfx2/dockwin.hxx
@@ -25,13 +25,12 @@
 #include <vcl/dockwin.hxx>
 
 #include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
 
 #include <sfx2/dllapi.h>
 #include <sfx2/childwin.hxx>
 
-class SfxSplitWindow;
+namespace com::sun::star::frame { class XFrame; }
+
 class SfxDockingWindow_Impl;
 enum class SplitWindowItemFlags;
 
diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index f043e36a26d3..a1991bcc0e20 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -23,13 +23,15 @@
 #include <sfx2/dllapi.h>
 #include <sfx2/signaturestate.hxx>
 
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/script/XLibraryContainer.hpp>
-#include <com/sun/star/document/XEmbeddedScripts.hpp>
+#include <com/sun/star/uno/Reference.hxx>
 
 #include <memory>
 
+namespace com::sun::star::document { class XEmbeddedScripts; }
+namespace com::sun::star::embed { class XStorage; }
+namespace com::sun::star::script { class XLibraryContainer; }
+namespace com::sun::star::task { class XInteractionHandler; }
+
 
 namespace sfx2
 {
diff --git a/include/sfx2/doctempl.hxx b/include/sfx2/doctempl.hxx
index 953cc05ce17b..6ad16ceb63c2 100644
--- a/include/sfx2/doctempl.hxx
+++ b/include/sfx2/doctempl.hxx
@@ -27,8 +27,6 @@
 
 // CLASS -----------------------------------------------------------------
 
-class SfxObjectShell;
-
 class SfxDocTemplate_Impl;
 
 // class SfxDocumentTemplates --------------------------------------------
diff --git a/include/svx/ClassificationCommon.hxx b/include/svx/ClassificationCommon.hxx
index eea0df658ffb..75ab8682d34f 100644
--- a/include/svx/ClassificationCommon.hxx
+++ b/include/svx/ClassificationCommon.hxx
@@ -17,6 +17,7 @@
 #include <vector>
 #include <sfx2/classificationhelper.hxx>
 #include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/beans/Property.hpp>
 
 namespace svx
 {
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index aa995edbf04f..0db2bfd0e7a2 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -30,6 +30,7 @@
 #include <sfx2/basedlgs.hxx>
 #include <svtools/svmedit.hxx>
 #include <svl/srchdefs.hxx>
+#include <svl/itempool.hxx>
 #include <svx/svxdllapi.h>
 #include <memory>
 #include <vector>
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index d7697a3d8e7e..4c1077b265f8 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -90,6 +90,7 @@
 #include <vcl/graph.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/GraphicObject.hxx>
+#include <vcl/svapp.hxx>
 #include <rtl/strbuf.hxx>
 #include <sfx2/app.hxx>
 #include <svl/languageoptions.hxx>
diff --git a/sc/inc/filtuno.hxx b/sc/inc/filtuno.hxx
index fc3d3981b126..9231c8b3b16a 100644
--- a/sc/inc/filtuno.hxx
+++ b/sc/inc/filtuno.hxx
@@ -32,6 +32,8 @@ namespace com { namespace sun { namespace star { namespace io {
     class XInputStream;
 } } } }
 
+namespace com::sun::star::awt { class XWindow; }
+
 class ScFilterOptionsObj : public ::cppu::WeakImplHelper<
                             css::beans::XPropertyAccess,
                             css::ui::dialogs::XExecutableDialog,
diff --git a/sc/qa/extras/scddelinkobj.cxx b/sc/qa/extras/scddelinkobj.cxx
index 4d1838a3b321..bdc7886d4aa8 100644
--- a/sc/qa/extras/scddelinkobj.cxx
+++ b/sc/qa/extras/scddelinkobj.cxx
@@ -14,6 +14,7 @@
 
 #include <unotools/tempfile.hxx>
 #include <sfx2/app.hxx>
+#include <vcl/svapp.hxx>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XIndexAccess.hpp>
diff --git a/sc/qa/extras/scddelinksobj.cxx b/sc/qa/extras/scddelinksobj.cxx
index bc62f4cfbc2d..0a3ac5fa0c1c 100644
--- a/sc/qa/extras/scddelinksobj.cxx
+++ b/sc/qa/extras/scddelinksobj.cxx
@@ -18,6 +18,7 @@
 #include <cppu/unotype.hxx>
 #include <rtl/ustring.hxx>
 #include <sfx2/app.hxx>
+#include <vcl/svapp.hxx>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index f225aefb5efc..2ea5ffe2559c 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -32,6 +32,7 @@
 #include <basic/sbx.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/sharedstringpool.hxx>
+#include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <rtl/math.hxx>
 #include <osl/diagnose.h>
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f2ea303e849b..57880f95c140 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -21,6 +21,7 @@
 
 #include <compiler.hxx>
 
+#include <vcl/svapp.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/objsh.hxx>
 #include <basic/sbmeth.hxx>
diff --git a/sc/source/ui/cctrl/cbnumberformat.cxx b/sc/source/ui/cctrl/cbnumberformat.cxx
index b5558045b634..2e08b0256378 100644
--- a/sc/source/ui/cctrl/cbnumberformat.cxx
+++ b/sc/source/ui/cctrl/cbnumberformat.cxx
@@ -21,6 +21,7 @@
 #include <globstr.hrc>
 #include <scresid.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/intitem.hxx>
 #include <sc.hrc>
 
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 913de710ba08..f5bba16a5b1c 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/i18n/CalendarFieldIndex.hpp>
 #include <sal/log.hxx>
 #include <unotools/charclass.hxx>
+#include <osl/module.hxx>
 
 #include <global.hxx>
 #include <docsh.hxx>
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index e9de68d42c5f..76e8f6856fee 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -29,6 +29,7 @@
 #include <sfx2/objsh.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/whiter.hxx>
 
 #include <drawsh.hxx>
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 9d063a6d80ac..99ce6a6d12c9 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -29,6 +29,7 @@
 #include <editeng/outlobj.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/ipclient.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <fusel.hxx>
 #include <sc.hrc>
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 32c6c8b6a9ff..8e572170a46e 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -23,6 +23,7 @@
 #include <vector>
 #include <vcl/toolbox.hxx>
 #include <vcl/field.hxx>
+#include <vcl/layout.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/idle.hxx>
 #include <svl/lstner.hxx>
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index eef896e6e05e..149ba5f1c3ed 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -25,6 +25,7 @@
 #include <vcl/mnemonic.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <anyrefdg.hxx>
 #include <sc.hrc>
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index d721c32b0ff4..ea4dffc59a8a 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -27,6 +27,7 @@
 #include <svx/rotmodit.hxx>
 #include <svtools/unitconv.hxx>
 #include <unotools/localedatawrapper.hxx>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
 
 using namespace css;
 using namespace css::uno;
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index e9e5f1284c94..75205d0bd006 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -27,6 +27,7 @@
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/virdev.hxx>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include "CellLineStyleControl.hxx"
 #include "CellBorderStyleControl.hxx"
 
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
index a9270df1b205..48bc135173a0 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
@@ -20,6 +20,7 @@
 #include "CellBorderStyleControl.hxx"
 #include <editeng/boxitem.hxx>
 #include <editeng/borderline.hxx>
+#include <sfx2/app.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 #include <svx/svxids.hrc>
diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx
index 975ef95aeb85..8c9092f33fb4 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx
@@ -23,6 +23,7 @@
 #include <vcl/settings.hxx>
 #include <editeng/borderline.hxx>
 #include <editeng/lineitem.hxx>
+#include <sfx2/app.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 #include <svx/svxids.hrc>
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 349bca1e2ff7..6fbe5d3d579d 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -27,6 +27,7 @@
 #include <vcl/toolbox.hxx>
 #include <svl/intitem.hxx>
 #include <svl/stritem.hxx>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
 
 using namespace css;
 using namespace css::uno;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 51595c5eca95..0f044477dae1 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -42,6 +42,7 @@
 #include <sfx2/printer.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <vcl/commandevent.hxx>
 #include <vcl/pdfextoutdevdata.hxx>
 #include <vcl/waitobj.hxx>
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 4f18e3b1d853..fe00d7a59975 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -23,6 +23,7 @@
 
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 0ef831bfdb9b..d2e00200b227 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -34,6 +34,7 @@
 #include <editeng/unonrule.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/printer.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <svx/rotmodit.hxx>
 #include <svl/stritem.hxx>
 #include <vcl/virdev.hxx>
diff --git a/sc/source/ui/unoobj/warnpassword.cxx b/sc/source/ui/unoobj/warnpassword.cxx
index e52d9aeb8ac9..6f9e4e5435c7 100644
--- a/sc/source/ui/unoobj/warnpassword.cxx
+++ b/sc/source/ui/unoobj/warnpassword.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/ucb/InteractiveAppException.hpp>
 #include <com/sun/star/ucb/XContent.hpp>
 #include <svx/svxerr.hxx>
+#include <rtl/ref.hxx>
 
 using ::com::sun::star::uno::makeAny;
 using ::com::sun::star::uno::Any;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 15074ddf2a04..154fa59aa835 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -39,6 +39,7 @@
 #include <tools/urlobj.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/printer.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <drwlayer.hxx>
 #include <prevwsh.hxx>
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 27386dd4f5b2..560c4b584e5e 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -28,6 +28,7 @@
 #include <sfx2/dispatch.hxx>
 #include <sfx2/lokhelper.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <tabview.hxx>
 #include <tabvwsh.hxx>
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index 54aa18c4516f..73b26f7dc6f6 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -26,6 +26,7 @@
 #include <svx/svxids.hrc>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <tabvwsh.hxx>
 #include <sc.hrc>
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index ddfce82fa886..ac6f1b91ecab 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -33,6 +33,7 @@
 #include <vcl/settings.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/stritem.hxx>
 #include <svl/eitem.hxx>
 
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 751e8a178e10..a1184e8eeb49 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -51,6 +51,7 @@
 #include <comphelper/namedvaluecollection.hxx>
 #include <util/MiscUtils.hxx>
 #include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
 #include <i18nlangtag/languagetag.hxx>
 
 using namespace ::com::sun::star;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index c666b7a91c71..c5160535880d 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -37,6 +37,7 @@
 #include <com/sun/star/drawing/FillStyle.hpp>
 #include <comphelper/processfactory.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include "STLPropertySet.hxx"
 #include "CustomAnimationPane.hxx"
 #include "CustomAnimationDialog.hxx"
diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx
index c338ed158c5f..c662ab0e4c63 100644
--- a/sd/source/ui/app/tmplctrl.cxx
+++ b/sd/source/ui/app/tmplctrl.cxx
@@ -21,6 +21,7 @@
 #include <vcl/status.hxx>
 #include <svl/stritem.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <tmplctrl.hxx>
 #include <ViewShellBase.hxx>
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 8309aff19094..76c8e22e7551 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -23,6 +23,7 @@
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <helpids.h>
 #include <app.hrc>
diff --git a/sd/source/ui/dlg/NavigatorChildWindow.cxx b/sd/source/ui/dlg/NavigatorChildWindow.cxx
index 2af28a0bfd44..1773734dd64c 100644
--- a/sd/source/ui/dlg/NavigatorChildWindow.cxx
+++ b/sd/source/ui/dlg/NavigatorChildWindow.cxx
@@ -23,6 +23,7 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/navigat.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <svl/eitem.hxx>
 
 namespace sd {
diff --git a/sd/source/ui/framework/factories/ChildWindowPane.cxx b/sd/source/ui/framework/factories/ChildWindowPane.cxx
index fc39e14566f9..996ab2c52d3d 100644
--- a/sd/source/ui/framework/factories/ChildWindowPane.cxx
+++ b/sd/source/ui/framework/factories/ChildWindowPane.cxx
@@ -31,6 +31,7 @@
 #include <framework/FrameworkHelper.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <vcl/svapp.hxx>
+#include <sfx2/viewfrm.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index bb29428130d6..d50ae9a82a48 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -20,6 +20,7 @@
 #include <fubullet.hxx>
 
 #include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <editeng/eeitem.hxx>
 #include <svl/poolitem.hxx>
 #include <editeng/fontitem.hxx>
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx
index 4c018171b4ec..7939a88851a1 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -20,6 +20,7 @@
 #include <sfx2/request.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <svl/itemiter.hxx>
 
diff --git a/sd/source/ui/inc/SpellDialogChildWindow.hxx b/sd/source/ui/inc/SpellDialogChildWindow.hxx
index d834fcfaba95..41bd7de7aad6 100644
--- a/sd/source/ui/inc/SpellDialogChildWindow.hxx
+++ b/sd/source/ui/inc/SpellDialogChildWindow.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SD_SOURCE_UI_INC_SPELLDIALOGCHILDWINDOW_HXX
 
 #include <svx/SpellDialogChildWindow.hxx>
+#include <svl/lstner.hxx>
 
 class SdOutliner;
 
diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx
index e6e77b8f17a3..04316f304af9 100644
--- a/sd/source/ui/inc/animobjs.hxx
+++ b/sd/source/ui/inc/animobjs.hxx
@@ -24,6 +24,7 @@
 #include <vcl/fixed.hxx>
 #include <tools/fract.hxx>
 #include <sfx2/ctrlitem.hxx>
+#include <sfx2/progress.hxx>
 
 #include <vcl/button.hxx>
 #include <vcl/field.hxx>
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 18c55417fdf7..0f155af823d4 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -44,6 +44,7 @@
 #include <svl/languageoptions.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/itemset.hxx>
 #include <svl/eitem.hxx>
 #include <svx/dlgutil.hxx>
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 8239545d21d9..83d594415b2d 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -51,6 +51,7 @@
 #include <sfx2/dispatch.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/app.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/unoapi.hxx>
 #include <svx/svdoole2.hxx>
 #include <sfx2/templdlg.hxx>
diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx
index 93b45a6955e8..3a54d2c26071 100644
--- a/sd/source/ui/unoidl/sddetect.cxx
+++ b/sd/source/ui/unoidl/sddetect.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/ucb/ContentCreationException.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <vcl/graphicfilter.hxx>
 #include <rtl/ustring.h>
 #include <sfx2/docfile.hxx>
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 60de7fba6c72..409df6ebd933 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -44,6 +44,7 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <sfx2/sidebar/Sidebar.hxx>
 #include <svl/aeitem.hxx>
 #include <svx/imapdlg.hxx>
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index e562dfa93284..05f67f8c948d 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -26,6 +26,7 @@
 
 #include <sal/log.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/svxids.hrc>
 #include <svx/fmshell.hxx>
 
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 6bf39aef42c4..73812a86541f 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -41,6 +41,7 @@
 #include <svx/hlnkitem.hxx>
 #include <svx/svdotext.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <vcl/scrbar.hxx>
 #include <vcl/settings.hxx>
 
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index c1636dc1405a..b6eb10851aab 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -31,6 +31,7 @@
 #include <sfx2/printer.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/itempool.hxx>
 #include <svl/style.hxx>
 #include <svx/svdorect.hxx>
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index 257370b9e997..52d92c222301 100644
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -26,6 +26,7 @@
 #include <sfx2/request.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/objface.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/svxids.hrc>
 #include <svx/ruler.hxx>
 #include <FrameView.hxx>
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 74e405cffe0a..073104776c6a 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -27,6 +27,7 @@
 #include <sfx2/docfilt.hxx>
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/docfile.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <vcl/weld.hxx>
 #include <svl/urlbmk.hxx>
 #include <svx/svdpagv.hxx>
diff --git a/sfx2/inc/preventduplicateinteraction.hxx b/sfx2/inc/preventduplicateinteraction.hxx
index 8a8cd91b565c..1f96e8f94f08 100644
--- a/sfx2/inc/preventduplicateinteraction.hxx
+++ b/sfx2/inc/preventduplicateinteraction.hxx
@@ -35,6 +35,7 @@
 #include <sfx2/app.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <vcl/wrkwin.hxx>
+#include <vcl/svapp.hxx>
 
 namespace com { namespace sun { namespace star { namespace uno {
     class XComponentContext;
diff --git a/sfx2/inc/saveastemplatedlg.hxx b/sfx2/inc/saveastemplatedlg.hxx
index cbd695be24cb..b029a7e13031 100644
--- a/sfx2/inc/saveastemplatedlg.hxx
+++ b/sfx2/inc/saveastemplatedlg.hxx
@@ -14,6 +14,8 @@
 #include <sfx2/doctempl.hxx>
 #include <vcl/weld.hxx>
 
+#include <com/sun/star/frame/XModel.hpp>
+
 //  class SfxSaveAsTemplateDialog -------------------------------------------------------------------
 class SfxSaveAsTemplateDialog : public weld::GenericDialogController
 {
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index e0d50dc44b71..2e84fb18876b 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -19,6 +19,7 @@
 
 #include <config_features.h>
 #include <sal/log.hxx>
+#include <osl/module.hxx>
 
 #include <sfx2/app.hxx>
 #include <sfx2/frame.hxx>
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 5cc4ce4edf16..543200717c87 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -38,6 +38,7 @@
 #include <svtools/ehdl.hxx>
 #include <comphelper/processfactory.hxx>
 #include <rtl/ustrbuf.hxx>
+#include <osl/module.hxx>
 #include <osl/security.hxx>
 #include <unotools/pathoptions.hxx>
 #include <unotools/historyoptions.hxx>
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 036992c54dc7..d2ac03b9c2ac 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -75,6 +75,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
 #include <osl/file.hxx>
+#include <osl/module.hxx>
 #include <vcl/EnumContext.hxx>
 
 #include <unotools/pathoptions.hxx>
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index d7b1aa528655..fcd971dcc0a5 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -62,6 +62,7 @@
 #include <tools/urlobj.hxx>
 #include <cppuhelper/implbase.hxx>
 
+#include <com/sun/star/document/BrokenPackageRequest.hpp>
 #include <com/sun/star/document/FilterOptionsRequest.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/frame/XModel.hpp>
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 1ff6c891cd7c..098d5566812f 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -38,9 +38,11 @@
 #include <sfx2/linkmgr.hxx>
 #include <sfx2/opengrf.hxx>
 #include <sfx2/sfxresid.hxx>
+#include <sfx2/objsh.hxx>
 #include "fileobj.hxx"
 #include <sfx2/strings.hrc>
 #include <vcl/dibtools.hxx>
+#include <vcl/svapp.hxx>
 
 #define FILETYPE_TEXT       1
 #define FILETYPE_GRF        2
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index a5b698f5cc69..769a53281ee0 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -51,6 +51,7 @@
 #include <objshimp.hxx>
 #include <openurlhint.hxx>
 #include <sfx2/docfilt.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <rtl/instance.hxx>
 
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index a74a785e667a..f9c243b34a6f 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -63,6 +63,7 @@
 #include <rtl/bootstrap.hxx>
 #include <rtl/ref.hxx>
 #include <rtl/ustrbuf.hxx>
+#include <vcl/svapp.hxx>
 #ifdef UNX // need symlink
 #include <unistd.h>
 #include <errno.h>
@@ -74,7 +75,6 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::util;
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index 189910f59864..ea040e4c6212 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -29,6 +29,7 @@
 #include <sal/macros.h>
 #include <sfx2/sfxresid.hxx>
 #include <sfx2/strings.hrc>
+#include <vcl/svapp.hxx>
 #include "shutdownicon.hxx"
 
 #include <com/sun/star/util/XStringWidth.hpp>
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index c6d1b52aac1d..a2c8626c45bd 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -21,6 +21,8 @@
 #include <vcl/builderfactory.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/event.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/syswin.hxx>
 #include <sfx2/charwin.hxx>
 #include <comphelper/dispatchcommand.hxx>
 #include <comphelper/processfactory.hxx>
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index c1173e7c2e8b..9a7c02c206d7 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -29,6 +29,7 @@
 #include <vcl/event.hxx>
 #include <vcl/pngread.hxx>
 #include <vcl/ptrstyle.hxx>
+#include <vcl/svapp.hxx>
 #include <tools/stream.hxx>
 #include <tools/urlobj.hxx>
 #include <com/sun/star/beans/NamedValue.hpp>
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index dd75a537177e..5193b498fa15 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -13,6 +13,7 @@
 #include <sfx2/sfxresid.hxx>
 #include <vcl/builderfactory.hxx>
 #include <vcl/event.hxx>
+#include <vcl/svapp.hxx>
 #include <sfx2/app.hxx>
 
 #include <sfx2/strings.hrc>
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index aa3612581296..01a4ccf90ac0 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -44,6 +44,7 @@
 #include <com/sun/star/task/InteractionHandler.hpp>
 #include <com/sun/star/task/XInteractionRequest.hpp>
 #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
+#include <com/sun/star/util/RevisionTag.hpp>
 #include <comphelper/fileurl.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/sequenceashashmap.hxx>
@@ -59,6 +60,7 @@
 #include <osl/thread.hxx>
 #include <vcl/cvtgrf.hxx>
 #include <vcl/mnemonic.hxx>
+#include <vcl/svapp.hxx>
 #include <unotools/pathoptions.hxx>
 #include <unotools/saveopt.hxx>
 #include <unotools/securityoptions.hxx>
@@ -81,6 +83,7 @@
 #include <sfx2/frame.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/docfac.hxx>
+#include <sfx2/objsh.hxx>
 #include <openflag.hxx>
 #include <sfx2/passwd.hxx>
 #include <sfx2/sfxresid.hxx>
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index a60c6c0c6b57..d90442d11838 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -18,6 +18,7 @@
 #include <sfx2/infobar.hxx>
 #include <sfx2/objface.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <sfx2/viewsh.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index aabdb2de55cf..67eb96db1cd8 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -34,6 +34,7 @@
 #include <sfxtypes.hxx>
 #include <sfx2/sfxresid.hxx>
 #include <sfx2/module.hxx>
+#include <sfx2/sfxsids.hrc>
 
 #include <sfx2/templdlg.hxx>
 #include <templdgi.hxx>
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index 7ce24a62e073..8f5539250f7e 100644
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -21,6 +21,7 @@
 
 #include <sfx2/bindings.hxx>
 #include <sfx2/navigat.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <sfx2/strings.hrc>
 #include <sfx2/app.hxx>
 #include <sfx2/sfxresid.hxx>
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index e283d9221f09..409447c600bb 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <com/sun/star/frame/XDispatchRecorder.hpp>
+
 #include <svl/eitem.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index e78527652bb4..ab5709974a73 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -27,6 +27,7 @@
 
 #include <svl/eitem.hxx>
 #include <vcl/settings.hxx>
+#include <vcl/event.hxx>
 
 
 namespace sfx2
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index a0c4e508b4c0..a797b6832831 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -24,6 +24,7 @@
 #include <sfx2/templdlg.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/tplpitem.hxx>
+#include <sfx2/sfxsids.hrc>
 #include <tplcitem.hxx>
 #include <templdgi.hxx>
 
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 13724cf6a54c..5114b033d7a0 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -20,6 +20,7 @@
 #include <sal/config.h>
 
 #include <com/sun/star/document/XCmisDocument.hpp>
+#include <com/sun/star/util/RevisionTag.hpp>
 
 #include <unotools/localedatawrapper.hxx>
 #include <svl/eitem.hxx>
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 817f76f33829..167a52130c12 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -130,6 +130,7 @@
 #include <officecfg/Office/Common.hxx>
 #include <comphelper/propertysequence.hxx>
 #include <vcl/weld.hxx>
+#include <vcl/svapp.hxx>
 #include <tools/diagnose_ex.h>
 
 #include <com/sun/star/io/WrongFormatException.hpp>
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 4872fc90496b..cc141f298264 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -28,6 +28,8 @@
 #include <com/sun/star/task/DocumentMacroConfirmationRequest.hpp>
 #include <com/sun/star/task/InteractionClassification.hpp>
 #include <com/sun/star/security/DocumentDigitalSignatures.hpp>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+#include <com/sun/star/document/XEmbeddedScripts.hpp>
 
 #include <comphelper/processfactory.hxx>
 #include <framework/interaction.hxx>
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index f3b7c4eeb48c..54adf06ba8b0 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -77,6 +77,7 @@
 #include <unotools/configmgr.hxx>
 #include <unotools/ucbhelper.hxx>
 #include <i18nlangtag/languagetag.hxx>
+#include <ucbhelper/content.hxx>
 
 #include <sfx2/sfxresid.hxx>
 #include <sfxurlrelocator.hxx>
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 3df35e09f1aa..c3c4a0cd4259 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -63,6 +63,7 @@
 #include <com/sun/star/io/WrongFormatException.hpp>
 #include <com/sun/star/io/XTruncate.hpp>
 #include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/util/RevisionTag.hpp>
 #include <com/sun/star/security/DocumentDigitalSignatures.hpp>
 #include <com/sun/star/text/XTextRange.hpp>
 #include <com/sun/star/xml/crypto/CipherID.hpp>
diff --git a/sfx2/source/doc/saveastemplatedlg.cxx b/sfx2/source/doc/saveastemplatedlg.cxx
index b801462e877a..289aec287401 100644
--- a/sfx2/source/doc/saveastemplatedlg.cxx
+++ b/sfx2/source/doc/saveastemplatedlg.cxx
@@ -16,6 +16,7 @@
 #include <sfx2/docfac.hxx>
 #include <sfx2/doctempl.hxx>
 #include <sfx2/docfilt.hxx>
+#include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <sot/storage.hxx>
 
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index efa1cc3695aa..12af26232cec 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -93,6 +93,7 @@
 #include <framework/titlehelper.hxx>
 #include <comphelper/numberedcollection.hxx>
 #include <unotools/ucbhelper.hxx>
+#include <ucbhelper/content.hxx>
 
 #include <sfx2/sfxbasecontroller.hxx>
 #include <sfx2/viewfac.hxx>
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index dd932c987493..dec6fe3e6353 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -22,6 +22,7 @@
 #include <sfx2/docfac.hxx>
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/filedlghelper.hxx>
+#include <sfx2/objsh.hxx>
 #include <sfx2/sfxresid.hxx>
 #include <sfx2/templatelocalview.hxx>
 #include <sfx2/templatecontaineritem.hxx>
@@ -39,6 +40,7 @@
 #include <vcl/event.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/lstbox.hxx>
+#include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 
 #include <com/sun/star/beans/PropertyValue.hpp>
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 1849cd5cfc4e..c61ec60b2774 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <tools/debug.hxx>
+#include <rtl/ref.hxx>
 
 #include <sfx2/bindings.hxx>
 
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index 601ae9966002..68301704972a 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -23,6 +23,7 @@
 #include <sfx2/sfxresid.hxx>
 #include <sfx2/strings.hrc>
 
+#include <vcl/event.hxx>
 #include <vcl/image.hxx>
 #include <vcl/ptrstyle.hxx>
 
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index 0ce13947b6d7..ea9fe891e8a3 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -26,6 +26,7 @@
 #include <vcl/button.hxx>
 #include <vcl/event.hxx>
 #include <vcl/toolbox.hxx>
+#include <vcl/svapp.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 
 #include <sfx2/app.hxx>
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 82ccd7ca58ef..e4bd01b03d1e 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -39,6 +39,7 @@
 #include <vcl/fixed.hxx>
 #include <vcl/uitest/logger.hxx>
 #include <vcl/uitest/eventdescription.hxx>
+#include <vcl/svapp.hxx>
 #include <splitwin.hxx>
 #include <tools/link.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 24e14c2c430f..5748edee413e 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -23,8 +23,10 @@
 #include <comphelper/processfactory.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <tools/link.hxx>
 #include <tools/gen.hxx>
+#include <vcl/event.hxx>
 
 using namespace css;
 using namespace css::uno;
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index d2e9f699ad46..ab258a7ab473 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -35,6 +35,7 @@
 #include <vcl/event.hxx>
 #include <vcl/gradient.hxx>
 #include <vcl/image.hxx>
+#include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
 #include <tools/svborder.hxx>
 
diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx
index f07824a3774a..d2bc9824db88 100644
--- a/sfx2/source/view/classificationcontroller.cxx
+++ b/sfx2/source/view/classificationcontroller.cxx
@@ -10,6 +10,7 @@
 #include <cppuhelper/implbase.hxx>
 #include <svtools/toolboxcontroller.hxx>
 #include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
 
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 99fc8174c24f..d28eb79cd1c0 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -28,6 +28,7 @@
 #include <unotools/eventcfg.hxx>
 #include <sfx2/event.hxx>
 #include <sfx2/app.hxx>
+#include <sfx2/bindings.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/docfilt.hxx>
 #include <sfx2/msg.hxx>
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index a1b842c7509e..9538a74c2e57 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -28,6 +28,7 @@
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/embed/ElementModes.hpp>
 #include <com/sun/star/util/MeasureUnit.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
 #include <com/sun/star/uno/Any.h>
 
 #include <rtl/math.hxx>
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index 9c57a6e8a88e..90d601157a3e 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -21,6 +21,7 @@
 #include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/ucb/ContentCreationException.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 #include <sfx2/docfile.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <sal/log.hxx>
diff --git a/svx/source/dialog/ClassificationCommon.cxx b/svx/source/dialog/ClassificationCommon.cxx
index 082b5b6a9418..52ebd8ed32a2 100644
--- a/svx/source/dialog/ClassificationCommon.cxx
+++ b/svx/source/dialog/ClassificationCommon.cxx
@@ -11,6 +11,7 @@
 #include <svx/ClassificationCommon.hxx>
 
 #include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
 
 using namespace css;
 
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index 74dbb68900a4..11349012361b 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -24,6 +24,7 @@
 #include <tools/XmlWriter.hxx>
 #include <tools/XmlWalker.hxx>
 #include <vcl/builderfactory.hxx>
+#include <sfx2/objsh.hxx>
 
 #include <officecfg/Office/Common.hxx>
 
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 8273a70a7f8f..17f2577a0afe 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -30,6 +30,7 @@
 #include <svx/dialmgr.hxx>
 #include <svx/compressgraphicdialog.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/module.hxx>
 #include <comphelper/fileformat.h>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index c887d9cf38ee..f5a809ed3c5c 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -31,6 +31,7 @@
 #include <sfx2/module.hxx>
 #include <sfx2/viewsh.hxx>
 #include <sfx2/basedlgs.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/cjkoptions.hxx>
 #include <svl/ctloptions.hxx>
 #include <com/sun/star/awt/XWindow.hpp>
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 7524ddb689ae..8141ec50b80f 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -21,6 +21,8 @@
 #include <climits>
 
 #include <vcl/builder.hxx>
+#include <vcl/commandevent.hxx>
+#include <vcl/event.hxx>
 #include <vcl/image.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index 96851ff2c655..f14d59f1a295 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -24,6 +24,7 @@
 #include <svx/strings.hrc>
 
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
 
 #include <comphelper/namedvaluecollection.hxx>
 #include <rtl/ustrbuf.hxx>
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index e383152c2dcb..8ff98b08fb9b 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -55,6 +55,7 @@
 #include <comphelper/property.hxx>
 #include <comphelper/types.hxx>
 #include <connectivity/dbtools.hxx>
+#include <vcl/svapp.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::awt;
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index b671bb343e01..c92c4041ae41 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -53,6 +53,7 @@
 #include <svx/galleryitem.hxx>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
 #include <com/sun/star/gallery/GalleryItemType.hpp>
 #include <com/sun/star/graphic/XGraphic.hpp>
 #include <com/sun/star/style/GraphicLocation.hpp>
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
index 464b9a1d43b2..f7069bbde090 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
@@ -26,6 +26,7 @@
 #include <svl/intitem.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
 
 using namespace css;
 using namespace css::uno;
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index d77b26962dc0..45377297535e 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -23,7 +23,9 @@
 #include <editeng/kernitem.hxx>
 #include <editeng/lspcitem.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svtools/unitconv.hxx>
+#include <vcl/button.hxx>
 
 #define DEFAULT_LINE_SPACING  200
 #define FIX_DIST_DEF          283
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index a6db28c0d02c..484ca84192d4 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -19,6 +19,7 @@
 #include "ParaPropertyPanel.hxx"
 #include <sfx2/sidebar/Tools.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/ulspitem.hxx>
 #include <vcl/toolbox.hxx>
diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
index 8b67b8919907..d945b32ed5bf 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
@@ -20,6 +20,8 @@
 #include "ParaSpacingWindow.hxx"
 #include <editeng/editids.hrc>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/itempool.hxx>
 #include <svl/intitem.hxx>
 #include <vcl/builderfactory.hxx>
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 7c4adfa7ef4b..087dbf920654 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -29,6 +29,7 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/dlgutil.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <unotools/viewoptions.hxx>
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
index 7e930d4a9503..5182b6edb219 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
@@ -23,7 +23,9 @@
 #include <editeng/kernitem.hxx>
 #include <editeng/fhgtitem.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <sfx2/sidebar/Theme.hxx>
+#include <vcl/button.hxx>
 #include <vcl/settings.hxx>
 #include <svl/itempool.hxx>
 #include <helpids.h>
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index 5c1bdc2e131e..c509998e0b49 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -19,9 +19,11 @@
 #include "TextUnderlineControl.hxx"
 #include <svx/svxids.hrc>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <sfx2/sidebar/Theme.hxx>
 #include <editeng/editids.hrc>
 #include <editeng/udlnitem.hxx>
+#include <vcl/button.hxx>
 #include <vcl/settings.hxx>
 #include <helpids.h>
 
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
index 12320c61fcc6..50c55e93e85f 100644
--- a/svx/source/stbctrls/selctrl.cxx
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <vcl/builder.hxx>
+#include <vcl/event.hxx>
 #include <vcl/menu.hxx>
 #include <vcl/status.hxx>
 #include <svl/intitem.hxx>
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index dfd8ed6871ea..3cf48cf01800 100644
--- a/svx/source/stbctrls/zoomctrl.cxx
+++ b/svx/source/stbctrls/zoomctrl.cxx
@@ -19,6 +19,8 @@
 
 #include <i18nutil/unicode.hxx>
 #include <vcl/builder.hxx>
+#include <vcl/commandevent.hxx>
+#include <vcl/event.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/status.hxx>
 #include <vcl/menu.hxx>
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 95d213c46c2e..b605925a33eb 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -27,6 +27,7 @@
 #include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <vcl/image.hxx>
 
 #include <svx/colrctrl.hxx>
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 369c54133fc8..af83529bc620 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -27,6 +27,7 @@
 #include <sfx2/dispatch.hxx>
 #include <sfx2/objsh.hxx>
 #include <svl/eitem.hxx>
+#include <vcl/event.hxx>
 #include <vcl/settings.hxx>
 #include <svl/intitem.hxx>
 #include <editeng/colritem.hxx>
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index d9e819c31d55..f193a9d0f123 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -21,6 +21,7 @@
 #include <sfx2/app.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <sfx2/viewsh.hxx>
 #include <sfx2/sidebar/SidebarToolBox.hxx>
 #include <rtl/ustring.hxx>
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 8c69f9fb8198..14dc309e4a6c 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -20,7 +20,9 @@
 #include <string>
 #include <vcl/toolbox.hxx>
 #include <vcl/button.hxx>
+#include <vcl/event.hxx>
 #include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
 #include <svl/intitem.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/app.hxx>
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 5b60d9056aaf..10521aa6ae54 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -29,6 +29,8 @@
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <sfx2/viewfrm.hxx>
 #include <fmtinfmt.hxx>
 #include <fmtanchr.hxx>
 #include <doc.hxx>
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index ca3eb503e560..2c7f54651237 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/container/XContentEnumerationAccess.hpp>
 #include <com/sun/star/document/XActionLockable.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
 #include <com/sun/star/drawing/FillStyle.hpp>
 #include <com/sun/star/drawing/HomogenMatrix3.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index f0a89b4095c3..9cad7b17a68b 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -50,6 +50,7 @@
 #include <comphelper/classids.hxx>
 #include <vcl/graph.hxx>
 #include <sot/formats.hxx>
+#include <vcl/svapp.hxx>
 #include <vcl/graphicfilter.hxx>
 #include <strings.hrc>
 #include <svx/charthelper.hxx>
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 1fd8e3efeb66..738c56f57769 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -28,6 +28,7 @@
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/docfile.hxx>
 #include <com/sun/star/ucb/ContentCreationException.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
 
 using namespace ::com::sun::star;
 
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index c125e92dc056..cbf244180976 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -36,6 +36,7 @@
 #include <com/sun/star/packages/WrongPasswordException.hpp>
 #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
 #include <com/sun/star/xml/sax/XFastParser.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
 #include <officecfg/Office/Common.hxx>
 #include <o3tl/any.hxx>
 #include <vcl/errinf.hxx>
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 099a96945bd3..9f6767fda732 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -60,6 +60,7 @@
 #include <sfx2/request.hxx>
 #include <sfx2/printer.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/slstitm.hxx>
 #include <svl/ctloptions.hxx>
 #include <svl/eitem.hxx>
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 546d135f3432..31800ee2eeef 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -57,6 +57,7 @@
 #include <bitmaps.hlst>
 #include <sfx2/bindings.hxx>
 #include <sfx2/htmlmode.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/dlgutil.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/svxdlg.hxx>
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 3cbd9a6743a7..33a03a11181b 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -21,6 +21,7 @@
 #include <svl/stritem.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/htmlmode.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <dbfld.hxx>
 #include <flddat.hxx>
 #include <fmtfld.hxx>
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index fc3c489eb60b..c1a8efb6b4ac 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -26,6 +26,7 @@
 #include <sfx2/basedlgs.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/htmlmode.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <viewopt.hxx>
 #include <docsh.hxx>
 #include <fldwrap.hxx>
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index bd9f3f744bd9..ca9f96462c69 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -36,6 +36,7 @@
 #include <editeng/frmdiritem.hxx>
 #include <svl/ctloptions.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/builderfactory.hxx>
 
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 627ccf874e1e..9b7ac9c6df29 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -32,6 +32,7 @@
 #include <svl/stritem.hxx>
 #include <vcl/weld.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/eitem.hxx>
 #include <unotools/textsearch.hxx>
 #include <editeng/scripttypeitem.hxx>
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 92f15c173e3f..e86419508340 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -32,6 +32,7 @@
 #include <sfx2/docfac.hxx>
 #include <sfx2/printer.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <editeng/boxitem.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/ulspitem.hxx>
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index cb564aca3d7c..85f72818d506 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -32,6 +32,7 @@
 #include <sfx2/printer.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/linkmgr.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <editeng/pbinitem.hxx>
 #include <editeng/ulspitem.hxx>
 #include <editeng/lrspitem.hxx>
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 3e738a838911..c2eea900368a 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -36,6 +36,7 @@
 #include <sfx2/dispatch.hxx>
 #include <sfx2/newstyle.hxx>
 #include <sfx2/printer.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/macitem.hxx>
 #include <svl/stritem.hxx>
 #include <svl/languageoptions.hxx>
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 3dd7874977c7..d8c927cba9eb 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -27,6 +27,7 @@
 #include <sfx2/app.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <editeng/unolingu.hxx>
 #include <editeng/editeng.hxx>
 #include <editeng/editview.hxx>
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index da57a0b6f811..96b1a2fd9ce9 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -48,6 +48,7 @@
 #include <globals.hrc>
 #include <sfx2/bindings.hxx>
 #include <sfx2/htmlmode.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/dlgutil.hxx>
 #include <swabstdlg.hxx>
 #include <memory>
diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx b/sw/source/uibase/dialog/watermarkdialog.cxx
index a40977792873..ad16d5bd94f6 100644
--- a/sw/source/uibase/dialog/watermarkdialog.cxx
+++ b/sw/source/uibase/dialog/watermarkdialog.cxx
@@ -15,6 +15,8 @@
 #include <sfx2/sfxsids.hrc>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/objsh.hxx>
+#include <vcl/svapp.hxx>
 #include <svl/eitem.hxx>
 #include <sfx2/watermarkitem.hxx>
 #include <svtools/ctrltool.hxx>
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 9a66ff8aca75..92861844acba 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -45,6 +45,7 @@
 #include <vcl/wrkwin.hxx>
 #include <vcl/weld.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/stritem.hxx>
 #include <vcl/imap.hxx>
 #include <sot/storage.hxx>
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 4060ab996218..0b4ba5b4ddb3 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -44,6 +44,7 @@
 #include <editeng/brushitem.hxx>
 #include <svx/hdft.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <drawinglayer/processor2d/baseprocessor2d.hxx>
 #include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
 #include <vcl/decoview.hxx>
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index 38d15842018e..cddb61058f3a 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -42,6 +42,7 @@
 #include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
 #include <editeng/formatbreakitem.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/stritem.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx
index 62a91b165373..1b8c671ba411 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -27,6 +27,7 @@
 #include <vcl/transfer.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/gallery.hxx>
 #include <svx/graphichelper.hxx>
 #include <editeng/brushitem.hxx>
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index d15b9314cba8..68353b9f4d2f 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -34,6 +34,7 @@
 #include <vcl/ptrstyle.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/app.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svtools/htmltokn.h>
 #include <vcl/txtattr.hxx>
 #include <vcl/settings.hxx>
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index fe594b39ed3f..5e3194623f11 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -40,6 +40,7 @@
 #include <sfx2/objsh.hxx>
 #include <sfx2/linkmgr.hxx>
 #include <sfx2/app.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/strarray.hxx>
 #include <basic/basmgr.hxx>
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index 118a1bb85ca2..acf893bcac0a 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -64,6 +64,7 @@
 #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>
diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx
index 5e1b5e39173f..736545703b56 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -19,6 +19,7 @@
 
 #include <sfx2/bindings.hxx>
 #include <sfx2/htmlmode.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/sdtacitm.hxx>
 #include <svx/svdobj.hxx>
 #include <svx/sdtagitm.hxx>
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index fd4f4018be23..3038bb9e4f75 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -25,6 +25,7 @@
 #include <editeng/sizeitem.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <fmtclds.hxx>
 #include <frmfmt.hxx>
 #include <cmdid.h>
diff --git a/sw/source/uibase/ribbar/dselect.cxx b/sw/source/uibase/ribbar/dselect.cxx
index c0403c05889d..a70583fda5dc 100644
--- a/sw/source/uibase/ribbar/dselect.cxx
+++ b/sw/source/uibase/ribbar/dselect.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <view.hxx>
 #include <edtwin.hxx>
 #include <wrtsh.hxx>
diff --git a/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx
index db2476563b26..d12b5f2de980 100644
--- a/sw/source/uibase/shells/beziersh.cxx
+++ b/sw/source/uibase/shells/beziersh.cxx
@@ -27,6 +27,7 @@
 #include <sfx2/request.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/objface.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <wrtsh.hxx>
 #include <view.hxx>
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 17f80756147e..ca2035850536 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -20,6 +20,7 @@
 #include <svx/svxids.hrc>
 #include <sfx2/request.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/svdview.hxx>
 #include <svx/drawitem.hxx>
 
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 88d3b975160e..083d5d3a266f 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -25,6 +25,7 @@
 #include <sfx2/request.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/objface.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/itemiter.hxx>
 #include <svl/srchitem.hxx>
 #include <svx/extrusionbar.hxx>
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index c5319f7ac065..894f1d404f4e 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -22,6 +22,7 @@
 #include <sfx2/objface.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/aeitem.hxx>
 #include <svx/svdview.hxx>
 #include <svl/srchitem.hxx>
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index ee132d839cb5..7f995768943a 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -26,6 +26,7 @@
 #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>
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index b5417f375995..e302a01a845c 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -29,6 +29,7 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <editeng/eeitem.hxx>
 #include <editeng/editeng.hxx>
 #include <editeng/editdata.hxx>
diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx
index 4ed58717c1f9..d262aff12481 100644
--- a/sw/source/uibase/shells/listsh.cxx
+++ b/sw/source/uibase/shells/listsh.cxx
@@ -25,6 +25,7 @@
 #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>
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index aa0500031969..54f6b9d3f2cb 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -44,6 +44,7 @@
 #include <sfx2/request.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/objface.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <vcl/EnumContext.hxx>
 #include <o3tl/enumrange.hxx>
 
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 4a6367997bb8..3045978009be 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -26,6 +26,7 @@
 #include <sfx2/frmdescr.hxx>
 #include <sfx2/objface.hxx>
 #include <sfx2/lnkbase.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <vcl/errinf.hxx>
 #include <svx/svdview.hxx>
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 1c77242e1af8..bfde65efa7d2 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -26,6 +26,7 @@
 #include <swmodule.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/request.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <editeng/fhgtitem.hxx>
 #include <editeng/adjustitem.hxx>
 #include <editeng/lspcitem.hxx>
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx
index af5ce7fa4467..308a240b524c 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -26,6 +26,7 @@
 #include <svx/sidebar/ValueSetWithTextControl.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <vcl/settings.hxx>
 #include <svx/svxids.hrc>
 
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index b8b81c56d48a..e533fd25fbee 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -33,6 +33,7 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <pageformatpanel.hrc>
 #include <cmdid.h>
 #include <uitool.hxx>
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 8ce3af41a5eb..337e665a62e8 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -27,6 +27,7 @@
 
 #include <editeng/sizeitem.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/svxids.hrc>
 #include <svx/pageitem.hxx>
 #include <svl/itempool.hxx>
diff --git a/sw/source/uibase/sidebar/PageOrientationControl.cxx b/sw/source/uibase/sidebar/PageOrientationControl.cxx
index aa810867aae9..c553d04ce914 100644
--- a/sw/source/uibase/sidebar/PageOrientationControl.cxx
+++ b/sw/source/uibase/sidebar/PageOrientationControl.cxx
@@ -25,6 +25,7 @@
 #include <swtypes.hxx>
 #include <sfx2/viewsh.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/svxids.hrc>
 #include <cmdid.h>
 
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 3a4dee55a4d5..fe9e78e2ddb3 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -31,6 +31,7 @@
 #include <editeng/paperinf.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <vcl/settings.hxx>
 #include <svl/itempool.hxx>
diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx
index 3378e4dfd342..fcf57a0d6956 100644
--- a/sw/source/uibase/uitest/uiobject.cxx
+++ b/sw/source/uibase/uitest/uiobject.cxx
@@ -14,6 +14,7 @@
 #include <wrtsh.hxx>
 #include <navipi.hxx>
 #include <sfx2/sidebar/Sidebar.hxx>
+#include <sfx2/viewfrm.hxx>
 
 SwEditWinUIObject::SwEditWinUIObject(const VclPtr<SwEditWin>& xEditWin):
     WindowUIObject(xEditWin),
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index e7ce5be812ab..6c81a7072b73 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -29,6 +29,7 @@
 #include <vcl/wrkwin.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/docfile.hxx>
 
 #include <sfx2/docinsert.hxx>
 #include <sfx2/request.hxx>
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 11ee243edcd5..dc910ca91427 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -22,6 +22,7 @@
 #include <hintids.hxx>
 #include <vcl/svapp.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svx/ruler.hxx>
 #include <editeng/lrspitem.hxx>
 #include <svl/srchitem.hxx>
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index a1d8b6b4b1f0..1e20b2caa231 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -28,6 +28,7 @@
 #include <editeng/paperinf.hxx>
 #include <editeng/lrspitem.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <view.hxx>
 #include <wrtsh.hxx>
 #include <swmodule.hxx>
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index d55a8d0819cf..c86dfa40fb5d 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -23,6 +23,7 @@
 #include <sfx2/request.hxx>
 #include <sfx2/progress.hxx>
 #include <sfx2/app.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <vcl/weld.hxx>
 #include <vcl/oldprintadaptor.hxx>
 #include <sfx2/printer.hxx>
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index a4c2f2d32582..aa961ad914aa 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -32,6 +32,7 @@
 #include <svx/pageitem.hxx>
 #include <svl/whiter.hxx>
 #include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <svl/stritem.hxx>
 #include <unotools/textsearch.hxx>
 #include <svl/itempool.hxx>
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 77d8c51b995d..f59d3103c75e 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -25,6 +25,7 @@
 #include <svx/xfillit0.hxx>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list