summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-06-16 08:26:04 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-06-20 09:22:34 +0200
commit2a06796fa6f6255314cf4c1271f62154f08bac4f (patch)
tree91b5699fefb8c2a0742ed1c6611b448d1220dcf5
parentccecd6644ccec54f665e9070660f8b1139370ebc (diff)
tdf#42949 Fix IWYU warnings in sw/source/filter/*/*hxx
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7ccd6af737c21a50fe7df25266198ee6989c4c69 Reviewed-on: https://gerrit.libreoffice.org/74110 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/IwyuFilter_sw.yaml6
-rw-r--r--sw/source/filter/docx/swdocxreader.hxx2
-rw-r--r--sw/source/filter/html/htmlctxt.cxx3
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx1
-rw-r--r--sw/source/filter/html/htmlfly.hxx1
-rw-r--r--sw/source/filter/html/htmlform.hxx2
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx1
-rw-r--r--sw/source/filter/html/parcss1.hxx5
-rw-r--r--sw/source/filter/html/svxcss1.hxx1
-rw-r--r--sw/source/filter/html/swcss1.hxx3
-rw-r--r--sw/source/filter/html/swhtml.cxx1
-rw-r--r--sw/source/filter/html/swhtml.hxx1
-rw-r--r--sw/source/filter/html/wrthtml.hxx2
-rw-r--r--sw/source/filter/inc/fltshell.hxx5
-rw-r--r--sw/source/filter/inc/msfilter.hxx4
-rw-r--r--sw/source/filter/inc/rtf.hxx2
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx1
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx1
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx1
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx1
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx3
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx1
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx1
-rw-r--r--sw/source/filter/ww8/docxexport.cxx1
-rw-r--r--sw/source/filter/ww8/docxexport.hxx3
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx2
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx1
-rw-r--r--sw/source/filter/ww8/escher.hxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx1
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx3
-rw-r--r--sw/source/filter/ww8/sortedarray.hxx1
-rw-r--r--sw/source/filter/ww8/types.hxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx1
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx1
-rw-r--r--sw/source/filter/ww8/writerwordglue.hxx1
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx1
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx1
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx1
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx1
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx1
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx1
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx5
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx1
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx1
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx7
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx6
-rw-r--r--sw/source/filter/xml/wrtxml.hxx3
-rw-r--r--sw/source/filter/xml/xmlbrshe.hxx3
-rw-r--r--sw/source/filter/xml/xmlexpit.hxx1
-rw-r--r--sw/source/filter/xml/xmlimp.hxx2
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx3
-rw-r--r--sw/source/filter/xml/xmlitem.hxx2
-rw-r--r--sw/source/filter/xml/xmlithlp.hxx1
-rw-r--r--sw/source/filter/xml/xmltbli.hxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx1
60 files changed, 71 insertions, 53 deletions
diff --git a/sw/IwyuFilter_sw.yaml b/sw/IwyuFilter_sw.yaml
index 69aa7bf7de09..58d6a158af30 100644
--- a/sw/IwyuFilter_sw.yaml
+++ b/sw/IwyuFilter_sw.yaml
@@ -434,3 +434,9 @@ blacklist:
sw/qa/extras/ww8import/ww8import.cxx:
# Needed for for-loop range
- com/sun/star/graphic/XGraphic.hpp
+ include/sal/types.h:
+ # Ignore warning during checking source/filter/ww8/types.hxx
+ - sal/typesizes.h
+ sw/source/filter/ww8/ww8scan.hxx:
+ # OSL_BIGENDIAN is being checked
+ - osl/endian.h
diff --git a/sw/source/filter/docx/swdocxreader.hxx b/sw/source/filter/docx/swdocxreader.hxx
index 57900c12143b..214d2742d287 100644
--- a/sw/source/filter/docx/swdocxreader.hxx
+++ b/sw/source/filter/docx/swdocxreader.hxx
@@ -21,8 +21,6 @@
#define INCLUDED_SW_SOURCE_FILTER_DOCX_SWDOCXREADER_HXX
#include <shellio.hxx>
-#include <com/sun/star/xml/dom/XDocument.hpp>
-#include <tools/ref.hxx>
/// Wrapper for the UNO DOCX import filter (in writerfilter) for autotext purposes.
class SwDOCXReader : public StgReader
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 43f42aef10e4..0c739bfcf590 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -17,6 +17,9 @@
* 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 <hintids.hxx>
#include <svl/itemiter.hxx>
#include <editeng/lrspitem.hxx>
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index ac13c4b1ac2c..8226764e365c 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -49,6 +49,7 @@
#include <drawdoc.hxx>
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
+#include <fmtornt.hxx>
#include <fmtsrnd.hxx>
#include <ndtxt.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index 88e7e3b80c0c..90722338807a 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLY_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLY_HXX
-#include <tools/solar.h>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/typed_flags_set.hxx>
diff --git a/sw/source/filter/html/htmlform.hxx b/sw/source/filter/html/htmlform.hxx
index b097e86a9202..562bb65089d7 100644
--- a/sw/source/filter/html/htmlform.hxx
+++ b/sw/source/filter/html/htmlform.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFORM_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFORM_HXX
+#include <sal/types.h>
+
extern const sal_Char * aEventListenerTable[];
extern const sal_Char * aEventMethodTable[];
extern const sal_Char * aEventSDOptionTable[];
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 81df21aad9be..4060b7858d06 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/style/NumberingType.hpp>
#include <hintids.hxx>
#include <svtools/htmltokn.h>
diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx
index 1a4b02c6727f..7afbd84e1c6d 100644
--- a/sw/source/filter/html/parcss1.hxx
+++ b/sw/source/filter/html/parcss1.hxx
@@ -20,6 +20,11 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_PARCSS1_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_PARCSS1_HXX
+#include <rtl/ustring.hxx>
+#include <tools/color.hxx>
+
+#include <memory>
+
// tokens of the CSS1 parser
enum CSS1Token
{
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index fdc2b1a78a67..bb4dc73ae525 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_SW_SOURCE_FILTER_HTML_SVXCSS1_HXX
#include <svl/itemset.hxx>
+#include <svx/flagsdef.hxx>
#include <editeng/svxenum.hxx>
#include <rtl/textenc.h>
#include "parcss1.hxx"
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index b368bd1f068e..c6a3e6bdb8fd 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -20,6 +20,9 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_SWCSS1_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_SWCSS1_HXX
+#include <svtools/htmltokn.h>
+#include <tools/solar.h>
+
#include <poolfmt.hxx>
#include "svxcss1.hxx"
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 5eb5d6b437b1..77aef485176f 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -83,6 +83,7 @@
#include <fchrfmt.hxx>
#include <fmtinfmt.hxx>
#include <fmtfollowtextflow.hxx>
+#include <fmtornt.hxx>
#include <docary.hxx>
#include <docstat.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 2f10550fef93..6aa702995615 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -27,7 +27,6 @@
#include <editeng/svxenum.hxx>
#include <rtl/ref.hxx>
#include <fltshell.hxx>
-#include <fmtornt.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index c90c784e7abc..47893227f98f 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -26,13 +26,13 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/form/XForm.hpp>
-#include <vcl/field.hxx>
#include <i18nlangtag/lang.h>
#include <comphelper/stl_types.hxx>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <rtl/ref.hxx>
#include <svtools/htmlout.hxx>
+#include <tools/fldunit.hxx>
#include <shellio.hxx>
#include <wrt_fn.hxx>
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 47c1aedab650..713709dd7caa 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -20,11 +20,7 @@
#define INCLUDED_SW_SOURCE_FILTER_INC_FLTSHELL_HXX
#include <hintids.hxx>
-#include <vcl/keycod.hxx>
#include <tools/datetime.hxx>
-#include <editeng/formatbreakitem.hxx>
-#include <poolfmt.hxx>
-#include <fmtornt.hxx>
#include <mdiexp.hxx>
#include <ndindex.hxx>
#include <pam.hxx>
@@ -34,7 +30,6 @@
#include <cstddef>
#include <limits>
#include <memory>
-#include <deque>
class SwTOXBase;
class SwField;
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index f36c78fb3d58..4ed7d7045511 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -23,17 +23,13 @@
#include <sal/config.h>
#include <cstddef>
-#include <set>
#include <map>
#include <vector>
#include <memory>
#include <swtypes.hxx>
#include "wwstyles.hxx"
#include <rtl/textenc.h>
-#include <tools/gen.hxx>
-#include <filter/msfilter/util.hxx>
#include "fltshell.hxx"
-#include <redline.hxx>
#include <shellio.hxx>
#include <svl/zforlist.hxx>
diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx
index 293e87630edc..d1e4d3fa9e3a 100644
--- a/sw/source/filter/inc/rtf.hxx
+++ b/sw/source/filter/inc/rtf.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_INC_RTF_HXX
#define INCLUDED_SW_SOURCE_FILTER_INC_RTF_HXX
-#include <tools/solar.h>
+#include <sal/types.h>
class RTFSurround
{
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index 6dfe3d2f4e4c..623ddeeda5c4 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_INC_WRTSWTBL_HXX
#define INCLUDED_SW_SOURCE_FILTER_INC_WRTSWTBL_HXX
-#include <tools/solar.h>
#include <tools/color.hxx>
#include <o3tl/sorted_vector.hxx>
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index b9290e24d3d5..628f3194b805 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -27,6 +27,7 @@
#include <o3tl/make_shared.hxx>
#include <tools/stream.hxx>
#include <sal/log.hxx>
+#include <osl/diagnose.h>
namespace ww8
{
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
index b404d4b69820..afd4e696780d 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -23,7 +23,6 @@
#include <memory>
#include <vector>
-#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <IDocumentExternalData.hxx>
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 0ecda9170a19..b5d4897253ea 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -29,6 +29,7 @@
#include <ndtxt.hxx>
#include <dbgoutsw.hxx>
#include <sal/log.hxx>
+#include <osl/diagnose.h>
namespace ww8
{
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 2439cfabf5f8..72116df53bc2 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -31,13 +31,10 @@
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <swtypes.hxx>
-#include <wrtswtbl.hxx>
#include <fldbas.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <unotools/saveopt.hxx>
-#include <vector>
-
class Point;
class SvxCaseMapItem;
class SvxColorItem;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index f2c30c2eb654..cf6f5f2e8ab8 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -117,6 +117,7 @@
#include <ndtxt.hxx>
#include <pagedesc.hxx>
#include <paratr.hxx>
+#include <poolfmt.hxx>
#include <charatr.hxx>
#include <swmodule.hxx>
#include <swtable.hxx>
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 647a73e315c5..8c858f5a107a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -26,6 +26,7 @@
#include "fields.hxx"
#include <IMark.hxx>
#include "docxexport.hxx"
+#include <wrtswtbl.hxx>
#include <editeng/boxitem.hxx>
#include <sax/fshelper.hxx>
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index f11c4cbdd82f..b9870a93e30e 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -64,6 +64,7 @@
#include <section.hxx>
#include <ftninfo.hxx>
#include <pagedesc.hxx>
+#include <poolfmt.hxx>
#include <swdbdata.hxx>
#include <editeng/unoprnms.hxx>
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 1de037fb7662..0424f2619e75 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -23,13 +23,10 @@
#include "wrtww8.hxx"
#include <sax/fshelper.hxx>
-#include <sax/fastattribs.hxx>
#include <rtl/ustring.hxx>
#include <cstdio>
#include <memory>
-#include <vector>
-#include <boost/optional.hpp>
#include <ndole.hxx>
class DocxAttributeOutput;
diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx
index c2ec261d0d20..614069f0dd5d 100644
--- a/sw/source/filter/ww8/docxfootnotes.hxx
+++ b/sw/source/filter/ww8/docxfootnotes.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_DOCXFOOTNOTES_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_DOCXFOOTNOTES_HXX
+#include <sal/types.h>
+
#include <vector>
class SwFormatFootnote;
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 84943a518cac..eee4bd1cc0fb 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -29,6 +29,7 @@
#include <fmtanchr.hxx>
#include <fmtsrnd.hxx>
#include <fmtcntnt.hxx>
+#include <fmtornt.hxx>
#include <ndtxt.hxx>
#include <txatbase.hxx>
#include <fmtfsize.hxx>
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index a38f0c02b0e7..3e7e49edf0fc 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -21,6 +21,8 @@
#define INCLUDED_SW_SOURCE_FILTER_WW8_ESCHER_HXX
#include <filter/msfilter/escherex.hxx>
+#include <svx/svdtrans.hxx>
+#include "wrtww8.hxx"
const sal_uInt32 nInlineHack = 0x00010001;
class SwFrameFormat;
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index fca115a6e26f..01135c7aaba6 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -83,6 +83,7 @@
#include <grfatr.hxx>
#include <ndole.hxx>
#include <lineinfo.hxx>
+#include <redline.hxx>
#include <rtf.hxx>
#include <IDocumentSettingAccess.hxx>
#include <vcl/cvtgrf.hxx>
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 66e902a770fc..136e84146f69 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -26,6 +26,8 @@
#include "attributeoutputbase.hxx"
#include "rtfstringbuffer.hxx"
+#include <wrtswtbl.hxx>
+
#include <rtl/strbuf.hxx>
#include <boost/optional.hpp>
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 504424b70d8a..4c8ed0281537 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -43,6 +43,8 @@
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
#include <lineinfo.hxx>
+#include <poolfmt.hxx>
+#include <redline.hxx>
#include <swmodule.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
@@ -50,6 +52,7 @@
#include <svtools/rtfkeywd.hxx>
#include <filter/msfilter/rtfutil.hxx>
#include <unotools/docinfohelper.hxx>
+#include <osl/diagnose.h>
#include <rtl/tencinfo.h>
#include <sal/log.hxx>
#if OSL_DEBUG_LEVEL > 1
diff --git a/sw/source/filter/ww8/sortedarray.hxx b/sw/source/filter/ww8/sortedarray.hxx
index 2e36fba4155c..7efec13aa9ff 100644
--- a/sw/source/filter/ww8/sortedarray.hxx
+++ b/sw/source/filter/ww8/sortedarray.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SW_SOURCE_FILTER_WW8_SORTEDARRAY_HXX
#include <osl/diagnose.h>
-#include <sal/log.hxx>
#include <algorithm>
//simple template that manages a static [] array by sorting at construction
diff --git a/sw/source/filter/ww8/types.hxx b/sw/source/filter/ww8/types.hxx
index c832e133cff8..f2fd85817c49 100644
--- a/sw/source/filter/ww8/types.hxx
+++ b/sw/source/filter/ww8/types.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_TYPES_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_TYPES_HXX
+#include <sal/types.h>
+
#include <vector>
namespace ww
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index eb46cfb1463c..5e62280a501a 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -48,6 +48,8 @@
#include <docary.hxx>
#include <charfmt.hxx>
#include <fchrfmt.hxx>
+#include <redline.hxx>
+#include "types.hxx"
#include <unotools/streamwrap.hxx>
#include <svtools/embedhlp.hxx>
#include <numrule.hxx>
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index 80430bcca9d7..4f6f67e49b8d 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -26,7 +26,6 @@
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <sfx2/objsh.hxx>
-#include "types.hxx"
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
#include <svx/svdtypes.hxx>
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index fc69bb8ed574..c802760b4cdf 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -43,6 +43,7 @@
#include <fmtclds.hxx>
#include <hfspacingitem.hxx>
#include <fmtfsize.hxx>
+#include <poolfmt.hxx>
#include <swrect.hxx>
#include <fmthdft.hxx>
#include <frmatr.hxx>
diff --git a/sw/source/filter/ww8/writerwordglue.hxx b/sw/source/filter/ww8/writerwordglue.hxx
index 362a8e19a342..3b532356602a 100644
--- a/sw/source/filter/ww8/writerwordglue.hxx
+++ b/sw/source/filter/ww8/writerwordglue.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SW_SOURCE_FILTER_WW8_WRITERWORDGLUE_HXX
#include "needed_cast.hxx"
-#include "types.hxx"
class SwFrameFormat;
class SfxItemSet;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index bf682a5880d5..1f3dec9ef7ce 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -76,6 +76,7 @@
#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>
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 6651baaa15b0..c65de3898ff6 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -57,6 +57,7 @@
#include <lineinfo.hxx>
#include <fmtline.hxx>
#include <swtable.hxx>
+#include <redline.hxx>
#include <msfilter.hxx>
#include <swmodule.hxx>
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index bf8fb4665528..7773e25549ce 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -71,6 +71,7 @@
#include <shellio.hxx>
#include <docstat.hxx>
#include <pagedesc.hxx>
+#include <poolfmt.hxx>
#include <IMark.hxx>
#include <swtable.hxx>
#include "wrtww8.hxx"
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index f72302f88538..cc2255e78411 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -26,7 +26,6 @@
#include <editeng/editdata.hxx>
#include <shellio.hxx>
-#include <wrt_fn.hxx>
#include "ww8struc.hxx"
#include "ww8scan.hxx"
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ae95c7a13d76..05b42b9a0478 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -104,6 +104,7 @@
#include <flddat.hxx>
#include <ndtxt.hxx>
#include <swrect.hxx>
+#include <redline.hxx>
#include <reffld.hxx>
#include <ftninfo.hxx>
#include <charfmt.hxx>
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 96dc246e9919..10b0d12ba17a 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -24,6 +24,7 @@
#include <swerror.h>
#include <ndtxt.hxx>
#include <pam.hxx>
+#include <poolfmt.hxx>
#include <shellio.hxx>
#include <docsh.hxx>
#include <fmtanchr.hxx>
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index 6d865ad787c5..61b3f6fc6741 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -22,6 +22,8 @@
#include <memory>
#include <sot/storage.hxx>
+
+#include <doc.hxx>
#include "ww8scan.hxx"
class SwTextBlocks;
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index ce3c2e4410a0..0e98b7ddda5c 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -22,7 +22,12 @@
#include <vector>
#include <stack>
+
+#include <filter/msfilter/msdffimp.hxx>
+#include <svx/svdpage.hxx>
+
#include "writerhelper.hxx"
+#include "ww8struc.hxx"
struct EscherShape
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index aa596ad3ee2d..77fe6fae93c7 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -46,6 +46,7 @@
#include <editeng/outlobj.hxx>
#include <editeng/brushitem.hxx>
+#include <editeng/formatbreakitem.hxx>
#include <editeng/tstpitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/langitem.hxx>
@@ -81,6 +82,7 @@
#include <ndtxt.hxx>
#include <pagedesc.hxx>
#include <paratr.hxx>
+#include <poolfmt.hxx>
#include <fmtclbl.hxx>
#include <section.hxx>
#include <docsh.hxx>
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index 4875270e6e27..86f84364aa0e 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -20,11 +20,7 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8PAR2_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_WW8PAR2_HXX
-#include <swtypes.hxx>
#include <fmtfsize.hxx>
-#include <fmtornt.hxx>
-#include <fmtsrnd.hxx>
-#include <editeng/lrspitem.hxx>
#include <svl/itemset.hxx>
#include <svx/swframetypes.hxx>
#include <swtable.hxx>
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 9b0ffaf3b602..8b276eab3138 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -77,6 +77,7 @@
#include <breakit.hxx>
#include <fmtclds.hxx>
#include <pagedesc.hxx>
+#include <poolfmt.hxx>
#include <SwStyleNameMapper.hxx>
#include "ww8scan.hxx"
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index e7308ac7e60e..723581862ef7 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -70,6 +70,7 @@
#include <i18nlangtag/mslangid.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
+#include "sortedarray.hxx"
#include "sprmids.hxx"
#include <fmtpdsc.hxx>
#include <node.hxx>
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index d22a32180dbf..de25d6e09c1d 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -20,10 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8SCAN_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_WW8SCAN_HXX
-#ifndef LONG_MAX
-#include <limits.h>
-#endif
-#include <algorithm>
#include <cassert>
#include <cstddef>
#include <deque>
@@ -36,13 +32,10 @@
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <rtl/ustring.hxx>
-#include "sortedarray.hxx"
#include "ww8struc.hxx"
#include "types.hxx"
-#include <unomid.h>
-
class SvStream;
//Commonly used string literals for stream and storage names in word docs
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 5e2a468947cc..f4f50e1e748d 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -22,13 +22,15 @@
#include <sal/config.h>
-#include <osl/endian.h>
#include <rtl/ustring.hxx>
-#include <editeng/borderline.hxx>
#include <filter/msfilter/util.hxx>
#include <i18nlangtag/lang.h>
#include <tools/color.hxx>
+#include <tools/solar.h>
+#include <tools/stream.hxx>
+
+#include <vector>
#ifdef _WIN32
# pragma pack(push, 2)
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index 1dbd9f63dfa0..a82a0315e056 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -19,9 +19,10 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_XML_WRTXML_HXX
#define INCLUDED_SW_SOURCE_FILTER_XML_WRTXML_HXX
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <shellio.hxx>
diff --git a/sw/source/filter/xml/xmlbrshe.hxx b/sw/source/filter/xml/xmlbrshe.hxx
index e9096a5a7230..1e970ff8ed04 100644
--- a/sw/source/filter/xml/xmlbrshe.hxx
+++ b/sw/source/filter/xml/xmlbrshe.hxx
@@ -20,9 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLBRSHE_HXX
#define INCLUDED_SW_SOURCE_FILTER_XML_XMLBRSHE_HXX
-#include <rtl/ustring.hxx>
-#include <xmloff/attrlist.hxx>
-
class SvxBrushItem;
class SwXMLExport;
diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx
index a7d290a2d640..f3f07c33c351 100644
--- a/sw/source/filter/xml/xmlexpit.hxx
+++ b/sw/source/filter/xml/xmlexpit.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLEXPIT_HXX
#define INCLUDED_SW_SOURCE_FILTER_XML_XMLEXPIT_HXX
-#include <tools/solar.h>
#include <xmloff/xmlexppr.hxx>
#include "xmlitmap.hxx"
#include <vector>
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index fb326377d382..ed2317c73866 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -26,8 +26,6 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
-#include <sot/storage.hxx>
-
#include <xmloff/xmlictxt.hxx>
#include <xmloff/xmlimp.hxx>
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index 47a367fdd9ca..d6c19b20bea3 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -19,9 +19,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLIMPIT_HXX
#define INCLUDED_SW_SOURCE_FILTER_XML_XMLIMPIT_HXX
-#include <limits.h>
-#include <tools/solar.h>
-
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include "xmlitmap.hxx"
diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx
index b8248ad6dc6f..4f06cfc94d9c 100644
--- a/sw/source/filter/xml/xmlitem.hxx
+++ b/sw/source/filter/xml/xmlitem.hxx
@@ -21,8 +21,6 @@
#define INCLUDED_SW_SOURCE_FILTER_XML_XMLITEM_HXX
#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <tools/solar.h>
-#include <limits.h>
#include <xmloff/xmlictxt.hxx>
class SfxItemSet;
diff --git a/sw/source/filter/xml/xmlithlp.hxx b/sw/source/filter/xml/xmlithlp.hxx
index e5498009bd3e..57d688feffe5 100644
--- a/sw/source/filter/xml/xmlithlp.hxx
+++ b/sw/source/filter/xml/xmlithlp.hxx
@@ -22,7 +22,6 @@
#include <sal/types.h>
#include <xmloff/xmlement.hxx>
-#include <hintids.hxx>
#include <editeng/brushitem.hxx>
namespace editeng { class SvxBorderLine; }
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index 9d5272e46d37..e8e10df55225 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -22,6 +22,8 @@
#include <xmloff/XMLTextTableContext.hxx>
+#include "xmlimp.hxx"
+
#include <memory>
#include <unordered_map>
#include <vector>
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index d7bbc44d2d20..1b41ef693097 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -61,6 +61,7 @@
#include <svtools/embedhlp.hxx>
#include <svl/urihelper.hxx>
#include <sfx2/frmdescr.hxx>
+#include <tools/globname.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;