summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-01-03 21:06:56 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-01-04 15:51:39 +0100
commit67e1e2ee40dba196f706afb43d0379b29c3c0f42 (patch)
treeb7de03d03bd9634b935dd265b4f4b043b50d533f
parentf042128907598e5f82e759a175b564a68edfb490 (diff)
tdf#42949 Fix some more Include What You Use warnings
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a Reviewed-on: https://gerrit.libreoffice.org/47348 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--oox/source/token/namespaces.hxx.head1
-rw-r--r--oox/source/token/namespaces.hxx.tail1
-rw-r--r--starmath/source/ooxmlimport.cxx1
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx2
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx1
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx3
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx5
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx2
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx1
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.hxx1
-rw-r--r--sw/source/filter/ww8/rtfstringbuffer.cxx1
-rw-r--r--writerfilter/qa/cppunittests/rtftok/testrtftok.cxx3
-rw-r--r--writerfilter/source/filter/RtfFilter.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfcontrolwords.cxx3
-rw-r--r--writerfilter/source/rtftok/rtfcontrolwords.hxx2
-rw-r--r--writerfilter/source/rtftok/rtfdispatchdestination.cxx1
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx19
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx7
-rw-r--r--writerfilter/source/rtftok/rtffly.hxx2
-rw-r--r--writerfilter/source/rtftok/rtflookahead.cxx2
-rw-r--r--writerfilter/source/rtftok/rtflookahead.hxx3
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.hxx11
-rw-r--r--writerfilter/source/rtftok/rtfskipdestination.cxx1
-rw-r--r--writerfilter/source/rtftok/rtfskipdestination.hxx4
-rw-r--r--writerfilter/source/rtftok/rtftokenizer.cxx7
-rw-r--r--writerfilter/source/rtftok/rtftokenizer.hxx1
-rw-r--r--writerperfect/qa/unit/EPUBExportTest.cxx1
-rw-r--r--writerperfect/source/writer/EPUBExportDialog.cxx1
-rw-r--r--writerperfect/source/writer/EPUBExportDialog.hxx6
-rw-r--r--writerperfect/source/writer/EPUBExportFilter.cxx1
-rw-r--r--writerperfect/source/writer/EPUBExportFilter.hxx3
-rw-r--r--writerperfect/source/writer/EPUBExportUIComponent.cxx1
-rw-r--r--writerperfect/source/writer/EPUBExportUIComponent.hxx2
-rw-r--r--writerperfect/source/writer/EPUBPackage.hxx2
-rw-r--r--writerperfect/source/writer/exp/XMLFootnoteImportContext.hxx2
-rw-r--r--writerperfect/source/writer/exp/XMLTextListItemContext.cxx1
-rw-r--r--writerperfect/source/writer/exp/txtparai.hxx2
-rw-r--r--writerperfect/source/writer/exp/txtstyli.cxx1
-rw-r--r--writerperfect/source/writer/exp/xmlfmt.hxx7
-rw-r--r--writerperfect/source/writer/exp/xmlictxt.hxx2
-rw-r--r--writerperfect/source/writer/exp/xmlimp.cxx1
-rw-r--r--writerperfect/source/writer/exp/xmlimp.hxx3
-rw-r--r--writerperfect/source/writer/exp/xmltbli.hxx2
-rw-r--r--xmlsecurity/inc/documentsignaturemanager.hxx3
-rw-r--r--xmlsecurity/inc/pdfio/pdfdocument.hxx12
-rw-r--r--xmlsecurity/inc/pdfsignaturehelper.hxx4
-rw-r--r--xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx2
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx7
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx2
-rw-r--r--xmlsecurity/source/helper/ooxmlsecexporter.cxx1
-rw-r--r--xmlsecurity/source/helper/pdfsignaturehelper.cxx3
-rw-r--r--xmlsecurity/source/pdfio/pdfdocument.cxx33
-rw-r--r--xmlsecurity/workben/pdfverify.cxx1
55 files changed, 87 insertions, 110 deletions
diff --git a/oox/source/token/namespaces.hxx.head b/oox/source/token/namespaces.hxx.head
index a7eea7a9c47a..ff8af387c466 100644
--- a/oox/source/token/namespaces.hxx.head
+++ b/oox/source/token/namespaces.hxx.head
@@ -20,5 +20,6 @@
#define OOX_TOKEN_NAMESPACES_HXX
#include <sal/types.h>
+#include <oox/token/tokens.hxx>
namespace oox {
diff --git a/oox/source/token/namespaces.hxx.tail b/oox/source/token/namespaces.hxx.tail
index a52eddf8502f..991527f1d5d6 100644
--- a/oox/source/token/namespaces.hxx.tail
+++ b/oox/source/token/namespaces.hxx.tail
@@ -60,6 +60,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; }
#define WPG_TOKEN( token ) OOX_TOKEN( wpg, token )
#define W_TOKEN( token ) OOX_TOKEN( doc, token )
#define LOEXT_TOKEN( token ) OOX_TOKEN( loext, token )
+#define M_TOKEN(token) OOX_TOKEN(officeMath, token)
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index dc940cf9e36b..1059edc9395c 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -24,7 +24,6 @@ The primary internal data structure for the formula is the text representation
(the SmNode tree is built from it), so read data must be converted into this format.
*/
-#define M_TOKEN( token ) OOX_TOKEN( officeMath, token )
#define OPENING( token ) XML_STREAM_OPENING( token )
#define CLOSING( token ) XML_STREAM_CLOSING( token )
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 576bfea43398..98ba60f066cd 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -30,8 +30,6 @@
#include <com/sun/star/text/XTextColumns.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
-#include <vcl/svapp.hxx>
-
class Test : public SwModelTestBase
{
public:
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 6dfb347cc6db..d20026010e9e 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -42,8 +42,6 @@
#include <com/sun/star/text/XFormField.hpp>
#include <rtl/ustring.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx>
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 181764bf4607..882243ff9d06 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -83,6 +83,7 @@
#include <com/sun/star/i18n/ScriptType.hpp>
#include <o3tl/make_unique.hxx>
#include <svl/grabbagitem.hxx>
+#include "rtfexport.hxx"
using namespace ::com::sun::star;
using namespace sw::util;
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 66393e9525f3..a29621aa42d7 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -24,17 +24,16 @@
#include <com/sun/star/drawing/FillStyle.hpp>
#include "attributeoutputbase.hxx"
-#include "rtfexport.hxx"
#include "rtfstringbuffer.hxx"
#include <rtl/strbuf.hxx>
-#include <svx/xenum.hxx>
#include <boost/optional.hpp>
class SwGrfNode;
class SwOLENode;
class SwFlyFrameFormat;
+class RtfExport;
/// The class that has handlers for various resource types when exporting as RTF
class RtfAttributeOutput : public AttributeOutputBase
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index e98751b1b976..61ed96720ae5 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "rtfexport.hxx"
+
#include "rtfexportfilter.hxx"
#include "rtfsdrexport.hxx"
#include "rtfattributeoutput.hxx"
@@ -36,7 +38,6 @@
#include <swmodule.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
-#include "ww8par.hxx"
#include <comphelper/string.hxx>
#include <svtools/rtfkeywd.hxx>
#include <filter/msfilter/rtfutil.hxx>
@@ -49,6 +50,8 @@
#include <fmtmeta.hxx>
#include <o3tl/make_unique.hxx>
#include <IDocumentSettingAccess.hxx>
+#include <fmtfsize.hxx>
+#include <ndtxt.hxx>
using namespace ::com::sun::star;
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 65d143595252..fce00510105c 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -22,8 +22,8 @@
#include <docsh.hxx>
#include <IDocumentLayoutAccess.hxx>
-#include <editsh.hxx>
#include <unotxdoc.hxx>
+#include <viewsh.hxx>
#include <unotools/mediadescriptor.hxx>
#include <unotools/ucbstreamhelper.hxx>
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 1a898b0906ab..83c1b0b08185 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -33,6 +33,7 @@
#include <textboxhelper.hxx>
#include <dcontact.hxx>
#include <algorithm>
+#include "rtfexport.hxx"
using namespace css;
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index 894089e9ce39..c2c33de4aca2 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -26,7 +26,6 @@
#include <map>
#include <memory>
-#include <set>
#include "wrtww8.hxx"
diff --git a/sw/source/filter/ww8/rtfstringbuffer.cxx b/sw/source/filter/ww8/rtfstringbuffer.cxx
index a84c5846da4a..b50ffc31e5e9 100644
--- a/sw/source/filter/ww8/rtfstringbuffer.cxx
+++ b/sw/source/filter/ww8/rtfstringbuffer.cxx
@@ -8,6 +8,7 @@
#include "rtfstringbuffer.hxx"
#include "rtfattributeoutput.hxx"
+#include "rtfexport.hxx"
RtfStringBufferValue::RtfStringBufferValue() = default;
diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
index 020086a1187e..6396ffefbce4 100644
--- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
@@ -13,9 +13,6 @@
#include <com/sun/star/io/WrongFormatException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
-#include <osl/file.hxx>
-#include <osl/process.h>
-
using namespace ::com::sun::star;
/**
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx
index b9299d0d3f7d..bb8cea08ac95 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -26,7 +26,7 @@
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <cppuhelper/implementationentry.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <osl/file.hxx>
#include <unotools/mediadescriptor.hxx>
diff --git a/writerfilter/source/rtftok/rtfcontrolwords.cxx b/writerfilter/source/rtftok/rtfcontrolwords.cxx
index 26e1d4366f2b..1894055baf63 100644
--- a/writerfilter/source/rtftok/rtfcontrolwords.cxx
+++ b/writerfilter/source/rtftok/rtfcontrolwords.cxx
@@ -7,9 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include "rtflistener.hxx"
+#include "rtfcontrolwords.hxx"
#include <oox/token/namespaces.hxx>
-#include <oox/token/tokens.hxx>
#include <cstring>
namespace writerfilter
diff --git a/writerfilter/source/rtftok/rtfcontrolwords.hxx b/writerfilter/source/rtftok/rtfcontrolwords.hxx
index 226359db7bd0..e51cfeb9a2e4 100644
--- a/writerfilter/source/rtftok/rtfcontrolwords.hxx
+++ b/writerfilter/source/rtftok/rtfcontrolwords.hxx
@@ -2013,8 +2013,6 @@ struct RTFMathSymbol
bool operator<(const RTFMathSymbol& rOther) const;
};
-#define M_TOKEN(token) OOX_TOKEN(officeMath, token)
-
extern RTFMathSymbol aRTFMathControlWords[];
extern int nRTFMathControlWords;
diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
index 0f795c7d50e0..b5b347e6e287 100644
--- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
@@ -24,6 +24,7 @@
#include "rtfreferenceproperties.hxx"
#include "rtfsdrimport.hxx"
#include "rtfskipdestination.hxx"
+#include "rtftokenizer.hxx"
using namespace com::sun::star;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 081efdca95cc..b84e2eb81c4d 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -7,24 +7,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include "rtfdocumentimpl.hxx"
#include <memory>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/document/DocumentProperties.hpp>
-#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
#include <com/sun/star/graphic/GraphicProvider.hpp>
#include <com/sun/star/io/WrongFormatException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/text/HoriOrientation.hpp>
-#include <com/sun/star/text/VertOrientation.hpp>
-#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
-#include <svl/lngmisc.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
-#include <vcl/wmf.hxx>
-#include <vcl/layout.hxx>
#include <filter/msfilter/util.hxx>
#include <comphelper/string.hxx>
#include <svtools/grfmgr.hxx>
@@ -32,23 +25,19 @@
#include <tools/datetimeutils.hxx>
#include <comphelper/classids.hxx>
#include <comphelper/embeddedobjectcontainer.hxx>
-#include <comphelper/sequenceashashmap.hxx>
-#include <comphelper/sequence.hxx>
#include <sfx2/sfxbasemodel.hxx>
#include <sfx2/classificationhelper.hxx>
-#include <sfx2/sfxresid.hxx>
#include <oox/mathml/import.hxx>
#include <ooxml/resourceids.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/drawingml/drawingmltypes.hxx>
#include <rtl/uri.hxx>
-#include <dmapper/DomainMapperFactory.hxx>
+#include <rtl/tencinfo.h>
+#include <oox/helper/graphichelper.hxx>
#include "rtfsdrimport.hxx"
-#include "rtflookahead.hxx"
-#include "rtfcharsets.hxx"
#include "rtfreferenceproperties.hxx"
#include "rtfskipdestination.hxx"
-#include "rtffly.hxx"
+#include "rtftokenizer.hxx"
using namespace com::sun::star;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index e8d757c41959..386f1950080f 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -10,7 +10,6 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFDOCUMENTIMPL_HXX
#define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFDOCUMENTIMPL_HXX
-#include <stack>
#include <queue>
#include <tuple>
#include <vector>
@@ -20,9 +19,9 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
-#include <oox/helper/graphichelper.hxx>
#include <oox/mathml/importutils.hxx>
#include <rtl/strbuf.hxx>
+#include <rtl/ustrbuf.hxx>
#include <rtftok/RTFDocument.hxx>
#include "rtfreferencetable.hxx"
@@ -30,6 +29,10 @@
#include "rtflistener.hxx"
class SvStream;
+namespace oox
+{
+class GraphicHelper;
+}
namespace writerfilter
{
diff --git a/writerfilter/source/rtftok/rtffly.hxx b/writerfilter/source/rtftok/rtffly.hxx
index 2482305f25fe..252b6ec3e3b6 100644
--- a/writerfilter/source/rtftok/rtffly.hxx
+++ b/writerfilter/source/rtftok/rtffly.hxx
@@ -14,6 +14,8 @@
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
+#include <osl/endian.h>
+
namespace writerfilter
{
namespace rtftok
diff --git a/writerfilter/source/rtftok/rtflookahead.cxx b/writerfilter/source/rtftok/rtflookahead.cxx
index e99919b8feb4..009155bc8faf 100644
--- a/writerfilter/source/rtftok/rtflookahead.cxx
+++ b/writerfilter/source/rtftok/rtflookahead.cxx
@@ -8,7 +8,9 @@
*/
#include "rtflookahead.hxx"
+#include <com/sun/star/task/XStatusIndicator.hpp>
#include <tools/stream.hxx>
+#include "rtftokenizer.hxx"
using namespace com::sun::star;
diff --git a/writerfilter/source/rtftok/rtflookahead.hxx b/writerfilter/source/rtftok/rtflookahead.hxx
index ebde306a7b94..86de830a2e22 100644
--- a/writerfilter/source/rtftok/rtflookahead.hxx
+++ b/writerfilter/source/rtftok/rtflookahead.hxx
@@ -11,8 +11,8 @@
#define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLOOKAHEAD_HXX
#include <memory>
+#include <sal/types.h>
#include "rtflistener.hxx"
-#include "rtftokenizer.hxx"
class SvStream;
@@ -20,6 +20,7 @@ namespace writerfilter
{
namespace rtftok
{
+class RTFTokenizer;
/**
* This acts like an importer, but used for looking ahead, e.g. to
* determine if the current group contains a table, etc.
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index b79d37123399..98fd48aa008e 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -43,6 +43,8 @@
#include <boost/logic/tribool.hpp>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <android/compatibility.hxx>
+#include <dmapper/GraphicZOrderHelper.hxx>
+#include "rtfdocumentimpl.hxx"
using namespace com::sun::star;
diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx
index 83d025b918d2..e2923c3a0885 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.hxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.hxx
@@ -11,16 +11,21 @@
#define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFSDRIMPORT_HXX
#include <stack>
-
-#include <com/sun/star/drawing/XShapes.hpp>
+#include <vector>
#include <dmapper/GraphicZOrderHelper.hxx>
-#include "rtfdocumentimpl.hxx"
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
namespace writerfilter
{
namespace rtftok
{
+class RTFDocumentImpl;
+class RTFShape;
+
/// Handles the import of drawings using RTF markup.
class RTFSdrImport final
{
diff --git a/writerfilter/source/rtftok/rtfskipdestination.cxx b/writerfilter/source/rtftok/rtfskipdestination.cxx
index 00ab0a51b0e8..8e17b8c47d6b 100644
--- a/writerfilter/source/rtftok/rtfskipdestination.cxx
+++ b/writerfilter/source/rtftok/rtfskipdestination.cxx
@@ -10,6 +10,7 @@
#include "rtfskipdestination.hxx"
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include "rtflistener.hxx"
namespace writerfilter
{
diff --git a/writerfilter/source/rtftok/rtfskipdestination.hxx b/writerfilter/source/rtftok/rtfskipdestination.hxx
index b779b1cbcc53..8f8c6aa9d5f2 100644
--- a/writerfilter/source/rtftok/rtfskipdestination.hxx
+++ b/writerfilter/source/rtftok/rtfskipdestination.hxx
@@ -10,12 +10,12 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFSKIPDESTINATION_HXX
#define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFSKIPDESTINATION_HXX
-#include "rtflistener.hxx"
-
namespace writerfilter
{
namespace rtftok
{
+class RTFListener;
+
/// Skips a destination after a not parsed control word if it was prefixed with \*
class RTFSkipDestination final
{
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index 2299c8d05c57..3026d774a19a 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -9,15 +9,14 @@
#include "rtftokenizer.hxx"
#include <tools/stream.hxx>
-#include <unotools/resmgr.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/svapp.hxx>
#include <svx/dialmgr.hxx>
#include <svx/strings.hrc>
#include <rtl/strbuf.hxx>
-#include "rtfskipdestination.hxx"
+#include <rtl/ustrbuf.hxx>
#include <rtl/character.hxx>
+#include "rtfskipdestination.hxx"
#include <com/sun/star/io/BufferSizeExceededException.hpp>
+#include <osl/diagnose.h>
using namespace com::sun::star;
diff --git a/writerfilter/source/rtftok/rtftokenizer.hxx b/writerfilter/source/rtftok/rtftokenizer.hxx
index c13ca6c2d282..21046f462942 100644
--- a/writerfilter/source/rtftok/rtftokenizer.hxx
+++ b/writerfilter/source/rtftok/rtftokenizer.hxx
@@ -15,7 +15,6 @@
#include <vector>
#include <com/sun/star/task/XStatusIndicator.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
class SvStream;
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index 1cdd80040d2c..f52667a9b6ce 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -18,7 +18,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/string.hxx>
-#include <cppuhelper/implbase.hxx>
#include <test/bootstrapfixture.hxx>
#include <test/xmltesttools.hxx>
#include <unotest/macros_test.hxx>
diff --git a/writerperfect/source/writer/EPUBExportDialog.cxx b/writerperfect/source/writer/EPUBExportDialog.cxx
index 81efcdfcf687..fd449970fa7b 100644
--- a/writerperfect/source/writer/EPUBExportDialog.cxx
+++ b/writerperfect/source/writer/EPUBExportDialog.cxx
@@ -13,6 +13,7 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
+#include <comphelper/sequenceashashmap.hxx>
#include <sfx2/opengrf.hxx>
#include "EPUBExportFilter.hxx"
diff --git a/writerperfect/source/writer/EPUBExportDialog.hxx b/writerperfect/source/writer/EPUBExportDialog.hxx
index aafdbbb35105..8f84779aa8cc 100644
--- a/writerperfect/source/writer/EPUBExportDialog.hxx
+++ b/writerperfect/source/writer/EPUBExportDialog.hxx
@@ -10,12 +10,16 @@
#ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EPUBEXPORTDIALOG_HXX
#define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EPUBEXPORTDIALOG_HXX
-#include <comphelper/sequenceashashmap.hxx>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/lstbox.hxx>
+namespace comphelper
+{
+class SequenceAsHashMap;
+}
+
namespace writerperfect
{
diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx
index 42652719684f..7c1bd1a6d796 100644
--- a/writerperfect/source/writer/EPUBExportFilter.cxx
+++ b/writerperfect/source/writer/EPUBExportFilter.cxx
@@ -19,7 +19,6 @@
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/view/XRenderable.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <comphelper/genericpropertyset.hxx>
diff --git a/writerperfect/source/writer/EPUBExportFilter.hxx b/writerperfect/source/writer/EPUBExportFilter.hxx
index 7a97f4a40852..b736c9f4494b 100644
--- a/writerperfect/source/writer/EPUBExportFilter.hxx
+++ b/writerperfect/source/writer/EPUBExportFilter.hxx
@@ -18,7 +18,8 @@
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <tools/gen.hxx>
+
+class Size;
namespace writerperfect
{
diff --git a/writerperfect/source/writer/EPUBExportUIComponent.cxx b/writerperfect/source/writer/EPUBExportUIComponent.cxx
index 65164b67aa1b..e33fdab01972 100644
--- a/writerperfect/source/writer/EPUBExportUIComponent.cxx
+++ b/writerperfect/source/writer/EPUBExportUIComponent.cxx
@@ -11,7 +11,6 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include <vcl/vclptr.hxx>
diff --git a/writerperfect/source/writer/EPUBExportUIComponent.hxx b/writerperfect/source/writer/EPUBExportUIComponent.hxx
index 243e1f8a61fb..202b2d29b523 100644
--- a/writerperfect/source/writer/EPUBExportUIComponent.hxx
+++ b/writerperfect/source/writer/EPUBExportUIComponent.hxx
@@ -10,8 +10,6 @@
#ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EPUBEXPORTUICOMPONENT_HXX
#define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EPUBEXPORTUICOMPONENT_HXX
-#include <vector>
-
#include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
diff --git a/writerperfect/source/writer/EPUBPackage.hxx b/writerperfect/source/writer/EPUBPackage.hxx
index 5e093f540cc8..20bd5007a84d 100644
--- a/writerperfect/source/writer/EPUBPackage.hxx
+++ b/writerperfect/source/writer/EPUBPackage.hxx
@@ -14,7 +14,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/xml/sax/XWriter.hpp>
diff --git a/writerperfect/source/writer/exp/XMLFootnoteImportContext.hxx b/writerperfect/source/writer/exp/XMLFootnoteImportContext.hxx
index 7bd221162bb9..22594f2ddd76 100644
--- a/writerperfect/source/writer/exp/XMLFootnoteImportContext.hxx
+++ b/writerperfect/source/writer/exp/XMLFootnoteImportContext.hxx
@@ -10,6 +10,8 @@
#ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLFOOTNOTEIMPORTCONTEXT_HXX
#define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLFOOTNOTEIMPORTCONTEXT_HXX
+#include <librevenge/librevenge.h>
+
#include <rtl/ref.hxx>
#include "xmlictxt.hxx"
diff --git a/writerperfect/source/writer/exp/XMLTextListItemContext.cxx b/writerperfect/source/writer/exp/XMLTextListItemContext.cxx
index cbf3462566f0..f75bb782ba6b 100644
--- a/writerperfect/source/writer/exp/XMLTextListItemContext.cxx
+++ b/writerperfect/source/writer/exp/XMLTextListItemContext.cxx
@@ -11,7 +11,6 @@
#include "XMLTextListContext.hxx"
#include "txtparai.hxx"
-#include "xmlimp.hxx"
using namespace com::sun::star;
diff --git a/writerperfect/source/writer/exp/txtparai.hxx b/writerperfect/source/writer/exp/txtparai.hxx
index 8a79397e1471..ace8d740397a 100644
--- a/writerperfect/source/writer/exp/txtparai.hxx
+++ b/writerperfect/source/writer/exp/txtparai.hxx
@@ -12,6 +12,8 @@
#include <map>
+#include <librevenge/librevenge.h>
+
#include "xmlictxt.hxx"
namespace writerperfect
diff --git a/writerperfect/source/writer/exp/txtstyli.cxx b/writerperfect/source/writer/exp/txtstyli.cxx
index e8fe1a43bea0..931fbe459f65 100644
--- a/writerperfect/source/writer/exp/txtstyli.cxx
+++ b/writerperfect/source/writer/exp/txtstyli.cxx
@@ -10,7 +10,6 @@
#include "txtstyli.hxx"
#include "xmlfmt.hxx"
-#include "xmlimp.hxx"
using namespace com::sun::star;
diff --git a/writerperfect/source/writer/exp/xmlfmt.hxx b/writerperfect/source/writer/exp/xmlfmt.hxx
index e66f37dc8846..3b0c88616b7c 100644
--- a/writerperfect/source/writer/exp/xmlfmt.hxx
+++ b/writerperfect/source/writer/exp/xmlfmt.hxx
@@ -12,10 +12,13 @@
#include <map>
-#include <librevenge/librevenge.h>
-
#include "xmlictxt.hxx"
+namespace librevenge
+{
+class RVNGPropertyList;
+}
+
namespace writerperfect
{
namespace exp
diff --git a/writerperfect/source/writer/exp/xmlictxt.hxx b/writerperfect/source/writer/exp/xmlictxt.hxx
index cbdeab0f6898..622daccb368e 100644
--- a/writerperfect/source/writer/exp/xmlictxt.hxx
+++ b/writerperfect/source/writer/exp/xmlictxt.hxx
@@ -10,8 +10,6 @@
#ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLICTXT_HXX
#define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLICTXT_HXX
-#include <librevenge/librevenge.h>
-
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <cppuhelper/implbase.hxx>
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx
index f8defce11dc4..55e922aeaace 100644
--- a/writerperfect/source/writer/exp/xmlimp.cxx
+++ b/writerperfect/source/writer/exp/xmlimp.cxx
@@ -19,6 +19,7 @@
#include <com/sun/star/xml/sax/Writer.hpp>
#include <comphelper/propertyvalue.hxx>
#include <rtl/uri.hxx>
+#include <tools/gen.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
#include <unotools/streamwrap.hxx>
diff --git a/writerperfect/source/writer/exp/xmlimp.hxx b/writerperfect/source/writer/exp/xmlimp.hxx
index a6d2a49f1f59..9de89810f458 100644
--- a/writerperfect/source/writer/exp/xmlimp.hxx
+++ b/writerperfect/source/writer/exp/xmlimp.hxx
@@ -23,7 +23,8 @@
#include <cppuhelper/implbase.hxx>
#include <rtl/ref.hxx>
-#include <tools/gen.hxx>
+
+class Size;
namespace writerperfect
{
diff --git a/writerperfect/source/writer/exp/xmltbli.hxx b/writerperfect/source/writer/exp/xmltbli.hxx
index 01228ea9cdfe..ed755731e9fc 100644
--- a/writerperfect/source/writer/exp/xmltbli.hxx
+++ b/writerperfect/source/writer/exp/xmltbli.hxx
@@ -10,6 +10,8 @@
#ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLTBLI_HXX
#define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLTBLI_HXX
+#include <librevenge/librevenge.h>
+
#include "xmlictxt.hxx"
namespace writerperfect
diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx
index 50f683a35850..3abe91a727b2 100644
--- a/xmlsecurity/inc/documentsignaturemanager.hxx
+++ b/xmlsecurity/inc/documentsignaturemanager.hxx
@@ -26,12 +26,13 @@
#include <svl/sigstruct.hxx>
#include "xmlsignaturehelper.hxx"
-#include "pdfsignaturehelper.hxx"
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include "documentsignaturehelper.hxx"
#include <com/sun/star/beans/PropertyValue.hpp>
+class PDFSignatureHelper;
+
/// Manages signatures (addition, removal), used by DigitalSignaturesDialog.
class XMLSECURITY_DLLPUBLIC DocumentSignatureManager
{
diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx b/xmlsecurity/inc/pdfio/pdfdocument.hxx
index 622bc1ffb678..bafff6894040 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -11,13 +11,17 @@
#ifndef INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX
#define INCLUDED_XMLSECURITY_INC_PDFIO_PDFDOCUMENT_HXX
-#include <vcl/filter/pdfdocument.hxx>
-
-#include <tools/stream.hxx>
-
#include <xmlsecuritydllapi.h>
+namespace vcl
+{
+namespace filter
+{
+class PDFObjectElement;
+}
+}
struct SignatureInformation;
+class SvStream;
namespace xmlsecurity
{
diff --git a/xmlsecurity/inc/pdfsignaturehelper.hxx b/xmlsecurity/inc/pdfsignaturehelper.hxx
index 95df24c1abc1..2997a333d9a7 100644
--- a/xmlsecurity/inc/pdfsignaturehelper.hxx
+++ b/xmlsecurity/inc/pdfsignaturehelper.hxx
@@ -15,9 +15,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/security/DocumentSignatureInformation.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
+#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <svl/sigstruct.hxx>
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 642a034ae5e1..1cd24d3b6a73 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -15,9 +15,11 @@
#include <tools/datetime.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/filter/pdfdocument.hxx>
#include <documentsignaturemanager.hxx>
#include <pdfio/pdfdocument.hxx>
+#include <pdfsignaturehelper.hxx>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 18dd99644f35..4d67cf429d1e 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -18,27 +18,20 @@
#include <unotest/macros_test.hxx>
#include <test/xmltesttools.hxx>
-#include <com/sun/star/document/XStorageBasedDocument.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/xml/crypto/SEInitializer.hpp>
-#include <com/sun/star/io/TempFile.hpp>
-#include <com/sun/star/packages/manifest/ManifestReader.hpp>
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
-#include <sax/tools/converter.hxx>
#include <unotools/mediadescriptor.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
-#include <unotools/streamwrap.hxx>
#include <comphelper/storagehelper.hxx>
-#include <tools/date.hxx>
-#include <tools/time.hxx>
#include <sfx2/sfxbasemodel.hxx>
#include <sfx2/objsh.hxx>
#include <osl/file.hxx>
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index 7d9acf5ea7a4..81a61791fc3a 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -42,6 +42,8 @@
#include <xmlsec/xmlsec_init.hxx>
+#include <pdfsignaturehelper.hxx>
+
using namespace css;
DocumentSignatureManager::DocumentSignatureManager(
diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index 87f94958629c..bd8111aed6a6 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -16,7 +16,6 @@
#include <com/sun/star/beans/StringPair.hpp>
#include <comphelper/ofopxmlhelper.hxx>
-#include <config_global.h>
#include <o3tl/make_unique.hxx>
#include <rtl/ref.hxx>
#include <unotools/datetime.hxx>
diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
index 3402107dee64..b3f2f16fb193 100644
--- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
@@ -14,11 +14,10 @@
#include <com/sun/star/io/XTruncate.hpp>
#include <com/sun/star/security/CertificateValidity.hpp>
#include <com/sun/star/uno/SecurityException.hpp>
-#include <com/sun/star/xml/crypto/SEInitializer.hpp>
-#include <comphelper/sequence.hxx>
#include <tools/stream.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <vcl/filter/pdfdocument.hxx>
#include <pdfio/pdfdocument.hxx>
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 08437b2f8cae..c90de6a33af6 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -9,46 +9,17 @@
#include <pdfio/pdfdocument.hxx>
-#include <map>
#include <memory>
#include <vector>
-#include <com/sun/star/uno/Sequence.hxx>
-
-#include <comphelper/processfactory.hxx>
-#include <comphelper/scopeguard.hxx>
-#include <comphelper/string.hxx>
-#include <filter/msfilter/mscodec.hxx>
-#include <rtl/character.hxx>
-#include <rtl/strbuf.hxx>
#include <rtl/string.hxx>
+#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <sal/types.h>
-#include <sax/tools/converter.hxx>
-#include <tools/zcodec.hxx>
-#include <unotools/calendarwrapper.hxx>
-#include <unotools/datetime.hxx>
-#include <vcl/pdfwriter.hxx>
-#include <xmloff/xmluconv.hxx>
-#include <o3tl/make_unique.hxx>
#include <svl/sigstruct.hxx>
#include <svl/cryptosign.hxx>
-
-#ifdef XMLSEC_CRYPTO_NSS
-#include <cert.h>
-#include <cms.h>
-#include <nss.h>
-#include <secerr.h>
-#include <sechash.h>
-#endif
-
-#ifdef XMLSEC_CRYPTO_MSCRYPTO
-#include <prewin.h>
-#include <wincrypt.h>
-#include <postwin.h>
-#include <comphelper/windowserrorstring.hxx>
-#endif
+#include <vcl/filter/pdfdocument.hxx>
using namespace com::sun::star;
diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx
index 55a20d51a6b9..90d03d37e32b 100644
--- a/xmlsecurity/workben/pdfverify.cxx
+++ b/xmlsecurity/workben/pdfverify.cxx
@@ -20,6 +20,7 @@
#include <vcl/pngwrite.hxx>
#include <vcl/svapp.hxx>
#include <vcl/graphicfilter.hxx>
+#include <vcl/filter/pdfdocument.hxx>
#include <pdfio/pdfdocument.hxx>