summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-05-03 21:19:07 +0200
committerVasily Melenchuk <vasily.melenchuk@cib.de>2021-04-15 11:16:44 +0300
commitde64963a87c5d51797ec4034bf8c67346459e46d (patch)
tree9a5aa5c3e1784c8c6f4dc6834e9c9f6ab20d1ad0 /xmlsecurity
parent86b6e473cf0e64bd2fbff79b8e6294224d424020 (diff)
tdf#42949 Fix IWYU warnings in xmlsecurity/*cxx
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I89c77656ea4021cb16bd122cb1dd1cd803390c3d Reviewed-on: https://gerrit.libreoffice.org/71765 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/IwyuFilter_xmlsecurity.yaml17
-rw-r--r--xmlsecurity/inc/certificateviewer.hxx5
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx1
-rw-r--r--xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx3
-rw-r--r--xmlsecurity/source/component/certificatecontainer.cxx3
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx1
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx5
-rw-r--r--xmlsecurity/source/framework/elementcollector.cxx1
-rw-r--r--xmlsecurity/source/framework/elementmark.cxx1
-rw-r--r--xmlsecurity/source/framework/saxeventkeeperimpl.cxx1
-rw-r--r--xmlsecurity/source/framework/securityengine.cxx1
-rw-r--r--xmlsecurity/source/framework/signaturecreatorimpl.cxx4
-rw-r--r--xmlsecurity/source/framework/signatureengine.cxx4
-rw-r--r--xmlsecurity/source/framework/signatureverifierimpl.cxx2
-rw-r--r--xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx1
-rw-r--r--xmlsecurity/source/gpg/CertificateImpl.cxx1
-rw-r--r--xmlsecurity/source/gpg/GpgComponentFactory.cxx3
-rw-r--r--xmlsecurity/source/gpg/SEInitializer.cxx9
-rw-r--r--xmlsecurity/source/gpg/SecurityEnvironment.cxx3
-rw-r--r--xmlsecurity/source/gpg/XMLSecurityContext.cxx4
-rw-r--r--xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx4
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx3
-rw-r--r--xmlsecurity/source/helper/pdfsignaturehelper.cxx1
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx4
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper2.cxx3
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx10
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx2
-rw-r--r--xmlsecurity/source/helper/xsecsign.cxx9
-rw-r--r--xmlsecurity/source/helper/xsecverify.cxx5
-rw-r--r--xmlsecurity/source/xmlsec/nss/digestcontext.hxx1
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx9
-rw-r--r--xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/secerror.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx1
-rw-r--r--xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx10
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx7
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx6
-rw-r--r--xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx8
-rw-r--r--xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/xmlsec_init.cxx1
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.cxx1
42 files changed, 52 insertions, 117 deletions
diff --git a/xmlsecurity/IwyuFilter_xmlsecurity.yaml b/xmlsecurity/IwyuFilter_xmlsecurity.yaml
index 4bb593069eaf..03a3eb315272 100644
--- a/xmlsecurity/IwyuFilter_xmlsecurity.yaml
+++ b/xmlsecurity/IwyuFilter_xmlsecurity.yaml
@@ -67,6 +67,9 @@ blacklist:
- com/sun/star/security/XCertificate.hpp
- com/sun/star/lang/XUnoTunnel.hpp
- com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/source/gpg/GpgComponentFactory.cxx:
+ # Silence warning due to incorrect include path
+ - com/sun/star/lang/XSingleServiceFactory.hpp
xmlsecurity/source/gpg/SecurityEnvironment.hxx:
# Base class needs complete type
- com/sun/star/xml/crypto/XSecurityEnvironment.hpp
@@ -94,6 +97,12 @@ blacklist:
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/lang/XUnoTunnel.hpp
- com/sun/star/xml/wrapper/XXMLElementWrapper.hpp
+ xmlsecurity/source/xmlsec/errorcallback.cxx:
+ # Needed for xmlsec/errors.h
+ - xmlsec-wrapper.h
+ xmlsecurity/source/xmlsec/xmlstreamio.cxx:
+ # comphelper::ScopeGuard is in use but not noticed by IWYU
+ - comphelper/scopeguard.hxx
xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx:
# Base class needs complete type
- com/sun/star/security/XSanExtension.hpp
@@ -112,3 +121,11 @@ blacklist:
- com/sun/star/xml/crypto/XCertificateCreator.hpp
- com/sun/star/lang/XServiceInfo.hpp
- com/sun/star/lang/XUnoTunnel.hpp
+ xmlsecurity/source/xmlsec/nss/secerror.cxx:
+ # Used as array initializer
+ - certerrors.h
+ # Needed for macros used by certerrors.h
+ - nss.h
+ xmlsecurity/qa/unit/signing/signing.cxx:
+ # Don't replace URE header with impl. detail
+ - osl/thread.hxx
diff --git a/xmlsecurity/inc/certificateviewer.hxx b/xmlsecurity/inc/certificateviewer.hxx
index 1ef9530510fb..f8f6f4bcb26d 100644
--- a/xmlsecurity/inc/certificateviewer.hxx
+++ b/xmlsecurity/inc/certificateviewer.hxx
@@ -38,6 +38,11 @@ namespace xml { namespace crypto {
class XSecurityEnvironment; }}
}}}
+class CertificateViewerGeneralTP;
+class CertificateViewerDetailsTP;
+class CertificateViewerCertPathTP;
+class CertificateChooser;
+
class CertificateViewer : public TabDialog
{
private:
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index e27ff1f75d0a..b2781ccf714f 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -13,7 +13,6 @@
#include <sal/config.h>
#include <cstdlib>
-#include <type_traits>
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
diff --git a/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx b/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
index db576ef2fd1d..f7f47c8daaf6 100644
--- a/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
+++ b/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
@@ -9,9 +9,6 @@
#include <sal/config.h>
#include <test/screenshot_test.hxx>
-#include <rtl/strbuf.hxx>
-#include <osl/file.hxx>
-#include <sfx2/app.hxx>
#include <vcl/abstdlg.hxx>
using namespace ::com::sun::star;
diff --git a/xmlsecurity/source/component/certificatecontainer.cxx b/xmlsecurity/source/component/certificatecontainer.cxx
index c110ebb64e6f..5c9318ce07a3 100644
--- a/xmlsecurity/source/component/certificatecontainer.cxx
+++ b/xmlsecurity/source/component/certificatecontainer.cxx
@@ -22,13 +22,14 @@
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/security/XCertificateContainer.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/ref.hxx>
#include <sal/config.h>
+namespace com::sun::star::uno { class XComponentContext; }
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 3268ca38993c..f10154408e69 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -20,7 +20,6 @@
#include <config_gpgme.h>
#include <certificatechooser.hxx>
#include <certificateviewer.hxx>
-#include <biginteger.hxx>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include <comphelper/sequence.hxx>
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index e38456f4782b..cef75f57d665 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -19,7 +19,6 @@
#include <macrosecurity.hxx>
-#include <certificatechooser.hxx>
#include <certificateviewer.hxx>
#include <biginteger.hxx>
@@ -31,19 +30,15 @@
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <comphelper/sequence.hxx>
-#include <sfx2/filedlghelper.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/xmlsechelper.hxx>
#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <tools/urlobj.hxx>
#include <unotools/datetime.hxx>
#include <vcl/treelistentry.hxx>
-#include <strings.hrc>
-
using namespace comphelper;
using namespace ::com::sun::star;
diff --git a/xmlsecurity/source/framework/elementcollector.cxx b/xmlsecurity/source/framework/elementcollector.cxx
index 48399fc8cc77..18e0646ed75e 100644
--- a/xmlsecurity/source/framework/elementcollector.cxx
+++ b/xmlsecurity/source/framework/elementcollector.cxx
@@ -20,7 +20,6 @@
#include "elementmark.hxx"
#include "elementcollector.hxx"
-#include "buffernode.hxx"
#include <com/sun/star/xml/crypto/sax/ConstOfSecurityId.hpp>
#include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
diff --git a/xmlsecurity/source/framework/elementmark.cxx b/xmlsecurity/source/framework/elementmark.cxx
index 2ce86f8a1b60..06fe9dd5ec6d 100644
--- a/xmlsecurity/source/framework/elementmark.cxx
+++ b/xmlsecurity/source/framework/elementmark.cxx
@@ -19,7 +19,6 @@
#include "elementmark.hxx"
-#include "buffernode.hxx"
namespace cssxc = com::sun::star::xml::crypto;
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index 6a1ca8b9f35a..1ff026f48c45 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -22,7 +22,6 @@
#include "buffernode.hxx"
#include "elementmark.hxx"
#include "elementcollector.hxx"
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/crypto/sax/ConstOfSecurityId.hpp>
#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.hpp>
diff --git a/xmlsecurity/source/framework/securityengine.cxx b/xmlsecurity/source/framework/securityengine.cxx
index 3088d5a80b4b..e276163d41a8 100644
--- a/xmlsecurity/source/framework/securityengine.cxx
+++ b/xmlsecurity/source/framework/securityengine.cxx
@@ -19,7 +19,6 @@
#include <framework/securityengine.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
SecurityEngine::SecurityEngine()
diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
index 2d828e47fe25..95e17b646cb0 100644
--- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx
+++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
@@ -21,12 +21,12 @@
#include <framework/signaturecreatorimpl.hxx>
#include <framework/xmlsignaturetemplateimpl.hxx>
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
-#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
#include <rtl/ref.hxx>
+namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+
using namespace com::sun::star::uno;
namespace cssu = com::sun::star::uno;
namespace cssl = com::sun::star::lang;
diff --git a/xmlsecurity/source/framework/signatureengine.cxx b/xmlsecurity/source/framework/signatureengine.cxx
index b5a872deb168..3e74a7b25452 100644
--- a/xmlsecurity/source/framework/signatureengine.cxx
+++ b/xmlsecurity/source/framework/signatureengine.cxx
@@ -20,10 +20,10 @@
#include <framework/signatureengine.hxx>
#include <framework/xmlsignaturetemplateimpl.hxx>
-#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <rtl/ref.hxx>
+namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+
using namespace com::sun::star::uno;
namespace cssu = com::sun::star::uno;
namespace cssxc = com::sun::star::xml::crypto;
diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx
index a5bd86192305..bafaaf8df5b3 100644
--- a/xmlsecurity/source/framework/signatureverifierimpl.cxx
+++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx
@@ -21,8 +21,6 @@
#include <framework/signatureverifierimpl.hxx>
#include <framework/xmlsignaturetemplateimpl.hxx>
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
-#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
#include <rtl/ref.hxx>
diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
index 308ff78a6f22..c83c7751e794 100644
--- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
+++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
@@ -19,7 +19,6 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
-#include <rtl/uuid.h>
#include <framework/xmlsignaturetemplateimpl.hxx>
using namespace ::com::sun::star::uno ;
diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx b/xmlsecurity/source/gpg/CertificateImpl.cxx
index 72fed74b949e..46ef3fd8eda9 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.cxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.cxx
@@ -19,7 +19,6 @@
#include <officecfg/Office/Common.hxx>
#include <svl/sigstruct.hxx>
-#include <gpgme.h>
#include <context.h>
#include <data.h>
diff --git a/xmlsecurity/source/gpg/GpgComponentFactory.cxx b/xmlsecurity/source/gpg/GpgComponentFactory.cxx
index 4bb0b90ad211..fecf2ce3c852 100644
--- a/xmlsecurity/source/gpg/GpgComponentFactory.cxx
+++ b/xmlsecurity/source/gpg/GpgComponentFactory.cxx
@@ -9,8 +9,6 @@
#include <sal/config.h>
-#include <osl/thread.h>
-#include <cppuhelper/factory.hxx>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include "xmlsignature_gpgimpl.hxx"
@@ -18,7 +16,6 @@
using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
extern "C"
{
diff --git a/xmlsecurity/source/gpg/SEInitializer.cxx b/xmlsecurity/source/gpg/SEInitializer.cxx
index 02104cf4e4c1..f11ad59d8ba1 100644
--- a/xmlsecurity/source/gpg/SEInitializer.cxx
+++ b/xmlsecurity/source/gpg/SEInitializer.cxx
@@ -7,17 +7,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <config_gpgme.h>
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-
#include <cppuhelper/supportsservice.hxx>
#include <gpg/SEInitializer.hxx>
#include "SecurityEnvironment.hxx"
#include "XMLSecurityContext.hxx"
-#include <gpgme.h>
-#include <context.h>
+#include <global.h>
+
+namespace com::sun::star::uno { class XComponentContext; }
using namespace css;
using namespace css::lang;
diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.cxx b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
index e0b3782a9d0f..c76747ae1765 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.cxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
@@ -7,15 +7,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <config_gpgme.h>
-
#include "SecurityEnvironment.hxx"
#include "CertificateImpl.hxx"
#include <com/sun/star/security/CertificateCharacters.hpp>
#include <com/sun/star/security/CertificateValidity.hpp>
-#include <cppuhelper/supportsservice.hxx>
#include <comphelper/servicehelper.hxx>
#include <list>
diff --git a/xmlsecurity/source/gpg/XMLSecurityContext.cxx b/xmlsecurity/source/gpg/XMLSecurityContext.cxx
index 494b934f520b..460ed94dbfc7 100644
--- a/xmlsecurity/source/gpg/XMLSecurityContext.cxx
+++ b/xmlsecurity/source/gpg/XMLSecurityContext.cxx
@@ -8,13 +8,9 @@
*/
#include "XMLSecurityContext.hxx"
-#include "SecurityEnvironment.hxx"
#include <cppuhelper/supportsservice.hxx>
-#include <xmlsec/xmlstreamio.hxx>
-#include <xmlsec-wrapper.h>
-
using namespace css::uno;
using namespace css::lang;
using namespace css::xml::crypto;
diff --git a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx
index 8b4a5f218880..f836eca9cf02 100644
--- a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx
+++ b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx
@@ -17,11 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <config_gpgme.h>
-
#include <sal/config.h>
#include <sal/log.hxx>
-#include <rtl/uuid.h>
#include <cppuhelper/supportsservice.hxx>
#include <gpg/xmlsignature_gpgimpl.hxx>
@@ -39,7 +36,6 @@
#include <signingresult.h>
#include <importresult.h>
-#include <xmlsec/xmldocumentwrapper_xmlsecimpl.hxx>
#include <xmlelementwrapper_xmlsecimpl.hxx>
#include <xmlsec/xmlstreamio.hxx>
#include <xmlsec/errorcallback.hxx>
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index dabd45e8869d..7792f7f4fdee 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -25,12 +25,9 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/io/IOException.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/StorageFormats.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/StringPair.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
index 2aea01128869..b0795cb8f33f 100644
--- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
@@ -18,7 +18,6 @@
#include <com/sun/star/security/DocumentSignatureInformation.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
-#include <tools/stream.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <vcl/filter/pdfdocument.hxx>
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index db80016f84e0..bb2471f9f3d9 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -24,16 +24,13 @@
#include <xmlsignaturehelper2.hxx>
-#include <tools/stream.hxx>
#include <tools/datetime.hxx>
#include <xmloff/attrlist.hxx>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/io/XTruncate.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/StringPair.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
@@ -42,7 +39,6 @@
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/StorageFormats.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
#include <comphelper/ofopxmlhelper.hxx>
#include <comphelper/sequence.hxx>
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
index bb281b10be88..3e5d01b44861 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx
@@ -17,16 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <xmlsignaturehelper.hxx>
#include <xmlsignaturehelper2.hxx>
#include <tools/solar.h>
#include <unotools/streamhelper.hxx>
#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/embed/XStorageRawAccess.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <osl/diagnose.h>
#include <rtl/uri.hxx>
#include <sal/log.hxx>
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 1cd768f759f6..f1cbbfd7c0a3 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -27,24 +27,22 @@
# include <gpg/xmlsignature_gpgimpl.hxx>
#endif
-#include <com/sun/star/xml/crypto/sax/ElementMarkPriority.hpp>
-#include <com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.hpp>
#include <com/sun/star/xml/crypto/sax/XMissionTaker.hpp>
-#include <com/sun/star/xml/crypto/sax/XReferenceCollector.hpp>
-#include <com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeBroadcaster.hpp>
#include <com/sun/star/xml/crypto/SecurityOperationStatus.hpp>
#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/beans/StringPair.hpp>
+#ifdef ANDROID
+#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
+#endif
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <xmloff/attrlist.hxx>
-#include <rtl/math.hxx>
+#include <rtl/ustrbuf.hxx>
#include <rtl/ref.hxx>
#include <sal/log.hxx>
#include <unotools/datetime.hxx>
-#include <sax/tools/converter.hxx>
#include "ooxmlsecexporter.hxx"
#include <xmlsignaturehelper2.hxx>
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index f87aec62f21d..10b2a95cba99 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -25,8 +25,6 @@
#include <cppuhelper/exc_hlp.hxx>
#include <sal/log.hxx>
-#include <string.h>
-
namespace cssu = com::sun::star::uno;
namespace cssxc = com::sun::star::xml::crypto;
namespace cssxs = com::sun::star::xml::sax;
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index d8089b1773b3..4d1b89949feb 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -19,15 +19,8 @@
#include <xsecctl.hxx>
-#include <certificate.hxx>
-#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/xml/crypto/sax/ElementMarkPriority.hpp>
-#include <com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.hpp>
-#include <com/sun/star/xml/crypto/sax/XBlockerMonitor.hpp>
-#include <com/sun/star/xml/crypto/sax/XReferenceCollector.hpp>
-#include <com/sun/star/xml/crypto/sax/XSignatureCreationResultBroadcaster.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/embed/StorageFormats.hpp>
#include <rtl/uuid.h>
#include <sal/log.hxx>
@@ -35,6 +28,8 @@
#include <framework/signaturecreatorimpl.hxx>
#include <framework/saxeventkeeperimpl.hxx>
+namespace com::sun::star::graphic { class XGraphic; }
+
using namespace css;
using namespace css::uno;
using namespace css::graphic;
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index 305e5aa28128..6bcff47e2e84 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -30,13 +30,10 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/xml/crypto/sax/XKeyCollector.hpp>
#include <com/sun/star/xml/crypto/sax/ElementMarkPriority.hpp>
-#include <com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.hpp>
#include <com/sun/star/xml/crypto/sax/XReferenceCollector.hpp>
#include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultBroadcaster.hpp>
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
-#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/GraphicProvider.hpp>
-#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <com/sun/star/embed/StorageFormats.hpp>
#include <sal/log.hxx>
#include <unotools/datetime.hxx>
@@ -44,6 +41,8 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/seqstream.hxx>
+namespace com::sun::star::graphic { class XGraphic; }
+
using namespace css;
using namespace css::uno;
using namespace css::beans;
diff --git a/xmlsecurity/source/xmlsec/nss/digestcontext.hxx b/xmlsecurity/source/xmlsec/nss/digestcontext.hxx
index a8aafdefeec3..2f41862a815d 100644
--- a/xmlsecurity/source/xmlsec/nss/digestcontext.hxx
+++ b/xmlsecurity/source/xmlsec/nss/digestcontext.hxx
@@ -24,6 +24,7 @@
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
+#include <secmodt.h>
class ODigestContext : public cppu::WeakImplHelper< css::xml::crypto::XDigestContext >
{
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 5d33268f741d..c749cdb2a3f5 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -28,25 +28,22 @@
#include <rtl/instance.hxx>
#include <rtl/bootstrap.hxx>
#include <rtl/string.hxx>
-#include <rtl/strbuf.hxx>
#include <osl/file.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
-#include "seinitializer_nssimpl.hxx"
+#include <nss/nssinitializer.hxx>
-#include "securityenvironment_nssimpl.hxx"
#include "digestcontext.hxx"
#include "ciphercontext.hxx"
#include <memory>
-#include <nspr.h>
-#include <cert.h>
#include <nss.h>
#include <pk11pub.h>
#include <secmod.h>
-#include <nssckbi.h>
+#include <prerror.h>
+#include <prinit.h>
namespace cssu = css::uno;
namespace cssl = css::lang;
diff --git a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx
index a1d4200214e5..8ac01ade6546 100644
--- a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx
@@ -18,7 +18,6 @@
*/
#include <sal/config.h>
-#include <rtl/uuid.h>
#include <rtl/ustring.hxx>
#include <com/sun/star/security/ExtAltNameType.hpp>
#include <com/sun/star/security/CertAltNameEntry.hpp>
@@ -27,8 +26,6 @@
#include <seccomon.h>
#include <cert.h>
#include <certt.h>
-#include <secitem.h>
-#include <secport.h>
#include "sanextension_nssimpl.hxx"
diff --git a/xmlsecurity/source/xmlsec/nss/secerror.cxx b/xmlsecurity/source/xmlsec/nss/secerror.cxx
index 717dd32a535a..2b3438a356f6 100644
--- a/xmlsecurity/source/xmlsec/nss/secerror.cxx
+++ b/xmlsecurity/source/xmlsec/nss/secerror.cxx
@@ -20,13 +20,9 @@
#include <secerr.h>
#include "secerror.hxx"
-#include <sslerr.h>
-#include <nspr.h>
#include <nss.h>
#include <certt.h>
#include <sal/log.hxx>
-#include <sal/macros.h>
-#include <sal/types.h>
struct ErrDesc {
PRErrorCode const errNum;
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index d808742d412e..1c48f3910cfd 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -33,7 +33,6 @@
#include <rtl/ustrbuf.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/docpasswordrequest.hxx>
-#include <biginteger.hxx>
#include <sal/log.hxx>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <vector>
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
index 4143a320dae5..7795d76a1ed2 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
@@ -18,11 +18,6 @@
*/
#include <sal/types.h>
-#include <rtl/bootstrap.hxx>
-#include <rtl/string.hxx>
-#include <rtl/strbuf.hxx>
-#include <osl/file.hxx>
-#include <osl/thread.h>
#include <com/sun/star/xml/crypto/SecurityEnvironment.hpp>
#include <com/sun/star/xml/crypto/XMLSecurityContext.hpp>
#include <cppuhelper/supportsservice.hxx>
@@ -30,12 +25,7 @@
#include "seinitializer_nssimpl.hxx"
#include "securityenvironment_nssimpl.hxx"
-#include <nspr.h>
#include <cert.h>
-#include <nss.h>
-#include <pk11pub.h>
-#include <secmod.h>
-#include <nssckbi.h>
namespace cssxc = css::xml::crypto;
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index fde6b64d750d..117347373968 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -18,14 +18,12 @@
*/
#include "nssrenam.h"
-#include <nspr.h>
-#include <nss.h>
#include <secder.h>
#include <cert.h>
#include <hasht.h>
#include <secoid.h>
-#include <pk11func.h>
+#include <pk11pub.h>
#include <sal/config.h>
#include <comphelper/servicehelper.hxx>
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index ce01a0a40407..1ed575e92300 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -19,11 +19,12 @@
#include <sal/config.h>
#include <vector>
-#include <rtl/uuid.h>
+#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
-#include "securityenvironment_nssimpl.hxx"
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+
+namespace com::sun::star::uno { class XComponentContext; }
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang ;
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 28a9c8f7d1bf..29a53c5690de 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -18,9 +18,7 @@
*/
#include <sal/config.h>
-#include <rtl/uuid.h>
-#include <xmlsec/xmldocumentwrapper_xmlsecimpl.hxx>
#include <xmlelementwrapper_xmlsecimpl.hxx>
#include <xmlsec/xmlstreamio.hxx>
#include <xmlsec/errorcallback.hxx>
@@ -29,15 +27,15 @@
#include <xmlsec-wrapper.h>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <memory>
+namespace com::sun::star::uno { class XComponentContext; }
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ;
using ::com::sun::star::xml::wrapper::XXMLElementWrapper ;
-using ::com::sun::star::xml::wrapper::XXMLDocumentWrapper ;
using ::com::sun::star::xml::crypto::XSecurityEnvironment ;
using ::com::sun::star::xml::crypto::XXMLSignature ;
using ::com::sun::star::xml::crypto::XXMLSignatureTemplate ;
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index 1753ee70541a..a2f3e72b21a6 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -28,14 +28,6 @@
#include <xmloff/attrlist.hxx>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <vector>
-
#ifdef UNX
#define stricmp strcasecmp
#endif
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
index 4f9e8c8047e6..60b9714256b7 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
@@ -20,10 +20,11 @@
#include <string.h>
#include "xmlelementwrapper_xmlsecimpl.hxx"
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
+namespace com::sun::star::uno { class XComponentContext; }
+
using namespace com::sun::star;
XMLElementWrapper_XmlSecImpl::XMLElementWrapper_XmlSecImpl(const xmlNodePtr pNode)
diff --git a/xmlsecurity/source/xmlsec/xmlsec_init.cxx b/xmlsecurity/source/xmlsec/xmlsec_init.cxx
index 93dc49e6c126..6dcc45996536 100644
--- a/xmlsecurity/source/xmlsec/xmlsec_init.cxx
+++ b/xmlsecurity/source/xmlsec/xmlsec_init.cxx
@@ -13,7 +13,6 @@
#include <xmlsec/xmlstreamio.hxx>
#include <xmlsec-wrapper.h>
-#include <svl/cryptosign.hxx>
#ifdef XMLSEC_CRYPTO_MSCRYPTO
#include <xmlsec/mscng/crypto.h>
#else
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index 3c61084ad6ef..0f8918380855 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/xml/crypto/XUriBinding.hpp>
-#include <libxml/uri.h>
#include <xmlsec-wrapper.h>
static bool g_bInputCallbacksEnabled = false;