summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-12-15 12:23:06 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-12-20 10:43:18 +0100
commita361f46bd506f23bfef2be95a8cdf5b0e1a9791f (patch)
tree3005a938cb9378daa504e3f60fc4132f3df3a711
parent0c595cff64674c868f38392b6e4511f8133ae1b1 (diff)
tdf#42949 Fix IWYU warnings in sw/source/filter/*/*cxx
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I87263017cb0802c9f5ca21d630bf3701b9c5e73a Reviewed-on: https://gerrit.libreoffice.org/85167 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/IwyuFilter_sw.yaml50
-rw-r--r--sw/source/filter/ascii/ascatr.cxx4
-rw-r--r--sw/source/filter/ascii/parasc.cxx9
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx1
-rw-r--r--sw/source/filter/basflt/docfact.cxx5
-rw-r--r--sw/source/filter/basflt/fltini.cxx17
-rw-r--r--sw/source/filter/basflt/fltshell.cxx32
-rw-r--r--sw/source/filter/basflt/iodetect.cxx1
-rw-r--r--sw/source/filter/basflt/shellio.cxx3
-rw-r--r--sw/source/filter/docx/swdocxreader.cxx9
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx4
-rw-r--r--sw/source/filter/html/htmlatr.cxx5
-rw-r--r--sw/source/filter/html/htmlbas.cxx5
-rw-r--r--sw/source/filter/html/htmlcss1.cxx5
-rw-r--r--sw/source/filter/html/htmlctxt.cxx2
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx8
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx13
-rw-r--r--sw/source/filter/html/htmlfld.cxx2
-rw-r--r--sw/source/filter/html/htmlfldw.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.cxx8
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx3
-rw-r--r--sw/source/filter/html/htmlform.cxx3
-rw-r--r--sw/source/filter/html/htmlforw.cxx7
-rw-r--r--sw/source/filter/html/htmlgrin.cxx6
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx4
-rw-r--r--sw/source/filter/html/htmlnumwriter.cxx11
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmlsect.cxx7
-rw-r--r--sw/source/filter/html/htmltab.cxx1
-rw-r--r--sw/source/filter/html/parcss1.cxx5
-rw-r--r--sw/source/filter/html/svxcss1.cxx1
-rw-r--r--sw/source/filter/html/swhtml.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx4
-rw-r--r--sw/source/filter/writer/writer.cxx3
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx1
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx1
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx1
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx4
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx9
-rw-r--r--sw/source/filter/ww8/docxexport.cxx8
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx4
-rw-r--r--sw/source/filter/ww8/styles.cxx3
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx5
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx3
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx23
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx11
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx6
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx6
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx11
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx11
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx5
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx3
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx19
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par.cxx9
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx7
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx12
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx2
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx3
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx2
-rw-r--r--sw/source/filter/xml/swxml.cxx8
-rw-r--r--sw/source/filter/xml/wrtxml.cxx4
-rw-r--r--sw/source/filter/xml/xmlbrsh.cxx4
-rw-r--r--sw/source/filter/xml/xmlexp.cxx9
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx2
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx12
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx1
-rw-r--r--sw/source/filter/xml/xmlimp.cxx14
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx4
-rw-r--r--sw/source/filter/xml/xmliteme.cxx8
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx15
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx20
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx6
-rw-r--r--sw/source/filter/xml/xmlscript.cxx2
-rw-r--r--sw/source/filter/xml/xmltble.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx1
-rw-r--r--sw/source/filter/xml/xmltexte.cxx5
-rw-r--r--sw/source/filter/xml/xmltexti.cxx2
83 files changed, 89 insertions, 481 deletions
diff --git a/sw/IwyuFilter_sw.yaml b/sw/IwyuFilter_sw.yaml
index e60228ab0e1f..4402f28fc0c9 100644
--- a/sw/IwyuFilter_sw.yaml
+++ b/sw/IwyuFilter_sw.yaml
@@ -546,3 +546,53 @@ blacklist:
# Actually used
- com/sun/star/text/TextMarkupDescriptor.hpp
- com/sun/star/text/XTextRange.hpp
+ sw/source/filter/basflt/iodetect.cxx:
+ # Actually used
+ - com/sun/star/embed/XStorage.hpp
+ sw/source/filter/html/SwAppletImpl.cxx:
+ # Needed for direct member access
+ - com/sun/star/embed/XEmbeddedObject.hpp
+ sw/source/filter/html/htmlgrin.cxx:
+ # Needed for TypedWhichId macro to work
+ - fmtflcnt.hxx
+ sw/source/filter/html/wrthtml.cxx:
+ # Actually used
+ - comphelper/scopeguard.hxx
+ sw/source/filter/html/swhtml.cxx:
+ # Actually used
+ - com/sun/star/document/XDocumentProperties.hpp
+ sw/source/filter/ww8/docxtablestyleexport.cxx:
+ # Actually used
+ - com/sun/star/beans/PropertyValue.hpp
+ sw/source/filter/ww8/docxexport.cxx:
+ # Actually used
+ - com/sun/star/drawing/XShape.hpp
+ - com/sun/star/frame/XModel.hpp
+ - com/sun/star/awt/XControlModel.hpp
+ sw/source/filter/ww8/wrtw8nds.cxx:
+ # Actually used
+ - com/sun/star/i18n/BreakIterator.hpp
+ sw/source/filter/ww8/ww8graf.cxx:
+ # OSL_BIGENDIAN is being checked
+ - osl/endian.h
+ # Needed for implicit dtor
+ - ww8par2.hxx
+ sw/source/filter/ww8/ww8par4.cxx:
+ # OSL_BIGENDIAN is being checked
+ - osl/endian.h
+ sw/source/filter/ww8/wrtww8.cxx:
+ # OSL_BIGENDIAN is being checked
+ - osl/endian.h
+ sw/source/filter/xml/xmlitemm.cxx:
+ # Needed for TypedWhichId macro to work
+ - fmtfsize.hxx
+ sw/source/filter/xml/xmlitemi.cxx:
+ # Needed for TypedWhichId macro to work
+ - editeng/ulspitem.hxx
+ - fmtfsize.hxx
+ sw/source/filter/xml/wrtxml.cxx:
+ # Actually used
+ - com/sun/star/task/XStatusIndicator.hpp
+ sw/source/filter/xml/xmlimp.cxx:
+ # Actually used
+ - com/sun/star/text/XTextRange.hpp
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index ddf2dec8c56d..16ff215f9899 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -20,7 +20,6 @@
#include <hintids.hxx>
#include <tools/stream.hxx>
#include <comphelper/string.hxx>
-#include <editeng/fontitem.hxx>
#include <pam.hxx>
#include <doc.hxx>
#include <ndtxt.hxx>
@@ -28,11 +27,8 @@
#include <redline.hxx>
#include "wrtasc.hxx"
#include <txatbase.hxx>
-#include <fchrfmt.hxx>
#include <txtfld.hxx>
-#include <txtatr.hxx>
#include <fmtftn.hxx>
-#include <charfmt.hxx>
#include <fmtfld.hxx>
#include <fldbas.hxx>
#include <ftninfo.hxx>
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index abf10c4698e0..9f197d184658 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -21,22 +21,17 @@
#include <tools/stream.hxx>
#include <hintids.hxx>
-#include <rtl/tencinfo.h>
#include <sfx2/printer.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/formatbreakitem.hxx>
-#include <editeng/scripttypeitem.hxx>
+#include <svl/languageoptions.hxx>
#include <shellio.hxx>
#include <doc.hxx>
+#include <IDocumentContentOperations.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
-#include <swtypes.hxx>
-#include <ndtxt.hxx>
#include <pam.hxx>
-#include <frmatr.hxx>
-#include <fltini.hxx>
-#include <pagedesc.hxx>
#include <breakit.hxx>
#include <swerror.h>
#include <strings.hrc>
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index 6bae84aa980d..fcbf33f135dc 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <hintids.hxx>
#include <osl/endian.h>
#include <tools/stream.hxx>
#include <pam.hxx>
diff --git a/sw/source/filter/basflt/docfact.cxx b/sw/source/filter/basflt/docfact.cxx
index d8c3272b9245..f2302eb92cbd 100644
--- a/sw/source/filter/basflt/docfact.cxx
+++ b/sw/source/filter/basflt/docfact.cxx
@@ -17,11 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <shellio.hxx>
#include <doc.hxx>
-#include <node.hxx>
-
-#include <cmdid.h>
+#include <docfac.hxx>
SwDocFac::SwDocFac( SwDoc *pDc )
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 80593b032411..b9cfbe68e579 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -17,40 +17,23 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <string.h>
#include <hintids.hxx>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/any.hxx>
#include <tools/svlibrary.h>
-#include <svtools/parhtml.hxx>
#include <sot/storage.hxx>
-#include <comphelper/classids.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/docfilt.hxx>
-#include <sfx2/fcontnr.hxx>
-#include <sfx2/docfile.hxx>
-#include <editeng/lrspitem.hxx>
-#include <editeng/tstpitem.hxx>
#include <doc.hxx>
#include <docary.hxx>
-#include <pam.hxx>
#include <shellio.hxx>
-#include <docsh.hxx>
-#include <wdocsh.hxx>
#include <fltini.hxx>
-#include <hints.hxx>
#include <init.hxx>
-#include <frmatr.hxx>
#include <fmtfsize.hxx>
#include <swtable.hxx>
#include <fmtcntnt.hxx>
#include <editeng/boxitem.hxx>
-#include <frmfmt.hxx>
-#include <numrule.hxx>
#include <ndtxt.hxx>
#include <swfltopt.hxx>
-#include <swerror.h>
#include <swdll.hxx>
#include <iodetect.hxx>
#include <osl/module.hxx>
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index a9727bda9a4f..deffb3c791f4 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -26,54 +26,26 @@
#include <hintids.hxx>
#include <hints.hxx>
-#include <vcl/graphicfilter.hxx>
-
-#include <vcl/graph.hxx>
-#include <svl/urihelper.hxx>
-#include <editeng/boxitem.hxx>
-#include <editeng/wghtitem.hxx>
-#include <editeng/cmapitem.hxx>
-#include <editeng/contouritem.hxx>
-#include <editeng/postitem.hxx>
-#include <editeng/crossedoutitem.hxx>
+
+#include <svl/cintitem.hxx>
#include <svl/stritem.hxx>
-#include <unotools/charclass.hxx>
-#include <txtftn.hxx>
-#include <fmtpdsc.hxx>
-#include <fmtftn.hxx>
#include <fmtanchr.hxx>
-#include <fmtrfmrk.hxx>
-#include <fmtclds.hxx>
#include <fmtfld.hxx>
-#include <fmtfsize.hxx>
-#include <fmthdft.hxx>
-#include <fmtcntnt.hxx>
#include <redline.hxx>
#include <pam.hxx>
#include <doc.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
-#include <IDocumentStylePoolAccess.hxx>
-#include <IDocumentState.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentMarkAccess.hxx>
#include <ndtxt.hxx>
-#include <frmatr.hxx>
#include <fldbas.hxx>
#include <docufld.hxx>
#include <txtfld.hxx>
-#include <charatr.hxx>
-#include <swtable.hxx>
#include <tox.hxx>
#include <expfld.hxx>
#include <bookmrk.hxx>
-#include <section.hxx>
-#include <tblsel.hxx>
-#include <pagedesc.hxx>
-#include <docsh.hxx>
#include <fltshell.hxx>
-#include <viewsh.hxx>
-#include <shellres.hxx>
#include <rdfhelper.hxx>
using namespace com::sun::star;
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index afc03351a0f0..e837b47a8847 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -21,7 +21,6 @@
#include <memory>
#include <osl/endian.h>
#include <sot/storage.hxx>
-#include <svtools/parhtml.hxx>
#include <tools/urlobj.hxx>
#include <unotools/moduleoptions.hxx>
#include <sfx2/docfilt.hxx>
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 0839b1c14df6..6c924342c0dd 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -21,7 +21,6 @@
#include <osl/diagnose.h>
#include <tools/date.hxx>
#include <tools/time.hxx>
-#include <svl/urihelper.hxx>
#include <svl/fstathelper.hxx>
#include <unotools/moduleoptions.hxx>
#include <sfx2/docfile.hxx>
@@ -34,7 +33,6 @@
#include <fmtanchr.hxx>
#include <fmtfsize.hxx>
#include <fmtpdsc.hxx>
-#include <swtypes.hxx>
#include <shellio.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
@@ -60,7 +58,6 @@
#include <ndtxt.hxx>
#include <redline.hxx>
#include <swerror.h>
-#include <paratr.hxx>
#include <pausethreadstarting.hxx>
using namespace ::com::sun::star;
diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx
index b2122a2f6c4d..93cda1a66982 100644
--- a/sw/source/filter/docx/swdocxreader.cxx
+++ b/sw/source/filter/docx/swdocxreader.cxx
@@ -21,10 +21,7 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/xml/dom/XDocument.hpp>
-#include <com/sun/star/xml/dom/XElement.hpp>
-#include <com/sun/star/xml/dom/XNode.hpp>
-#include <com/sun/star/xml/dom/XNodeList.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
#include <doc.hxx>
@@ -32,14 +29,10 @@
#include <IDocumentStylePoolAccess.hxx>
#include <ndtxt.hxx>
#include <poolfmt.hxx>
-#include <svl/urihelper.hxx>
#include <swerror.h>
-#include <tools/ref.hxx>
-#include <unotxdoc.hxx>
#include <unotools/streamwrap.hxx>
#include <unotextrange.hxx>
#include <sfx2/docfile.hxx>
-#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
#define AUTOTEXT_GALLERY "autoTxt"
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index 725e94a622d5..fe79b0d26753 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -19,7 +19,6 @@
#include <SwAppletImpl.hxx>
#include <svtools/htmlkywd.hxx>
-#include <svl/urihelper.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
@@ -29,6 +28,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <svtools/embedhlp.hxx>
#include <tools/globname.hxx>
+#include <tools/urlobj.hxx>
#include <hintids.hxx>
using namespace com::sun::star;
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index b15fc85d5164..b801f67e9811 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -49,9 +49,7 @@
#include <editeng/frmdiritem.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/htmlkywd.hxx>
-#include <sfx2/htmlmode.hxx>
#include <svl/urihelper.hxx>
-#include <tools/urlobj.hxx>
#include <unotools/charclass.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <charfmt.hxx>
@@ -78,11 +76,9 @@
#include <IDocumentSettingAccess.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <swerror.h>
-#include <charatr.hxx>
#include <paratr.hxx>
#include <frmatr.hxx>
#include <poolfmt.hxx>
-#include <fltini.hxx>
#include "css1kywd.hxx"
#include "wrthtml.hxx"
#include "htmlnum.hxx"
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index ce151862aef0..d21caceb42ea 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -36,17 +36,13 @@
#include <editeng/udlnitem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/blinkitem.hxx>
-#include <editeng/cmapitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/postitem.hxx>
-#include <editeng/kernitem.hxx>
#include <editeng/wghtitem.hxx>
-#include <editeng/lspcitem.hxx>
#include <editeng/adjustitem.hxx>
#include <editeng/lrspitem.hxx>
-#include <editeng/brushitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <fchrfmt.hxx>
@@ -75,7 +71,6 @@
#include "wrthtml.hxx"
#include "htmlfly.hxx"
#include <numrule.hxx>
-#include <rtl/strbuf.hxx>
#include <rtl/character.hxx>
#include <osl/diagnose.h>
#include <deque>
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 0a105d95da8c..4e3a2d40b1ea 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -19,17 +19,13 @@
#include <config_features.h>
-#include <hintids.hxx>
#include <comphelper/string.hxx>
#include <osl/diagnose.h>
-#include <rtl/strbuf.hxx>
-#include <basic/sbx.hxx>
#include <basic/basmgr.hxx>
#include <basic/sbmod.hxx>
#include <sfx2/evntconf.hxx>
#include <sfx2/app.hxx>
#include <svtools/htmlout.hxx>
-#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include <com/sun/star/document/XEventsSupplier.hpp>
@@ -37,7 +33,6 @@
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
-#include <fmtornt.hxx>
#include <fmtfld.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 8d7499a82aa2..3dba704e9954 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -19,11 +19,10 @@
#include <hintids.hxx>
#include <svl/itemiter.hxx>
-#include <svl/whiter.hxx>
#include <svl/urihelper.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <sfx2/docfile.hxx>
-#include <vcl/svapp.hxx>
+#include <editeng/editids.hrc>
#include <editeng/fhgtitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/lrspitem.hxx>
@@ -45,13 +44,11 @@
#include <frmatr.hxx>
#include <charfmt.hxx>
#include <docary.hxx>
-#include <svx/svxids.hrc>
#include <osl/diagnose.h>
#include <doc.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <pam.hxx>
-#include <ndtxt.hxx>
#include <poolfmt.hxx>
#include <docsh.hxx>
#include <paratr.hxx>
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 00f2198b354d..48a270b80862 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -32,11 +32,9 @@
#include <doc.hxx>
#include <pam.hxx>
-#include <ndtxt.hxx>
#include <shellio.hxx>
#include <paratr.hxx>
#include "htmlnum.hxx"
-#include "css1kywd.hxx"
#include "swcss1.hxx"
#include "swhtml.hxx"
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index dabb479722c8..0aadae724084 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -19,7 +19,6 @@
#include <hintids.hxx>
#include <vcl/svapp.hxx>
-#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
@@ -30,7 +29,6 @@
#include <svx/sdtaiitm.hxx>
#include <svx/sdtmfitm.hxx>
#include <editeng/eeitem.hxx>
-#include <editeng/outliner.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
#include <editeng/colritem.hxx>
@@ -38,27 +36,21 @@
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <svl/itemiter.hxx>
-#include <svl/whiter.hxx>
-#include <svtools/htmlout.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-#include <svx/svdpool.hxx>
#include <charatr.hxx>
#include <drawdoc.hxx>
-#include <frmfmt.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtsrnd.hxx>
#include <ndtxt.hxx>
#include <doc.hxx>
#include <IDocumentDrawModelAccess.hxx>
-#include <dcontact.hxx>
#include <poolfmt.hxx>
#include "swcss1.hxx"
#include "swhtml.hxx"
#include <shellio.hxx>
-#include <rtl/strbuf.hxx>
using namespace css;
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index 6b9a2035f77b..7418be69fa9a 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -19,8 +19,6 @@
#include <hintids.hxx>
#include <vcl/svapp.hxx>
-#include <svx/svdmodel.hxx>
-#include <svx/svdpage.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
#include <svx/sdtacitm.hxx>
@@ -31,27 +29,16 @@
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
#include <editeng/colritem.hxx>
-#include <editeng/brushitem.hxx>
-#include <editeng/lrspitem.hxx>
-#include <editeng/ulspitem.hxx>
-#include <svl/itemiter.hxx>
#include <svl/whiter.hxx>
#include <svtools/htmlout.hxx>
-#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-#include <svx/svdpool.hxx>
#include <rtl/strbuf.hxx>
#include <IDocumentDrawModelAccess.hxx>
-#include <charatr.hxx>
#include <frmfmt.hxx>
-#include <fmtanchr.hxx>
-#include <fmtsrnd.hxx>
-#include <ndtxt.hxx>
#include <doc.hxx>
#include <dcontact.hxx>
-#include <poolfmt.hxx>
#include "wrthtml.hxx"
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index e7de3fad7ee6..b3873dc92145 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -24,7 +24,7 @@
#include <docsh.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <svtools/htmltokn.h>
-#include <svl/zformat.hxx>
+#include <svl/zforlist.hxx>
#include <unotools/useroptions.hxx>
#include <fmtfld.hxx>
#include <ndtxt.hxx>
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 2f153fdd3b79..2f058945196d 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -17,12 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <comphelper/string.hxx>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
-#include <svtools/htmltokn.h>
#include <osl/diagnose.h>
#include <fmtfld.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 8546e8d01721..4a333ed3d65f 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -21,16 +21,8 @@
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
-#include <fmturl.hxx>
-#include <fmtfsize.hxx>
-#include <fmtclds.hxx>
-#include <fmtcntnt.hxx>
-#include <fmtsrnd.hxx>
-#include <fmtinfmt.hxx>
#include <flypos.hxx>
-#include <docary.hxx>
-#include <doc.hxx>
#include <frmfmt.hxx>
#include <ndindex.hxx>
#include <pam.hxx>
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 70fd94ea3360..c9f1d06ded86 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -21,7 +21,6 @@
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <svx/svxids.hrc>
#include <hintids.hxx>
#include <tools/fract.hxx>
#include <svl/urihelper.hxx>
@@ -54,7 +53,6 @@
#include <frmatr.hxx>
#include <grfatr.hxx>
#include <flypos.hxx>
-#include <docary.hxx>
#include <ndgrf.hxx>
#include <doc.hxx>
@@ -63,7 +61,6 @@
#include <swerror.h>
#include <frmfmt.hxx>
#include "wrthtml.hxx"
-#include "css1kywd.hxx"
#include "htmlatr.hxx"
#include "htmlfly.hxx"
#include "htmlreqifreader.hxx"
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 6f536bab0bdc..21631bb9ad12 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -26,7 +26,6 @@
#include <svtools/htmlkywd.hxx>
#include <svtools/htmltokn.h>
#include <svl/urihelper.hxx>
-#include <sfx2/request.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/event.hxx>
#include <sfx2/sfxsids.hrc>
@@ -42,7 +41,6 @@
#include <editeng/udlnitem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <svx/svdouno.hxx>
-#include <svx/fmglob.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/form/ListSourceType.hpp>
#include <com/sun/star/form/FormButtonType.hpp>
@@ -74,7 +72,6 @@
#include <viewsh.hxx>
#include <unodraw.hxx>
#include <unotextrange.hxx>
-#include <dcontact.hxx>
#include "swcss1.hxx"
#include "swhtml.hxx"
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 4a64e9873b3e..371daae0a26e 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -17,11 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/form/FormSubmitEncoding.hpp>
#include <com/sun/star/form/FormSubmitMethod.hpp>
#include <com/sun/star/form/FormButtonType.hpp>
-#include <com/sun/star/script/XEventAttacher.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
@@ -34,12 +32,10 @@
#include <vcl/svapp.hxx>
#include <svl/macitem.hxx>
#include <svtools/htmlout.hxx>
-#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include <svl/urihelper.hxx>
#include <vcl/unohelp.hxx>
#include <svx/svdouno.hxx>
-#include <svx/fmglob.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/fhgtitem.hxx>
@@ -56,13 +52,10 @@
#include <doc.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
-#include <ndtxt.hxx>
-#include <flypos.hxx>
#include "wrthtml.hxx"
#include "htmlfly.hxx"
#include "htmlform.hxx"
#include <frmfmt.hxx>
-#include <rtl/strbuf.hxx>
#include <memory>
using namespace ::com::sun::star;
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 4df050d60acb..c3fc76700917 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -22,19 +22,16 @@
#include <comphelper/string.hxx>
#include <comphelper/documentinfo.hxx>
#include <vcl/svapp.hxx>
-#include <svx/svxids.hrc>
#include <i18nlangtag/languagetag.hxx>
#include <svl/stritem.hxx>
#include <svl/urihelper.hxx>
+#include <svl/languageoptions.hxx>
#include <editeng/fhgtitem.hxx>
-#include <editeng/lrspitem.hxx>
-#include <editeng/adjustitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/langitem.hxx>
-#include <editeng/scripttypeitem.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/event.hxx>
#include <vcl/imap.hxx>
@@ -51,7 +48,6 @@
#include <fmtcntnt.hxx>
#include <fmtanchr.hxx>
#include <fmtfsize.hxx>
-#include <frmatr.hxx>
#include <charatr.hxx>
#include <frmfmt.hxx>
#include <charfmt.hxx>
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index c443b93c6a00..cf20539e8b13 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -18,11 +18,9 @@
*/
#include <com/sun/star/text/VertOrientation.hpp>
-#include <com/sun/star/style/NumberingType.hpp>
#include <hintids.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-#include <svtools/htmlout.hxx>
#include <svl/urihelper.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/lrspitem.hxx>
@@ -40,8 +38,6 @@
#include "swcss1.hxx"
#include "swhtml.hxx"
-#include <SwNodeNum.hxx>
-
using namespace css;
// <UL TYPE=...>
diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx
index 76ab63d909b6..9658b510a3a4 100644
--- a/sw/source/filter/html/htmlnumwriter.cxx
+++ b/sw/source/filter/html/htmlnumwriter.cxx
@@ -17,28 +17,17 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <com/sun/star/style/NumberingType.hpp>
-#include <hintids.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
-#include <svl/urihelper.hxx>
-#include <editeng/brushitem.hxx>
-#include <editeng/lrspitem.hxx>
-#include <vcl/svapp.hxx>
#include <numrule.hxx>
#include <doc.hxx>
-#include <docary.hxx>
-#include <poolfmt.hxx>
#include <ndtxt.hxx>
-#include <paratr.hxx>
#include <pam.hxx>
#include "htmlnum.hxx"
#include "wrthtml.hxx"
-#include <SwNodeNum.hxx>
-#include <rtl/strbuf.hxx>
#include <osl/diagnose.h>
using namespace css;
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 50a46bc70ffa..bf35d49b244d 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -35,6 +35,7 @@
#include <svtools/htmlkywd.hxx>
#include <svtools/htmltokn.h>
#include <tools/diagnose_ex.h>
+#include <IDocumentContentOperations.hxx>
#include <SwAppletImpl.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
@@ -48,10 +49,8 @@
#include <unotools/streamwrap.hxx>
#include <pam.hxx>
#include <doc.hxx>
-#include <ndtxt.hxx>
#include <swerror.h>
#include <ndole.hxx>
-#include <swtable.hxx>
#include <docsh.hxx>
#include "swhtml.hxx"
#include "wrthtml.hxx"
@@ -65,7 +64,6 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/io/XActiveDataStreamer.hpp>
-#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/embed/XEmbedPersist2.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 1a14cc25bf10..8fdee86e4bed 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
#include <rtl/uri.hxx>
#include <svl/urihelper.hxx>
@@ -30,15 +32,11 @@
#include <osl/diagnose.h>
#include <hintids.hxx>
-#include <fmtornt.hxx>
#include <fmthdft.hxx>
#include <fmtcntnt.hxx>
-#include <fmtfsize.hxx>
#include <fmtclds.hxx>
#include <fmtanchr.hxx>
#include <fmtpdsc.hxx>
-#include <fmtsrnd.hxx>
-#include <fmtflcnt.hxx>
#include <frmatr.hxx>
#include <doc.hxx>
#include <pam.hxx>
@@ -48,7 +46,6 @@
#include <poolfmt.hxx>
#include <pagedesc.hxx>
#include <swtable.hxx>
-#include <viewsh.hxx>
#include "swcss1.hxx"
#include "swhtml.hxx"
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 75aaadd620a8..6d5fadbde1a6 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -60,7 +60,6 @@
#include "htmlnum.hxx"
#include "swhtml.hxx"
#include "swcss1.hxx"
-#include <numrule.hxx>
#include <txtftn.hxx>
#include <itabenum.hxx>
#include <tblafmt.hxx>
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index e7dd8d1d70a3..ba436978a9d7 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -17,16 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <stdlib.h>
-#include <limits.h>
#include <osl/diagnose.h>
#include <rtl/character.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/color.hxx>
-#include <vcl/svapp.hxx>
+#include <tools/solar.h>
#include <svtools/htmltokn.h>
#include <comphelper/string.hxx>
-#include "css1kywd.hxx"
#include "parcss1.hxx"
// Loop-Check: Used to avoid infinite loops, is checked after every
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 6d4621c392af..07d5cd0d844b 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -51,7 +51,6 @@
#include <editeng/frmdiritem.hxx>
#include <editeng/orphitem.hxx>
#include <svtools/svparser.hxx>
-#include <swtypes.hxx>
#include <vcl/svapp.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 2ed9ed17625f..ddafcc9f0cee 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -46,7 +46,6 @@
#include <unotools/pathoptions.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/event.hxx>
-#include <sfx2/fcontnr.hxx>
#include <sfx2/docfile.hxx>
#include <svtools/htmlcfg.hxx>
@@ -74,7 +73,6 @@
#include <charatr.hxx>
#include <fmtfld.hxx>
#include <fmtpdsc.hxx>
-#include <txtfld.hxx>
#include <fmtanchr.hxx>
#include <fmtsrnd.hxx>
#include <fmtfsize.hxx>
@@ -84,7 +82,6 @@
#include <fmtfollowtextflow.hxx>
#include <fmtornt.hxx>
#include <docary.hxx>
-#include <docstat.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentSettingAccess.hxx>
@@ -98,7 +95,6 @@
#include <pam.hxx>
#include <ndtxt.hxx>
#include <mdiexp.hxx>
-#include <expfld.hxx>
#include <poolfmt.hxx>
#include <pagedesc.hxx>
#include <IMark.hxx>
@@ -114,6 +110,7 @@
#include <breakit.hxx>
#include <SwAppletImpl.hxx>
#include <swdll.hxx>
+#include <txatbase.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/svdobj.hxx>
@@ -122,7 +119,6 @@
#include <comphelper/sequence.hxx>
#include <swerror.h>
-#include <hints.hxx>
#include <ndole.hxx>
#include <unoframe.hxx>
#include "css1atr.hxx"
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 28e70f994cea..401c279895ef 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -21,6 +21,7 @@
#include <hintids.hxx>
#include <comphelper/string.hxx>
#include <svl/urihelper.hxx>
+#include <svl/languageoptions.hxx>
#include <rtl/tencinfo.h>
#include <sfx2/linkmgr.hxx>
#include <sfx2/docfile.hxx>
@@ -37,8 +38,6 @@
#include <editeng/lrspitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/brushitem.hxx>
-#include <editeng/fontitem.hxx>
-#include <editeng/scripttypeitem.hxx>
#include <editeng/langitem.hxx>
#include <svl/stritem.hxx>
#include <editeng/frmdiritem.hxx>
@@ -54,7 +53,6 @@
#include <docary.hxx>
#include <pam.hxx>
#include <doc.hxx>
-#include <ndgrf.hxx>
#include <ndtxt.hxx>
#include <mdiexp.hxx>
#include <fltini.hxx>
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index fa56eb08f519..7214c84b3ca7 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -22,12 +22,9 @@
#include <sot/storage.hxx>
#include <sfx2/docfile.hxx>
-#include <svl/urihelper.hxx>
-#include <vcl/graphicfilter.hxx>
#include <tools/diagnose_ex.h>
#include <editeng/fontitem.hxx>
#include <editeng/eeitem.hxx>
-#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <shellio.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index a881d5e8fd7d..800be2431cf2 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -27,7 +27,6 @@
#include <shellio.hxx>
#include <wrt_fn.hxx>
#include <node.hxx>
-#include <format.hxx>
Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
{
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 08aec9208008..5135ee64ef58 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -30,7 +30,6 @@
#include <frmfmt.hxx>
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
-#include <frmatr.hxx>
#include <htmltbl.hxx>
using ::editeng::SvxBorderLine;
diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx
index 7b5c4efb7467..291cd845d439 100644
--- a/sw/source/filter/ww8/WW8FFData.cxx
+++ b/sw/source/filter/ww8/WW8FFData.cxx
@@ -19,7 +19,6 @@
#include "WW8FFData.hxx"
#include <tools/stream.hxx>
-#include <doc.hxx>
#include "writerwordglue.hxx"
#include "wrtww8.hxx"
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index 628f3194b805..cd253087d68a 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -18,12 +18,8 @@
*/
#include <iostream>
-#include <dbgoutsw.hxx>
#include "WW8Sttbf.hxx"
-#include "ww8scan.hxx"
-#include <cstdio>
#include <osl/endian.h>
-#include <rtl/ustrbuf.hxx>
#include <o3tl/make_shared.hxx>
#include <tools/stream.hxx>
#include <sal/log.hxx>
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index e2753c4d0de1..b0227b75813e 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -18,7 +18,6 @@
*/
#include <iostream>
-#include <set>
#include <stdio.h>
#include "WW8TableInfo.hxx"
#include <fmtfsize.hxx>
@@ -26,7 +25,6 @@
#include <swtable.hxx>
#include <frmfmt.hxx>
#include <pam.hxx>
-#include <ndtxt.hxx>
#include <dbgoutsw.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 643b15b10fbf..922b70e0f12c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -35,7 +35,6 @@
#include <redline.hxx>
#include <unocoll.hxx>
#include <unoframe.hxx>
-#include <unodraw.hxx>
#include <textboxhelper.hxx>
#include <rdfhelper.hxx>
#include "wrtww8.hxx"
@@ -91,7 +90,6 @@
#include <editeng/keepitem.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflgrit.hxx>
-#include <svx/fmglob.hxx>
#include <svx/svdouno.hxx>
#include <svl/grabbagitem.hxx>
#include <sfx2/sfxbasemodel.hxx>
@@ -116,19 +114,14 @@
#include <ndtxt.hxx>
#include <pagedesc.hxx>
#include <paratr.hxx>
-#include <poolfmt.hxx>
-#include <charatr.hxx>
#include <swmodule.hxx>
#include <swtable.hxx>
#include <txtftn.hxx>
-#include <txtinet.hxx>
#include <fmtautofmt.hxx>
#include <docsh.hxx>
#include <docary.hxx>
#include <fmtclbl.hxx>
-#include <fmthdft.hxx>
#include <IDocumentSettingAccess.hxx>
-#include <IDocumentStylePoolAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <grfatr.hxx>
#include <frmatr.hxx>
@@ -137,14 +130,12 @@
#include <osl/file.hxx>
#include <utility>
#include <vcl/embeddedfontshelper.hxx>
-#include <svtools/miscopt.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/drawing/ShadingPattern.hpp>
#include <com/sun/star/text/GraphicCrop.hpp>
-#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <algorithm>
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index d71d16c00fc6..526d100768c8 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -43,7 +43,6 @@
#include <oox/export/shapes.hxx>
#include <oox/helper/propertyset.hxx>
#include <oox/token/relationship.hxx>
-#include <oox/helper/binaryoutputstream.hxx>
#include <oox/ole/olestorage.hxx>
#include <oox/ole/olehelper.hxx>
@@ -57,7 +56,6 @@
#include <docsh.hxx>
#include <ndtxt.hxx>
#include "wrtww8.hxx"
-#include <fltini.hxx>
#include <fmtline.hxx>
#include <fmtpdsc.hxx>
#include <frmfmt.hxx>
@@ -73,22 +71,16 @@
#include <editeng/brushitem.hxx>
#include <editeng/hyphenzoneitem.hxx>
-#include <docary.hxx>
-#include <numrule.hxx>
-#include <charfmt.hxx>
#include <viewsh.hxx>
#include <viewopt.hxx>
-#include "ww8par.hxx"
#include "ww8scan.hxx"
#include <oox/token/properties.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/storagehelper.hxx>
#include <o3tl/any.hxx>
-#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
-#include <vcl/font.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <tools/diagnose_ex.h>
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index 63f382a18481..ad44c9190931 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -19,17 +19,15 @@
#include <memory>
#include "docxexportfilter.hxx"
-#include "rtfexportfilter.hxx"
#include "docxexport.hxx"
#include <docsh.hxx>
-#include <editsh.hxx>
#include <pam.hxx>
#include <PostItMgr.hxx>
#include <unotxdoc.hxx>
#include <IDocumentLayoutAccess.hxx>
+#include <viewsh.hxx>
-#include <cppuhelper/implementationentry.hxx>
#include <unotools/mediadescriptor.hxx>
using namespace ::comphelper;
diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx
index 43c10223b815..2265337e6f0b 100644
--- a/sw/source/filter/ww8/styles.cxx
+++ b/sw/source/filter/ww8/styles.cxx
@@ -19,9 +19,6 @@
#include <wwstyles.hxx>
-#include <functional>
-#include <algorithm>
-#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
namespace
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 86288161fbb6..226a367db032 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -21,7 +21,6 @@
#include <sal/log.hxx>
#include <com/sun/star/util/CloseVetoException.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
#include <doc.hxx>
#include "writerhelper.hxx"
@@ -32,9 +31,7 @@
#include <svl/itemiter.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdoole2.hxx>
-#include <svx/fmglob.hxx>
#include <editeng/formatbreakitem.hxx>
-#include <editeng/tstpitem.hxx>
#include <ndtxt.hxx>
#include <ndnotxt.hxx>
#include <fmtcntnt.hxx>
@@ -42,7 +39,6 @@
#include <frmfmt.hxx>
#include <flypos.hxx>
#include <fmtanchr.hxx>
-#include <ndgrf.hxx>
#include <fmtfsize.hxx>
#include <SwStyleNameMapper.hxx>
#include <docary.hxx>
@@ -50,7 +46,6 @@
#include <fchrfmt.hxx>
#include <redline.hxx>
#include "types.hxx"
-#include <unotools/streamwrap.hxx>
#include <svtools/embedhlp.hxx>
#include <numrule.hxx>
#include <vcl/svapp.hxx>
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index 256020c82a11..b1ff51aab134 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -33,8 +33,6 @@
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <unotools/fontcvt.hxx>
-#include <editeng/paperinf.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/boxitem.hxx>
@@ -49,7 +47,6 @@
#include <frmatr.hxx>
#include <ndtxt.hxx>
#include <breakit.hxx>
-#include <i18nlangtag/mslangid.hxx>
using namespace css;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 18f8386751b1..33f2bccd2cfe 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -23,45 +23,38 @@
#include <hintids.hxx>
#include <o3tl/any.hxx>
-#include <vcl/cvtgrf.hxx>
-#include <vcl/virdev.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <vcl/svapp.hxx>
#include <sot/storage.hxx>
-#include <vcl/graphicfilter.hxx>
#include <svl/itemiter.hxx>
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
-#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <editeng/outlobj.hxx>
#include <editeng/editobj.hxx>
-#include <svx/unoshape.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/frmdiritem.hxx>
-#include <svx/svdoole2.hxx>
-#include <editeng/editeng.hxx>
#include <editeng/flditem.hxx>
#include <editeng/shaditem.hxx>
-#include <svx/fmglob.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/formatbreakitem.hxx>
#include <svx/svdouno.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdview.hxx>
+#include <svx/unopage.hxx>
#include <fmtcnct.hxx>
#include <fmtanchr.hxx>
#include <fmtsrnd.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
#include <fmtfollowtextflow.hxx>
-#include <dcontact.hxx>
#include <frmfmt.hxx>
-#include <frmatr.hxx>
#include <fmtcntnt.hxx>
#include <ndindex.hxx>
#include <doc.hxx>
@@ -74,14 +67,13 @@
#include <ndgrf.hxx>
#include <grfatr.hxx>
#include <ndole.hxx>
-#include <unodraw.hxx>
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include "ww8par.hxx"
#include <breakit.hxx>
-#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include "ww8attributeoutput.hxx"
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include "attributeoutputbase.hxx"
#include "writerhelper.hxx"
#include "writerwordglue.hxx"
#include "wrtww8.hxx"
@@ -90,15 +82,10 @@
#include "WW8FFData.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
-#include <docsh.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <oox/ole/olehelper.hxx>
-#include <fstream>
-#include <unotools/streamwrap.hxx>
-#include <fmtinfmt.hxx>
#include <fmturl.hxx>
#include <sfx2/sfxsids.hrc>
-#include <svl/urihelper.hxx>
#include <unotools/saveopt.hxx>
#include <o3tl/enumrange.hxx>
#include <o3tl/enumarray.hxx>
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index b3afd2ce0729..ec28de57150b 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -18,19 +18,15 @@
*/
#include <vector>
-#include <list>
#include <utility>
#include <algorithm>
#include <iostream>
-#include <oox/core/filterbase.hxx>
#include "docxexport.hxx"
-#include "docxexportfilter.hxx"
#include <i18nlangtag/mslangid.hxx>
#include <hintids.hxx>
#include <tools/urlobj.hxx>
-#include <editeng/boxitem.hxx>
#include <editeng/cmapitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/svxfont.hxx>
@@ -47,10 +43,7 @@
#include <svl/urihelper.hxx>
#include <svl/whiter.hxx>
#include <fmtpdsc.hxx>
-#include <fmtfsize.hxx>
-#include <fmtornt.hxx>
#include <fmtlsplt.hxx>
-#include <fmtflcnt.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>
#include <frmatr.hxx>
@@ -75,14 +68,11 @@
#include <swrect.hxx>
#include <reffld.hxx>
#include <redline.hxx>
-#include <wrtswtbl.hxx>
-#include <htmltbl.hxx>
#include <txttxmrk.hxx>
#include <fmtline.hxx>
#include <fmtruby.hxx>
#include <breakit.hxx>
#include <txtatr.hxx>
-#include <fmtsrnd.hxx>
#include <fmtrowsplt.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/i18n/BreakIterator.hpp>
@@ -90,7 +80,6 @@
#include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/text/RubyPosition.hpp>
#include <oox/export/vmlexport.hxx>
-#include <sfx2/docfile.hxx>
#include <sal/log.hxx>
#include <comphelper/propertysequence.hxx>
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 35b8c60a89b7..21e3b96e1559 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -19,16 +19,11 @@
#include <hintids.hxx>
#include <vcl/font.hxx>
-#include <editeng/fontitem.hxx>
-#include <editeng/lrspitem.hxx>
#include <editeng/langitem.hxx>
#include <doc.hxx>
#include <docary.hxx>
#include <numrule.hxx>
-#include <paratr.hxx>
#include <charfmt.hxx>
-#include <ndtxt.hxx>
-#include <unotools/fontcfg.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
#include "sprmids.hxx"
@@ -39,7 +34,6 @@
#include "wrtww8.hxx"
#include "ww8par.hxx"
-#include <mutex>
#include <numeric>
using namespace ::com::sun::star;
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 30a150744486..b0dd924a1aa7 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -18,22 +18,17 @@
*/
#include <algorithm>
-#include <functional>
#include <memory>
#include <com/sun/star/i18n/ScriptType.hpp>
-#include <rtl/tencinfo.h>
#include <hintids.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/fontitem.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
#include <svx/svdouno.hxx>
-#include <svx/fmglob.hxx>
-#include <editeng/frmdiritem.hxx>
#include <editeng/lrspitem.hxx>
-#include <editeng/ulspitem.hxx>
#include <doc.hxx>
#include "wrtww8.hxx"
#include <docary.hxx>
@@ -70,7 +65,6 @@
#include "ww8attributeoutput.hxx"
#include "docxattributeoutput.hxx"
#include "rtfattributeoutput.hxx"
-#include <IDocumentSettingAccess.hxx>
#include <unordered_set>
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 06d347d30fe8..5e66e9f1932c 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -25,7 +25,6 @@
#include <unotools/ucbstreamhelper.hxx>
#include <algorithm>
#include <map>
-#include <set>
#include <hintids.hxx>
#include <string.h>
#include <osl/endian.h>
@@ -35,13 +34,10 @@
#include <unotools/fltrcfg.hxx>
#include <sot/storage.hxx>
-#include <svl/zformat.hxx>
#include <sfx2/docinf.hxx>
#include <editeng/tstpitem.hxx>
-#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <editeng/hyphenzoneitem.hxx>
-#include <editeng/langitem.hxx>
#include <filter/msfilter/classids.hxx>
#include <filter/msfilter/msoleexp.hxx>
#include <editeng/lrspitem.hxx>
@@ -51,7 +47,6 @@
#include <swtypes.hxx>
#include <swrect.hxx>
#include <swtblfmt.hxx>
-#include <txatbase.hxx>
#include <fmtcntnt.hxx>
#include <fmtpdsc.hxx>
#include <fmtrowsplt.hxx>
@@ -76,17 +71,13 @@
#include <swtable.hxx>
#include "wrtww8.hxx"
#include "ww8par.hxx"
-#include <fltini.hxx>
#include <swmodule.hxx>
#include <section.hxx>
-#include <swfltopt.hxx>
#include <fmtinfmt.hxx>
#include <txtinet.hxx>
#include <fmturl.hxx>
-#include <fesh.hxx>
#include <vcl/imap.hxx>
#include <vcl/imapobj.hxx>
-#include <tools/urlobj.hxx>
#include <mdiexp.hxx>
#include <strings.hrc>
#include <fmtline.hxx>
@@ -97,13 +88,11 @@
#include "writerhelper.hxx"
#include "writerwordglue.hxx"
#include "ww8attributeoutput.hxx"
-#include <IDocumentMarkAccess.hxx>
#include <xmloff/odffields.hxx>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <dbgoutsw.hxx>
#include <sfx2/docfile.hxx>
-#include <sfx2/request.hxx>
#include <sfx2/frame.hxx>
#include <svl/stritem.hxx>
#include <unotools/tempfile.hxx>
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 0751ce007087..886f6946d046 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -21,25 +21,17 @@
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
-#include <rtl/math.hxx>
#include <sal/log.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/gdimtf.hxx>
-#include <vcl/wmf.hxx>
#include <svl/itemiter.hxx>
-#include <svl/urihelper.hxx>
#include <svtools/embedhlp.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/svapp.hxx>
-
#include <hintids.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
#include <filter/msfilter/msoleexp.hxx>
-#include <editeng/lrspitem.hxx>
-#include <editeng/ulspitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <svx/svdoole2.hxx>
@@ -66,9 +58,6 @@
#include "ww8attributeoutput.hxx"
#include <fmturl.hxx>
-#include <docsh.hxx>
-#include <cstdio>
-#include <o3tl/enumrange.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <drawdoc.hxx>
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 8f4e051d2c5d..5db07effbb79 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -103,7 +103,6 @@
#include <docufld.hxx>
#include <expfld.hxx>
#include <pagedesc.hxx>
-#include <flddat.hxx>
#include <ndtxt.hxx>
#include <swrect.hxx>
#include <redline.hxx>
@@ -111,7 +110,6 @@
#include <ftninfo.hxx>
#include <charfmt.hxx>
#include <section.hxx>
-#include <lineinfo.hxx>
#include <fmtline.hxx>
#include <tox.hxx>
#include <fmtftntx.hxx>
@@ -120,7 +118,6 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <unotools/localedatawrapper.hxx>
#include <svx/unobrushitemhelper.hxx>
-#include <svx/xenum.hxx>
#include <tgrditem.hxx>
#include <flddropdown.hxx>
#include <chpfld.hxx>
@@ -137,10 +134,8 @@
#include "ww8par.hxx"
#include "ww8attributeoutput.hxx"
#include "fields.hxx"
-#include <vcl/outdev.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <unotools/fltrcfg.hxx>
-#include <o3tl/enumrange.hxx>
using ::editeng::SvxBorderLine;
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 15e6955edd25..7606b2436797 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -20,8 +20,6 @@
#include <memory>
#include <tools/urlobj.hxx>
#include <svl/urihelper.hxx>
-#include <rtl/tencinfo.h>
-#include <swerror.h>
#include <ndtxt.hxx>
#include <pam.hxx>
#include <poolfmt.hxx>
@@ -34,7 +32,6 @@
#include <docary.hxx>
#include "ww8glsy.hxx"
#include "ww8par.hxx"
-#include "ww8par2.hxx"
WW8Glossary::WW8Glossary(tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVersion, SotStorage *pStg)
: rStrm(refStrm)
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index bacc90a07ecd..df78fd4f6a76 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -22,10 +22,7 @@
#include <hintids.hxx>
#include <osl/endian.h>
#include <sal/log.hxx>
-#include <svx/fmglob.hxx>
-#include <svx/sdtaitm.hxx>
#include <editeng/lrspitem.hxx>
-#include <editeng/udlnitem.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xlineit0.hxx>
#include <svx/xlnclit.hxx>
@@ -60,19 +57,8 @@
#include <svx/svdogrp.hxx>
#include <svx/svdograf.hxx>
#include <svx/svdoole2.hxx>
-#include <editeng/colritem.hxx>
-#include <editeng/fhgtitem.hxx>
-#include <editeng/postitem.hxx>
-#include <editeng/adjustitem.hxx>
-#include <editeng/wghtitem.hxx>
-#include <editeng/crossedoutitem.hxx>
-#include <editeng/contouritem.hxx>
-#include <editeng/shdditem.hxx>
-#include <editeng/fontitem.hxx>
#include <editeng/ulspitem.hxx>
-#include <svx/svdoattr.hxx>
#include <editeng/brushitem.hxx>
-#include <svx/rectenum.hxx>
#include <editeng/opaqitem.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/boxitem.hxx>
@@ -89,13 +75,10 @@
#include <doc.hxx>
#include <drawdoc.hxx>
#include <IDocumentDrawModelAccess.hxx>
-#include <docary.hxx>
#include <ndgrf.hxx>
-#include <ndtxt.hxx>
#include <dcontact.hxx>
#include <docsh.hxx>
#include <mdiexp.hxx>
-#include <fmtcnct.hxx>
#include "ww8struc.hxx"
#include "ww8scan.hxx"
#include "ww8par.hxx"
@@ -112,8 +95,6 @@
#include <editeng/editobj.hxx>
#include <math.h>
#include <fmturl.hxx>
-#include <svx/hlnkitem.hxx>
-#include <svl/whiter.hxx>
#include <o3tl/enumrange.hxx>
#include <o3tl/safeint.hxx>
#include <memory>
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 809d587eefda..a540648b85f4 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -22,25 +22,17 @@
#include <hintids.hxx>
#include <svl/urihelper.hxx>
#include <svx/svdpage.hxx>
-#include <svx/svdmodel.hxx>
#include <svx/svdograf.hxx>
#include <svx/svdoole2.hxx>
-#include <editeng/opaqitem.hxx>
#include <filter/msfilter/msdffimp.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/fcontnr.hxx>
#include <unotools/configmgr.hxx>
#include <grfatr.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>
-#include <fmtflcnt.hxx>
#include <frmfmt.hxx>
-#include <fltshell.hxx>
#include <pam.hxx>
#include <doc.hxx>
#include <IDocumentLayoutAccess.hxx>
-#include <ndtxt.hxx>
#include <mdiexp.hxx>
#include "writerwordglue.hxx"
#include "ww8struc.hxx"
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 3c3961910b2a..afd94ee89ecc 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -36,8 +36,8 @@
#include <rtl/ustrbuf.hxx>
#include <sfx2/docinf.hxx>
-#include <sfx2/request.hxx>
#include <sfx2/frame.hxx>
+#include <sfx2/zoomitem.hxx>
#include <tools/urlobj.hxx>
#include <unotools/tempfile.hxx>
@@ -96,14 +96,11 @@
#include <docufld.hxx>
#include <swfltopt.hxx>
#include <viewsh.hxx>
-#include <viewopt.hxx>
#include <shellres.hxx>
-#include <mdiexp.hxx>
#include <swerror.h>
#include <swtable.hxx>
#include <fchrfmt.hxx>
#include <charfmt.hxx>
-#include <unocrsr.hxx>
#include <IDocumentSettingAccess.hxx>
#include "sprmids.hxx"
@@ -113,7 +110,6 @@
#include <ndgrf.hxx>
#include <editeng/editids.hrc>
-#include <txtflcnt.hxx>
#include <fmtflcnt.hxx>
#include <txatbase.hxx>
@@ -140,7 +136,6 @@
#include <dbgoutsw.hxx>
#endif
-#include <svx/hlnkitem.hxx>
#include <sfx2/docfile.hxx>
#include <swdll.hxx>
#include "WW8Sttbf.hxx"
@@ -153,7 +148,7 @@ using namespace sw::util;
using namespace sw::types;
using namespace nsHdFtFlags;
-#include <com/sun/star/i18n/BreakIterator.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <unotools/pathoptions.hxx>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 505a372d27b6..54fa9782332f 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -22,7 +22,6 @@
#include <comphelper/string.hxx>
#include <tools/solar.h>
-#include <vcl/vclenum.hxx>
#include <vcl/font.hxx>
#include <hintids.hxx>
#include <editeng/colritem.hxx>
@@ -31,12 +30,9 @@
#include <editeng/brushitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/lrspitem.hxx>
-#include <editeng/ulspitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/hyphenzoneitem.hxx>
#include <editeng/frmdiritem.hxx>
-#include <editeng/langitem.hxx>
-#include <editeng/charrotateitem.hxx>
#include <editeng/pgrditem.hxx>
#include <msfilter.hxx>
#include <pam.hxx>
@@ -49,15 +45,12 @@
#include <swtable.hxx>
#include <tblsel.hxx>
#include <mdiexp.hxx>
-#include <fmtpdsc.hxx>
#include <txtftn.hxx>
#include <frmfmt.hxx>
#include <ftnidx.hxx>
#include <fmtftn.hxx>
#include <fmtlsplt.hxx>
#include <charfmt.hxx>
-#include <SwStyleNameMapper.hxx>
-#include <fltshell.hxx>
#include <fmtanchr.hxx>
#include <fmtrowsplt.hxx>
#include <fmtfollowtextflow.hxx>
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index f0aee3225cdc..4a8c500bc345 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -24,7 +24,7 @@
#include <sal/log.hxx>
#include <vcl/unohelp.hxx>
-#include <com/sun/star/form/XForm.hpp>
+#include <com/sun/star/form/XFormComponent.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 581153ae3673..3c0c6a70194c 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -23,9 +23,7 @@
#include <com/sun/star/embed/XClassifiedObject.hpp>
#include <com/sun/star/embed/Aspects.hpp>
-#include <algorithm>
#include <cstddef>
-#include <functional>
#include <osl/endian.h>
#include <sot/storage.hxx>
#include <com/sun/star/drawing/XShape.hpp>
@@ -37,22 +35,14 @@
#include <sal/log.hxx>
#include <sot/exchange.hxx>
-#include <swtypes.hxx>
#include <fmtanchr.hxx>
-#include <fmtcntnt.hxx>
-#include <dcontact.hxx>
#include <frmfmt.hxx>
#include <pam.hxx>
-#include <ndgrf.hxx>
#include <docsh.hxx>
#include <mdiexp.hxx>
-#include <redline.hxx>
#include <fltshell.hxx>
-#include <unodraw.hxx>
#include <shellio.hxx>
-#include <ndole.hxx>
-#include <vcl/graphicfilter.hxx>
#include <vcl/wmf.hxx>
#include <vcl/gdimtf.hxx>
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index ef3353987e37..6b72388c6b07 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -24,13 +24,13 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <comphelper/simplefileaccessinteraction.hxx>
-#include <sot/storinfo.hxx>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <svl/cintitem.hxx>
#include <svl/lngmisc.hxx>
#include <svl/urihelper.hxx>
#include <svl/zforlist.hxx>
@@ -42,7 +42,6 @@
#include <ucbhelper/content.hxx>
#include <ucbhelper/commandenvironment.hxx>
-#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <hintids.hxx>
#include <editeng/fontitem.hxx>
@@ -55,35 +54,26 @@
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentMarkAccess.hxx>
#include <IDocumentState.hxx>
-#include <charatr.hxx>
#include <flddat.hxx>
#include <docufld.hxx>
#include <reffld.hxx>
#include <IMark.hxx>
#include <expfld.hxx>
#include <dbfld.hxx>
-#include <usrfld.hxx>
#include <tox.hxx>
#include <section.hxx>
#include <ndtxt.hxx>
#include <fmtinfmt.hxx>
#include <chpfld.hxx>
-#include <ftnidx.hxx>
-#include <txtftn.hxx>
-#include <viewsh.hxx>
-#include <shellres.hxx>
#include <fmtruby.hxx>
#include <charfmt.hxx>
-#include <txtatr.hxx>
#include <breakit.hxx>
#include <fmtclds.hxx>
-#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <SwStyleNameMapper.hxx>
#include "ww8scan.hxx"
#include "ww8par.hxx"
-#include "ww8par2.hxx"
#include "writerhelper.hxx"
#include "fields.hxx"
#include <o3tl/safeint.hxx>
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 8ccbca6eb093..675351f956de 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -53,11 +53,7 @@
#include <editeng/autokernitem.hxx>
#include <editeng/paperinf.hxx>
#include <editeng/emphasismarkitem.hxx>
-#include <editeng/forbiddenruleitem.hxx>
#include <editeng/twolinesitem.hxx>
-#include <editeng/scriptspaceitem.hxx>
-#include <editeng/hngpnctitem.hxx>
-#include <editeng/pbinitem.hxx>
#include <editeng/charscaleitem.hxx>
#include <editeng/charrotateitem.hxx>
#include <editeng/charreliefitem.hxx>
@@ -72,7 +68,6 @@
#include <svx/xflclit.hxx>
#include "sortedarray.hxx"
#include "sprmids.hxx"
-#include <fmtpdsc.hxx>
#include <node.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
@@ -91,7 +86,6 @@
#include <fmtline.hxx>
#include <txatbase.hxx>
#include <fmtflcnt.hxx>
-#include <fmtclbl.hxx>
#include <tgrditem.hxx>
#include <hfspacingitem.hxx>
#include <swtable.hxx>
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index b9fe6d41e347..7411e02f8223 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -33,12 +33,10 @@
#include <sal/log.hxx>
#include <swerror.h>
-#include <swtypes.hxx>
#include <comphelper/string.hxx>
#include <unotools/localedatawrapper.hxx>
#include <i18nlangtag/lang.h>
-#include <editeng/unolingu.hxx>
#include <o3tl/safeint.hxx>
#include <tools/stream.hxx>
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index cde6d4070d12..a6387e6d81db 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -9,8 +9,6 @@
#include "ww8toolbar.hxx"
#include "ww8scan.hxx"
-#include <rtl/ustrbuf.hxx>
-#include <stdarg.h>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/IndexedPropertyValues.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
@@ -24,7 +22,6 @@
#include <sfx2/objsh.hxx>
#include <tools/diagnose_ex.h>
#include <unotools/configmgr.hxx>
-#include <vcl/graph.hxx>
#include <map>
#include <sal/log.hxx>
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 1075588797ce..82a3636f85fa 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -36,9 +36,7 @@
#include <unoredline.hxx>
#include <DocumentRedlineManager.hxx>
#include "xmlimp.hxx"
-#include <officecfg/Office/Common.hxx>
#include <o3tl/any.hxx>
-#include <unotools/configmgr.hxx>
#include <xmloff/xmltoken.hxx>
#include <vcl/svapp.hxx>
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index ee3f75373dae..7123d61ab190 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <svl/style.hxx>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <comphelper/processfactory.hxx>
@@ -28,22 +27,18 @@
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/document/NamedPropertyValues.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/packages/WrongPasswordException.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/frame/XModel.hpp>
-#include <officecfg/Office/Common.hxx>
#include <o3tl/any.hxx>
#include <vcl/errinf.hxx>
#include <sfx2/docfile.hxx>
#include <svtools/sfxecode.hxx>
#include <svl/stritem.hxx>
-#include <unotools/streamwrap.hxx>
#include <svx/dialmgr.hxx>
#include <svx/strings.hrc>
#include <svx/xmlgrhlp.hxx>
@@ -51,7 +46,6 @@
#include <comphelper/fileformat.h>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/propertysetinfo.hxx>
-#include <rtl/strbuf.hxx>
#include <sal/log.hxx>
#include <sfx2/frame.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -67,7 +61,6 @@
#include <docary.hxx>
#include <docsh.hxx>
#include <unotextrange.hxx>
-#include <swmodule.hxx>
#include <SwXMLSectionList.hxx>
#include <SwStyleNameMapper.hxx>
@@ -76,7 +69,6 @@
#include <paratr.hxx>
#include <fmtrowsplt.hxx>
-#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <svx/svditer.hxx>
#include <svx/svdoole2.hxx>
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index e4cef6663a15..d101d613219e 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -27,16 +27,12 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/frame/XModule.hpp>
-#include <officecfg/Office/Common.hxx>
-
#include <comphelper/fileformat.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/propertysetinfo.hxx>
#include <vcl/errinf.hxx>
-#include <o3tl/any.hxx>
#include <sal/log.hxx>
-#include <unotools/streamwrap.hxx>
#include <svx/xmlgrhlp.hxx>
#include <svx/xmleohlp.hxx>
#include <unotools/saveopt.hxx>
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index e55e60ea9155..47d1ba3d2bdd 100644
--- a/sw/source/filter/xml/xmlbrsh.cxx
+++ b/sw/source/filter/xml/xmlbrsh.cxx
@@ -17,16 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <hintids.hxx>
#include <editeng/memberids.h>
+#include <vcl/graph.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/XMLBase64ImportContext.hxx>
-#include <vcl/GraphicObject.hxx>
-#include <svx/unomid.hxx>
#include <editeng/brushitem.hxx>
#include <xmloff/xmluconv.hxx>
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 28745ab2f023..4a8be86cea70 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -22,14 +22,11 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/document/IndexedPropertyValues.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/xforms/XFormsSupplier.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <o3tl/any.hxx>
-#include <officecfg/Office/Common.hxx>
#include <sax/tools/converter.hxx>
-#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <svx/xmleohlp.hxx>
#include <svx/xmlgrhlp.hxx>
@@ -42,8 +39,6 @@
#include <xmloff/xmluconv.hxx>
#include <xmloff/xformsexport.hxx>
#include <drawdoc.hxx>
-#include <pam.hxx>
-#include <unofreg.hxx>
#include <doc.hxx>
#include <swmodule.hxx>
#include <docsh.hxx>
@@ -55,14 +50,10 @@
#include "xmltexte.hxx"
#include "xmlexp.hxx"
#include "xmlexpit.hxx"
-#include <sfx2/viewsh.hxx>
#include <comphelper/processfactory.hxx>
#include <docary.hxx>
-#include <editeng/unolingu.hxx>
-#include <editeng/forbiddencharacterstable.hxx>
#include <comphelper/servicehelper.hxx>
#include <vcl/svapp.hxx>
-#include <osl/mutex.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 0017ea7e0076..ba94cdcd9ffe 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -22,7 +22,6 @@
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
#include <sax/tools/converter.hxx>
-#include <svl/itempool.hxx>
#include <svl/poolitem.hxx>
#include <svl/itemset.hxx>
#include <utility>
@@ -51,7 +50,6 @@
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
-#include <fmtlsplt.hxx>
#include "xmlithlp.hxx"
#include <fmtrowsplt.hxx>
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index fd6f957be4a1..0150700d17a2 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -22,23 +22,15 @@
#include <osl/diagnose.h>
#include <tools/diagnose_ex.h>
#include <xmloff/nmspmap.hxx>
-#include <format.hxx>
#include <fmtcol.hxx>
#include <hints.hxx>
-#include <poolfmt.hxx>
-#include <charfmt.hxx>
-#include <paratr.hxx>
#include <doc.hxx>
#include <docary.hxx>
#include <IDocumentStylePoolAccess.hxx>
-#include <unostyle.hxx>
#include <unoprnms.hxx>
#include <fmtpdsc.hxx>
#include <pagedesc.hxx>
#include <xmloff/xmlnmspe.hxx>
-#include <xmloff/i18nmap.hxx>
-#include <xmloff/xmltkmap.hxx>
-#include "xmlitem.hxx"
#include <xmloff/xmlstyle.hxx>
#include <xmloff/txtstyli.hxx>
#include <xmloff/txtimp.hxx>
@@ -48,13 +40,11 @@
#include <xmloff/XMLGraphicsDefaultStyle.hxx>
#include <xmloff/table/XMLTableImport.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include "xmlimp.hxx"
-#include "xmltbli.hxx"
#include <cellatr.hxx>
#include <SwStyleNameMapper.hxx>
#include <xmloff/attrlist.hxx>
-#include <unotxdoc.hxx>
-#include <docsh.hxx>
#include <ccoll.hxx>
#include <memory>
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index 1f910e60944e..9b90f94fd419 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -20,7 +20,6 @@
#include <hintids.hxx>
#include <xmloff/XMLFontAutoStylePool.hxx>
#include <editeng/fontitem.hxx>
-#include <unotext.hxx>
#include <doc.hxx>
#include "xmlexp.hxx"
#include "xmlimp.hxx"
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 9c983b882db5..ebbd220e65a1 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -25,20 +25,14 @@
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
-#include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
-#include <com/sun/star/io/IOException.hpp>
-#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/text/XTextRange.hpp>
#include <o3tl/any.hxx>
-#include <o3tl/safeint.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/xmlictxt.hxx>
#include <xmloff/txtimp.hxx>
-#include <xmloff/nmspmap.hxx>
#include <xmloff/XMLTextShapeImportHelper.hxx>
#include <xmloff/XMLFontStylesContext.hxx>
#include <xmloff/ProgressBarHelper.hxx>
@@ -49,11 +43,9 @@
#include <IDocumentListsAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
-#include <unofreg.hxx>
#include <TextCursorHelper.hxx>
#include <unotext.hxx>
#include <unotextrange.hxx>
-#include <unocrsr.hxx>
#include <poolfmt.hxx>
#include <ndtxt.hxx>
#include <editsh.hxx>
@@ -66,19 +58,13 @@
#include <swdll.hxx>
#include <xmloff/DocumentSettingsContext.hxx>
#include <docsh.hxx>
-#include <editeng/unolingu.hxx>
-#include <svx/svdmodel.hxx>
#include <svx/xmlgrhlp.hxx>
#include <svx/xmleohlp.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/docfilt.hxx>
-#include <sfx2/frame.hxx>
#include <sfx2/printer.hxx>
#include <xmloff/xmluconv.hxx>
#include <unotools/saveopt.hxx>
#include <unotools/streamwrap.hxx>
#include <tools/helpers.hxx>
-#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <unotxdoc.hxx>
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index c1b550596e8b..ee5641691518 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -25,9 +25,7 @@
#include <svl/itempool.hxx>
#include <svl/poolitem.hxx>
#include <svl/itemset.hxx>
-#include <xmloff/attrlist.hxx>
#include <xmloff/nmspmap.hxx>
-#include <xmloff/xmlnmspe.hxx>
#include <editeng/xmlcnitm.hxx>
#include <editeng/memberids.h>
#include <osl/diagnose.h>
@@ -47,13 +45,11 @@
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
-#include <fmtlsplt.hxx>
#include <xmloff/prhdlfac.hxx>
#include <xmloff/xmltypes.hxx>
#include <xmloff/xmlprhdl.hxx>
#include "xmlithlp.hxx"
#include <com/sun/star/uno/Any.hxx>
-#include <sal/log.hxx>
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 433eb1fc2397..3df09efc1c1b 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -26,21 +26,13 @@
#include <xmloff/xmluconv.hxx>
#include "xmlexpit.hxx"
#include <xmloff/nmspmap.hxx>
-#include <xmloff/xmltabe.hxx>
#include "xmlbrshe.hxx"
-#include <editeng/tstpitem.hxx>
#include <editeng/brushitem.hxx>
-#include <tools/fldunit.hxx>
-#include <swmodule.hxx>
-#include <doc.hxx>
#include <fmtornt.hxx>
#include <unomid.h>
#include <frmfmt.hxx>
-#include <fmtfsize.hxx>
-#include <swrect.hxx>
#include "xmlexp.hxx"
#include <editeng/memberids.h>
-#include <comphelper/processfactory.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index 7708985d0adc..f2314a13b9bf 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -22,26 +22,19 @@
#include <com/sun/star/util/MeasureUnit.hpp>
-#include <svl/style.hxx>
-
-#include <xmloff/i18nmap.hxx>
#include <xmloff/xmluconv.hxx>
#include <xmloff/families.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltoken.hxx>
-#include <editeng/boxitem.hxx>
-#include <editeng/fontitem.hxx>
-#include <editeng/tstpitem.hxx>
#include <editeng/brushitem.hxx>
-#include <editeng/langitem.hxx>
#include <editeng/memberids.h>
+#include <editeng/ulspitem.hxx>
+#include <svl/itemset.hxx>
+#include <svl/itempool.hxx>
-#include <svx/unomid.hxx>
-
+#include <fmtfsize.hxx>
#include <hintids.hxx>
-#include <paratr.hxx>
-#include <doc.hxx>
#include <unomid.h>
#include "xmlbrshi.hxx"
#include "xmlimp.hxx"
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 6dc8f3830e77..fe07be27ec50 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -17,26 +17,20 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <limits.h>
+
#include "xmlithlp.hxx"
-#include <hintids.hxx>
-#include <unomid.h>
#include <sax/tools/converter.hxx>
-#include <svx/unomid.hxx>
-#include <editeng/lrspitem.hxx>
-#include <editeng/ulspitem.hxx>
-#include <editeng/shaditem.hxx>
-#include <editeng/boxitem.hxx>
-#include <editeng/formatbreakitem.hxx>
-#include <editeng/keepitem.hxx>
+#include <editeng/borderline.hxx>
#include <editeng/brushitem.hxx>
-#include <fmtpdsc.hxx>
-#include <fmtornt.hxx>
-#include <fmtfsize.hxx>
-#include <fmtlsplt.hxx>
#include <xmloff/xmluconv.hxx>
#include <osl/diagnose.h>
+#include <com/sun/star/table/BorderLineStyle.hpp>
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+
using ::editeng::SvxBorderLine;
using namespace ::xmloff::token;
using namespace ::com::sun::star;
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index c8739eeafa14..5834ae020250 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -17,19 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <hintids.hxx>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <osl/diagnose.h>
-#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlmetai.hxx>
-#include <xmloff/xmlmetae.hxx>
#include <xmloff/ProgressBarHelper.hxx>
-#include <editeng/langitem.hxx>
#include <o3tl/safeint.hxx>
#include <xmloff/xmluconv.hxx>
-#include <xmloff/nmspmap.hxx>
#include <docstat.hxx>
-#include <docsh.hxx>
#include <doc.hxx>
#include <IDocumentStatistics.hxx>
#include "xmlimp.hxx"
diff --git a/sw/source/filter/xml/xmlscript.cxx b/sw/source/filter/xml/xmlscript.cxx
index aebdf094d562..57e46fd1a66a 100644
--- a/sw/source/filter/xml/xmlscript.cxx
+++ b/sw/source/filter/xml/xmlscript.cxx
@@ -17,12 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <hintids.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlscripti.hxx>
#include "xmlimp.hxx"
-#include "xmlexp.hxx"
using namespace ::com::sun::star;
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 1778c4cb42db..fc1602e982b2 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -26,16 +26,13 @@
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmluconv.hxx>
#include <xmloff/numehelp.hxx>
-#include <svl/zforlist.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/xmlcnitm.hxx>
#include <fmtrowsplt.hxx>
#include <editeng/frmdiritem.hxx>
-#include <list>
#include <swtable.hxx>
#include <doc.hxx>
-#include <pam.hxx>
#include <frmfmt.hxx>
#include <wrtswtbl.hxx>
#include <fmtfsize.hxx>
@@ -43,7 +40,6 @@
#include <cellatr.hxx>
#include <ddefld.hxx>
#include <swddetbl.hxx>
-#include <ndole.hxx>
#include <xmloff/nmspmap.hxx>
#include <sfx2/linkmgr.hxx>
#include <unotbl.hxx>
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index cf3932c63726..1b882317804a 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -52,7 +52,6 @@
#include <pam.hxx>
#include <unotbl.hxx>
#include <unotextrange.hxx>
-#include <unocrsr.hxx>
#include <cellatr.hxx>
#include <swddetbl.hxx>
#include <ddefld.hxx>
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 284b48c94c4b..13f41c7b45f9 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -32,13 +32,9 @@
#include <xmloff/maptype.hxx>
#include <xmloff/xmlexppr.hxx>
-#include <svx/svdobj.hxx>
-#include <doc.hxx>
#include <ndole.hxx>
#include <fmtcntnt.hxx>
-#include <unostyle.hxx>
#include <unoframe.hxx>
-#include <ndgrf.hxx>
#include "xmlexp.hxx"
#include "xmltexte.hxx"
#include <SwAppletImpl.hxx>
@@ -47,7 +43,6 @@
#include <sot/exchange.hxx>
#include <svl/urihelper.hxx>
#include <sfx2/frmdescr.hxx>
-#include <SwStyleNameMapper.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 383ab6f256ad..00a6537e43d6 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -36,13 +36,11 @@
#include <xmloff/txtprmap.hxx>
#include <xmloff/i18nmap.hxx>
#include <xmloff/xmlimppr.hxx>
-#include <unocrsr.hxx>
#include <TextCursorHelper.hxx>
#include <unoframe.hxx>
#include <doc.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <IDocumentContentOperations.hxx>
-#include <unocoll.hxx>
#include <fmtfsize.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>