summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-04-27 23:53:02 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-04-29 13:17:59 +0200
commitd1ab132367c6e4ce0ca5711b7c5259d1f6e0e5cc (patch)
tree1ae990b153519fde79120be70e11299a3d5bc87c
parentb9b930046368532c61b20637cb0356e195529440 (diff)
tdf#42949 Fix IWYU warnings in xmlsecurity/*hxx
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. All hxx cleaned except the ones in xmlsecurity/source/xmlsec/mscrypt Change-Id: I651f53c9d339208b3132f9078a5c3829ff9c5dc8 Reviewed-on: https://gerrit.libreoffice.org/71448 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--xmlsecurity/IwyuFilter_xmlsecurity.yaml109
-rw-r--r--xmlsecurity/inc/certificatechooser.hxx6
-rw-r--r--xmlsecurity/inc/documentsignaturehelper.hxx4
-rw-r--r--xmlsecurity/inc/documentsignaturemanager.hxx2
-rw-r--r--xmlsecurity/inc/framework/saxeventkeeperimpl.hxx8
-rw-r--r--xmlsecurity/inc/framework/signaturecreatorimpl.hxx6
-rw-r--r--xmlsecurity/inc/framework/signatureengine.hxx14
-rw-r--r--xmlsecurity/inc/framework/signatureverifierimpl.hxx7
-rw-r--r--xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx7
-rw-r--r--xmlsecurity/inc/gpg/SEInitializer.hxx6
-rw-r--r--xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx10
-rw-r--r--xmlsecurity/inc/macrosecurity.hxx2
-rw-r--r--xmlsecurity/inc/xmlsec/errorcallback.hxx4
-rw-r--r--xmlsecurity/inc/xmlsec/saxhelper.hxx9
-rw-r--r--xmlsecurity/inc/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx5
-rw-r--r--xmlsecurity/inc/xmlsec/xmlstreamio.hxx6
-rw-r--r--xmlsecurity/inc/xmlsignaturehelper.hxx18
-rw-r--r--xmlsecurity/inc/xmlsignaturehelper2.hxx3
-rw-r--r--xmlsecurity/inc/xsecctl.hxx26
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx1
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx2
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx1
-rw-r--r--xmlsecurity/source/framework/buffernode.hxx5
-rw-r--r--xmlsecurity/source/framework/elementcollector.cxx1
-rw-r--r--xmlsecurity/source/framework/elementcollector.hxx4
-rw-r--r--xmlsecurity/source/framework/elementmark.hxx1
-rw-r--r--xmlsecurity/source/framework/saxeventkeeperimpl.cxx2
-rw-r--r--xmlsecurity/source/framework/signaturecreatorimpl.cxx2
-rw-r--r--xmlsecurity/source/framework/signatureverifierimpl.cxx2
-rw-r--r--xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx1
-rw-r--r--xmlsecurity/source/gpg/CertificateImpl.hxx4
-rw-r--r--xmlsecurity/source/gpg/CipherContext.hxx2
-rw-r--r--xmlsecurity/source/gpg/DigestContext.hxx2
-rw-r--r--xmlsecurity/source/gpg/SEInitializer.cxx2
-rw-r--r--xmlsecurity/source/gpg/SecurityEnvironment.cxx13
-rw-r--r--xmlsecurity/source/gpg/SecurityEnvironment.hxx17
-rw-r--r--xmlsecurity/source/gpg/XMLEncryption.hxx8
-rw-r--r--xmlsecurity/source/gpg/XMLSecurityContext.hxx8
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx1
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx3
-rw-r--r--xmlsecurity/source/helper/ooxmlsecexporter.cxx1
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.cxx1
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.hxx5
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx2
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx1
-rw-r--r--xmlsecurity/source/helper/xsecparser.hxx7
-rw-r--r--xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx4
-rw-r--r--xmlsecurity/source/xmlsec/errorcallback.cxx1
-rw-r--r--xmlsecurity/source/xmlsec/nss/ciphercontext.cxx1
-rw-r--r--xmlsecurity/source/xmlsec/nss/ciphercontext.hxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.hxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx5
-rw-r--r--xmlsecurity/source/xmlsec/nss/secerror.hxx2
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx6
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx16
-rw-r--r--xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx5
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx1
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx6
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx3
-rw-r--r--xmlsecurity/source/xmlsec/saxhelper.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx1
-rw-r--r--xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx5
-rw-r--r--xmlsecurity/source/xmlsec/xmlstreamio.cxx2
64 files changed, 250 insertions, 172 deletions
diff --git a/xmlsecurity/IwyuFilter_xmlsecurity.yaml b/xmlsecurity/IwyuFilter_xmlsecurity.yaml
index 7e481e991ed7..acb667bdee6f 100644
--- a/xmlsecurity/IwyuFilter_xmlsecurity.yaml
+++ b/xmlsecurity/IwyuFilter_xmlsecurity.yaml
@@ -4,3 +4,112 @@ blacklist:
xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx:
# complete type is needed
- com/sun/star/security/DocumentSignatureInformation.hpp
+ xmlsecurity/inc/xmlsignaturehelper2.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XUriBinding.hpp
+ xmlsecurity/inc/xsecctl.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeListener.hpp
+ - com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp
+ - com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp
+ # Needed on WIN32 for rtl::Reference<UriBindingHelper> to compile
+ - xmlsignaturehelper2.hxx
+ xmlsecurity/inc/framework/securityengine.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XXMLSignature.hpp
+ - com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.hpp
+ - com/sun/star/xml/crypto/sax/XSAXEventKeeper.hpp
+ xmlsecurity/inc/framework/signaturecreatorimpl.hxx:
+ # Base class needs complete type
+ - framework/signatureengine.hxx
+ - com/sun/star/xml/crypto/sax/XBlockerMonitor.hpp
+ - com/sun/star/xml/crypto/sax/XSignatureCreationResultBroadcaster.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/inc/framework/saxeventkeeperimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.hpp
+ - com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.hpp
+ - com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeBroadcaster.hpp
+ - com/sun/star/xml/sax/XDocumentHandler.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/inc/framework/signatureverifierimpl.hxx:
+ # Base class needs complete type
+ - framework/signatureengine.hxx
+ - com/sun/star/xml/crypto/sax/XSignatureVerifyResultBroadcaster.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/inc/gpg/SEInitializer.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XSEInitializer.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XXMLSignature.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/inc/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/wrapper/XXMLDocumentWrapper.hpp
+ - com/sun/star/xml/csax/XCompressedDocumentHandler.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/source/gpg/CipherContext.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XCipherContext.hpp
+ xmlsecurity/source/gpg/DigestContext.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XDigestContext.hpp
+ xmlsecurity/source/gpg/CertificateImpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/security/XCertificate.hpp
+ - com/sun/star/lang/XUnoTunnel.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/source/gpg/SecurityEnvironment.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XSecurityEnvironment.hpp
+ - com/sun/star/lang/XUnoTunnel.hpp
+ xmlsecurity/source/gpg/XMLSecurityContext.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XXMLSecurityContext.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/source/gpg/XMLEncryption.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XXMLEncryption.hpp
+ xmlsecurity/source/helper/ooxmlsecparser.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/sax/XDocumentHandler.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ xmlsecurity/source/helper/xsecparser.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/sax/XDocumentHandler.hpp
+ - com/sun/star/lang/XInitialization.hpp
+ xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/security/XCertificateExtension.hpp
+ xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/lang/XServiceInfo.hpp
+ - com/sun/star/lang/XUnoTunnel.hpp
+ - com/sun/star/xml/wrapper/XXMLElementWrapper.hpp
+ xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/security/XSanExtension.hpp
+ xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/security/XCertificate.hpp
+ - com/sun/star/lang/XUnoTunnel.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx:
+ # Base class needs complete type
+ - nssinitializer.hxx
+ - com/sun/star/xml/crypto/XSEInitializer.hpp
+ xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx:
+ # Base class needs complete type
+ - com/sun/star/xml/crypto/XSecurityEnvironment.hpp
+ - com/sun/star/xml/crypto/XCertificateCreator.hpp
+ - com/sun/star/lang/XServiceInfo.hpp
+ - com/sun/star/lang/XUnoTunnel.hpp
diff --git a/xmlsecurity/inc/certificatechooser.hxx b/xmlsecurity/inc/certificatechooser.hxx
index 7f551937d2ba..328fdc24f2b3 100644
--- a/xmlsecurity/inc/certificatechooser.hxx
+++ b/xmlsecurity/inc/certificatechooser.hxx
@@ -20,11 +20,7 @@
#ifndef INCLUDED_XMLSECURITY_INC_CERTIFICATECHOOSER_HXX
#define INCLUDED_XMLSECURITY_INC_CERTIFICATECHOOSER_HXX
-#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/Sequence.hxx>
-#include <svl/sigstruct.hxx>
#include <vcl/weld.hxx>
namespace com {
@@ -36,6 +32,8 @@ namespace xml { namespace crypto {
class XSecurityEnvironment; }}
}}}
+namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+
struct UserData
{
css::uno::Reference<css::security::XCertificate> xCertificate;
diff --git a/xmlsecurity/inc/documentsignaturehelper.hxx b/xmlsecurity/inc/documentsignaturehelper.hxx
index bacef66746cd..ccf71edd9c62 100644
--- a/xmlsecurity/inc/documentsignaturehelper.hxx
+++ b/xmlsecurity/inc/documentsignaturehelper.hxx
@@ -21,10 +21,8 @@
#define INCLUDED_XMLSECURITY_INC_DOCUMENTSIGNATUREHELPER_HXX
#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <rtl/ustring.hxx>
#include <svl/sigstruct.hxx>
-#include "xmlsecuritydllapi.h"
#include <vector>
@@ -37,6 +35,8 @@ namespace embed {
class XStorage; }
}}}
+namespace com::sun::star::xml::sax { class XDocumentHandler; }
+
enum class DocumentSignatureMode
{
Content,
diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx
index 85ad7cb07b1e..71c1475687a3 100644
--- a/xmlsecurity/inc/documentsignaturemanager.hxx
+++ b/xmlsecurity/inc/documentsignaturemanager.hxx
@@ -28,6 +28,8 @@
#include "xmlsignaturehelper.hxx"
#include "documentsignaturehelper.hxx"
+#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
+
namespace com
{
namespace sun
diff --git a/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx b/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
index 30dfa337c3ef..04994cca63a5 100644
--- a/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
+++ b/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
@@ -23,13 +23,9 @@
#include <com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.hpp>
#include <com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.hpp>
#include <com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeBroadcaster.hpp>
-#include <com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeListener.hpp>
-#include <com/sun/star/xml/csax/XCompressedDocumentHandler.hpp>
-#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <xmlsecuritydllapi.h>
#include <cppuhelper/implbase.hxx>
@@ -40,6 +36,10 @@ class ElementCollector;
#include <vector>
#include <memory>
+namespace com::sun::star::xml::crypto::sax { class XSAXEventKeeperStatusChangeListener; }
+namespace com::sun::star::xml::csax { class XCompressedDocumentHandler; }
+namespace com::sun::star::xml::wrapper { class XXMLDocumentWrapper; }
+
class XMLSECURITY_DLLPUBLIC SAXEventKeeperImpl : public cppu::WeakImplHelper
<
css::xml::crypto::sax::XSecuritySAXEventKeeper,
diff --git a/xmlsecurity/inc/framework/signaturecreatorimpl.hxx b/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
index 435ca05ec343..fe7fb5669d0e 100644
--- a/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
+++ b/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
@@ -21,16 +21,16 @@
#define INCLUDED_XMLSECURITY_INC_FRAMEWORK_SIGNATURECREATORIMPL_HXX
#include <com/sun/star/xml/crypto/sax/XBlockerMonitor.hpp>
-#include <com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp>
#include <com/sun/star/xml/crypto/sax/XSignatureCreationResultBroadcaster.hpp>
-#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <cppuhelper/implbase.hxx>
#include <framework/signatureengine.hxx>
+namespace com::sun::star::xml::crypto { class XSecurityEnvironment; }
+namespace com::sun::star::xml::crypto::sax { class XSignatureCreationResultListener;}
+
typedef cppu::ImplInheritanceHelper
<
SignatureEngine,
diff --git a/xmlsecurity/inc/framework/signatureengine.hxx b/xmlsecurity/inc/framework/signatureengine.hxx
index f1f53d4412a0..56fc057ebf39 100644
--- a/xmlsecurity/inc/framework/signatureengine.hxx
+++ b/xmlsecurity/inc/framework/signatureengine.hxx
@@ -21,26 +21,24 @@
#define INCLUDED_XMLSECURITY_INC_FRAMEWORK_SIGNATUREENGINE_HXX
#include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.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/XKeyCollector.hpp>
#include <com/sun/star/xml/crypto/sax/XMissionTaker.hpp>
-#include <com/sun/star/xml/crypto/sax/XSAXEventKeeper.hpp>
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
-#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
#include <com/sun/star/xml/crypto/XUriBinding.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
-#include <rtl/ref.hxx>
#include <xmlsecuritydllapi.h>
#include <framework/securityengine.hxx>
-#include <framework/xmlsignaturetemplateimpl.hxx>
#include <vector>
+namespace com::sun::star::io { class XInputStream; }
+namespace com::sun::star::xml::crypto { class XXMLSignature; }
+namespace rtl { template <class reference_type> class Reference; }
+
+class XMLSignatureTemplateImpl;
+
class XMLSECURITY_DLLPUBLIC SignatureEngine : public cppu::ImplInheritanceHelper
<
SecurityEngine,
diff --git a/xmlsecurity/inc/framework/signatureverifierimpl.hxx b/xmlsecurity/inc/framework/signatureverifierimpl.hxx
index b4c73fb2eec0..7b022afd1f0c 100644
--- a/xmlsecurity/inc/framework/signatureverifierimpl.hxx
+++ b/xmlsecurity/inc/framework/signatureverifierimpl.hxx
@@ -20,18 +20,17 @@
#ifndef INCLUDED_XMLSECURITY_INC_FRAMEWORK_SIGNATUREVERIFIERIMPL_HXX
#define INCLUDED_XMLSECURITY_INC_FRAMEWORK_SIGNATUREVERIFIERIMPL_HXX
-#include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp>
#include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultBroadcaster.hpp>
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
#include <xmlsecuritydllapi.h>
#include <framework/signatureengine.hxx>
+namespace com::sun::star::xml::crypto::sax { class XSignatureVerifyResultListener; }
+namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+
typedef cppu::ImplInheritanceHelper
<
SignatureEngine,
diff --git a/xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx b/xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx
index e0c9fcaf40c1..4be61d5fe562 100644
--- a/xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx
+++ b/xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx
@@ -22,19 +22,18 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
-#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <vector>
+namespace com::sun::star::lang { class XMultiServiceFactory; }
+namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+
class XMLSignatureTemplateImpl : public ::cppu::WeakImplHelper<
css::xml::crypto::XXMLSignatureTemplate ,
css::lang::XServiceInfo >
diff --git a/xmlsecurity/inc/gpg/SEInitializer.hxx b/xmlsecurity/inc/gpg/SEInitializer.hxx
index 0b6196e76d8e..0aef1dd8b7de 100644
--- a/xmlsecurity/inc/gpg/SEInitializer.hxx
+++ b/xmlsecurity/inc/gpg/SEInitializer.hxx
@@ -10,18 +10,16 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_GPG_SEINITIALIZER_HXX
#define INCLUDED_XMLSECURITY_SOURCE_GPG_SEINITIALIZER_HXX
-#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
#include <xsecxmlsecdllapi.h>
#include <cppuhelper/implbase.hxx>
+namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+
class XSECXMLSEC_DLLPUBLIC SEInitializerGpg : public cppu::WeakImplHelper
<
css::xml::crypto::XSEInitializer,
diff --git a/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx b/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx
index 7779e4b6f003..15d58528d805 100644
--- a/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx
+++ b/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx
@@ -24,17 +24,17 @@
#include <rtl/ustring.hxx>
#include <xsecxmlsecdllapi.h>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
-#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
+
+namespace com::sun::star::xml::crypto { class XXMLSignatureTemplate; }
+namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+namespace com::sun::star::lang { class XMultiServiceFactory; }
+
class XSECXMLSEC_DLLPUBLIC XMLSignature_GpgImpl : public ::cppu::WeakImplHelper<
css::xml::crypto::XXMLSignature ,
diff --git a/xmlsecurity/inc/macrosecurity.hxx b/xmlsecurity/inc/macrosecurity.hxx
index 4888a5e2f2a0..3dafc9d6d4dd 100644
--- a/xmlsecurity/inc/macrosecurity.hxx
+++ b/xmlsecurity/inc/macrosecurity.hxx
@@ -23,8 +23,6 @@
#include <vcl/weld.hxx>
#include <unotools/securityoptions.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
namespace com {
namespace sun {
namespace star {
diff --git a/xmlsecurity/inc/xmlsec/errorcallback.hxx b/xmlsecurity/inc/xmlsec/errorcallback.hxx
index bcb800952636..afb17b0da189 100644
--- a/xmlsecurity/inc/xmlsec/errorcallback.hxx
+++ b/xmlsecurity/inc/xmlsec/errorcallback.hxx
@@ -20,10 +20,6 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_XMLSEC_ERRORCALLBACK_HXX
#define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_ERRORCALLBACK_HXX
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
-#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
-
#include <xsecxmlsecdllapi.h>
// Only used for logging
diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx
index 0970f87fdd25..e1eed377d6fa 100644
--- a/xmlsecurity/inc/xmlsec/saxhelper.hxx
+++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx
@@ -22,11 +22,10 @@
#include <libxml/tree.h>
-#include <com/sun/star/xml/sax/SAXException.hpp>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <com/sun/star/xml/sax/XLocator.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/xml/csax/XMLAttribute.hpp>
+#include <rtl/ustring.hxx>
+
+namespace com::sun::star::xml::csax { struct XMLAttribute; }
+namespace com::sun::star::uno { template <typename > class Sequence; }
/** This class represents a SAX handler which simply forwards to
the corresponding libxml API and translates parameter if necessary.
diff --git a/xmlsecurity/inc/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx b/xmlsecurity/inc/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx
index f4e3a37f06ba..86b60f33cb57 100644
--- a/xmlsecurity/inc/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx
+++ b/xmlsecurity/inc/xmlsec/xmldocumentwrapper_xmlsecimpl.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.hpp>
#include <com/sun/star/xml/csax/XCompressedDocumentHandler.hpp>
-#include <com/sun/star/xml/crypto/sax/XSAXEventKeeper.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
@@ -35,10 +34,6 @@
#include <libxml/tree.h>
-namespace com { namespace sun { namespace star { namespace uno {
- class XComponentContext;
-} } } }
-
class XSECXMLSEC_DLLPUBLIC XMLDocumentWrapper_XmlSecImpl : public cppu::WeakImplHelper
<
css::xml::wrapper::XXMLDocumentWrapper,
diff --git a/xmlsecurity/inc/xmlsec/xmlstreamio.hxx b/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
index 6847ebecf6de..ee9e40e54ce6 100644
--- a/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
+++ b/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
@@ -20,11 +20,11 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_XMLSEC_XMLSTREAMIO_HXX
#define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_XMLSTREAMIO_HXX
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/xml/crypto/XUriBinding.hpp>
-
#include <xsecxmlsecdllapi.h>
+namespace com::sun::star::xml::crypto { class XUriBinding; }
+namespace com::sun::star::uno { template <typename > class Reference; }
+
XSECXMLSEC_DLLPUBLIC int xmlEnableStreamInputCallbacks() ;
XSECXMLSEC_DLLPUBLIC void xmlDisableStreamInputCallbacks() ;
XSECXMLSEC_DLLPUBLIC int xmlRegisterStreamInputCallbacks(
diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx
index 02128bb4f6a8..2e6c2ce7f2b9 100644
--- a/xmlsecurity/inc/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper.hxx
@@ -20,24 +20,16 @@
#ifndef INCLUDED_XMLSECURITY_INC_XMLSIGNATUREHELPER_HXX
#define INCLUDED_XMLSECURITY_INC_XMLSIGNATUREHELPER_HXX
-#include <vector>
-
#include <tools/link.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ref.hxx>
#include <svl/sigstruct.hxx>
-#include "xsecctl.hxx"
#include "xmlsecuritydllapi.h"
#include "xmlsignaturehelper.hxx"
-#include <com/sun/star/graphic/XGraphic.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/xml/sax/XWriter.hpp>
-#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
-#include <com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp>
-#include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp>
-
class DateTime;
+class UriBindingHelper;
+class XSecController;
namespace com {
namespace sun {
@@ -49,6 +41,12 @@ namespace embed {
class XStorage; }
}}}
+namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; } } } }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLSecurityContext; } } } } }
+namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XDocumentHandler; } } } } }
+namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XWriter; } } } } }
+
/**********************************************************
XMLSignatureHelper
diff --git a/xmlsecurity/inc/xmlsignaturehelper2.hxx b/xmlsecurity/inc/xmlsignaturehelper2.hxx
index 867118ba8da9..340d1e54dd1c 100644
--- a/xmlsecurity/inc/xmlsignaturehelper2.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper2.hxx
@@ -20,12 +20,11 @@
#ifndef INCLUDED_XMLSECURITY_INC_XMLSIGNATUREHELPER2_HXX
#define INCLUDED_XMLSECURITY_INC_XMLSIGNATUREHELPER2_HXX
-#include <tools/link.hxx>
#include <rtl/ustring.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/crypto/XUriBinding.hpp>
namespace com {
namespace sun {
diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
index 151de483371d..351c94a2a3e6 100644
--- a/xmlsecurity/inc/xsecctl.hxx
+++ b/xmlsecurity/inc/xsecctl.hxx
@@ -22,25 +22,10 @@
#include <svl/sigstruct.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <com/sun/star/graphic/XGraphic.hpp>
-#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
-#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
-#include <com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.hpp>
-#include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
#include <com/sun/star/xml/crypto/sax/XSAXEventKeeperStatusChangeListener.hpp>
#include <com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp>
#include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp>
-#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/embed/XStorage.hpp>
-#include <rtl/ustrbuf.hxx>
#include <rtl/ref.hxx>
#include <cppuhelper/implbase.hxx>
@@ -48,6 +33,16 @@
#include "xmlsignaturehelper2.hxx"
+namespace com::sun::star::embed { class XStorage; }
+namespace com::sun::star::graphic { class XGraphic; }
+namespace com::sun::star::io { class XInputStream; }
+namespace com::sun::star::lang { class XInitialization; }
+namespace com::sun::star::uno { class XComponentContext; }
+namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+namespace com::sun::star::xml::crypto { class XXMLSignature; }
+namespace com::sun::star::xml::crypto:: sax { class XReferenceResolvedListener; }
+namespace com::sun::star::xml::sax { class XDocumentHandler; }
+
#define NS_XMLDSIG "http://www.w3.org/2000/09/xmldsig#"
#define NS_DC "http://purl.org/dc/elements/1.1/"
#define NS_XD "http://uri.etsi.org/01903/v1.3.2#"
@@ -66,7 +61,6 @@
#define ALGO_XMLDSIGSHA512 "http://www.w3.org/2001/04/xmlenc#sha512"
#define ALGO_RELATIONSHIP "http://schemas.openxmlformats.org/package/2006/RelationshipTransform"
-class XSecParser;
class XMLDocumentWrapper_XmlSecImpl;
class SAXEventKeeperImpl;
class XMLSignatureHelper;
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 0116f49ca166..6e907d428679 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -45,6 +45,7 @@
#include <xmlsignaturehelper.hxx>
#include <documentsignaturemanager.hxx>
#include <certificate.hxx>
+#include <xsecctl.hxx>
using namespace com::sun::star;
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index e27181d95129..43b74580d472 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/embed/StorageFormats.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ucb/XContent.hpp>
#include <com/sun/star/ucb/XContentIdentifierFactory.hpp>
@@ -49,6 +50,7 @@
#include <comphelper/documentconstants.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
+#include <cppuhelper/implbase.hxx>
#include <comphelper/xmlsechelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <sal/log.hxx>
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 757c2008803d..deaead487768 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -22,6 +22,7 @@
#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>
#include <comphelper/xmlsechelper.hxx>
diff --git a/xmlsecurity/source/framework/buffernode.hxx b/xmlsecurity/source/framework/buffernode.hxx
index 356e52bc33df..1b8e6f8574e9 100644
--- a/xmlsecurity/source/framework/buffernode.hxx
+++ b/xmlsecurity/source/framework/buffernode.hxx
@@ -20,12 +20,13 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_BUFFERNODE_HXX
#define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_BUFFERNODE_HXX
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
+#include <com/sun/star/uno/Reference.hxx>
#include <memory>
#include <vector>
+namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+
class ElementMark;
class ElementCollector;
diff --git a/xmlsecurity/source/framework/elementcollector.cxx b/xmlsecurity/source/framework/elementcollector.cxx
index a4b045dbe4ec..48399fc8cc77 100644
--- a/xmlsecurity/source/framework/elementcollector.cxx
+++ b/xmlsecurity/source/framework/elementcollector.cxx
@@ -22,6 +22,7 @@
#include "elementcollector.hxx"
#include "buffernode.hxx"
#include <com/sun/star/xml/crypto/sax/ConstOfSecurityId.hpp>
+#include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
namespace cssu = com::sun::star::uno;
namespace cssxc = com::sun::star::xml::crypto;
diff --git a/xmlsecurity/source/framework/elementcollector.hxx b/xmlsecurity/source/framework/elementcollector.hxx
index 80e021a09e75..8af12f246b60 100644
--- a/xmlsecurity/source/framework/elementcollector.hxx
+++ b/xmlsecurity/source/framework/elementcollector.hxx
@@ -21,8 +21,10 @@
#define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_ELEMENTCOLLECTOR_HXX
#include "elementmark.hxx"
-#include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
#include <com/sun/star/xml/crypto/sax/ElementMarkPriority.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+namespace com::sun::star::xml::crypto::sax { class XReferenceResolvedListener; }
class ElementCollector : public ElementMark
/****** elementcollector.hxx/CLASS ElementCollector ***************************
diff --git a/xmlsecurity/source/framework/elementmark.hxx b/xmlsecurity/source/framework/elementmark.hxx
index 2e7527d80d3a..8697a9de8876 100644
--- a/xmlsecurity/source/framework/elementmark.hxx
+++ b/xmlsecurity/source/framework/elementmark.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_ELEMENTMARK_HXX
#define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_ELEMENTMARK_HXX
-#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/crypto/sax/ElementMarkType.hpp>
class BufferNode;
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index 5358230f7a46..03fe79ce88fc 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -25,6 +25,8 @@
#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>
+#include <com/sun/star/xml/csax/XCompressedDocumentHandler.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
index 8289440b8b1e..2d828e47fe25 100644
--- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx
+++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
@@ -19,11 +19,13 @@
#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>
using namespace com::sun::star::uno;
namespace cssu = com::sun::star::uno;
diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx
index 30e7b8fab1d4..a5bd86192305 100644
--- a/xmlsecurity/source/framework/signatureverifierimpl.cxx
+++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx
@@ -19,11 +19,13 @@
#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>
namespace cssu = com::sun::star::uno;
namespace cssl = com::sun::star::lang;
diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
index 75da61a9a59f..308ff78a6f22 100644
--- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
+++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
@@ -24,7 +24,6 @@
using namespace ::com::sun::star::uno ;
using ::com::sun::star::lang::XMultiServiceFactory ;
-using ::com::sun::star::lang::XSingleServiceFactory ;
using ::com::sun::star::xml::wrapper::XXMLElementWrapper ;
using ::com::sun::star::xml::crypto::XXMLSignatureTemplate ;
diff --git a/xmlsecurity/source/gpg/CertificateImpl.hxx b/xmlsecurity/source/gpg/CertificateImpl.hxx
index e9839c31f013..cb947f0f435b 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.hxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.hxx
@@ -15,15 +15,11 @@
#include <sal/types.h>
#include <sal/config.h>
#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/uno/SecurityException.hpp>
#include <com/sun/star/security/CertificateKind.hpp>
#include <com/sun/star/security/XCertificate.hpp>
diff --git a/xmlsecurity/source/gpg/CipherContext.hxx b/xmlsecurity/source/gpg/CipherContext.hxx
index 89eaf4646218..4e4e04cce917 100644
--- a/xmlsecurity/source/gpg/CipherContext.hxx
+++ b/xmlsecurity/source/gpg/CipherContext.hxx
@@ -11,8 +11,6 @@
#define INCLUDED_XMLSECURITY_SOURCE_GPG_CIPHERCONTEXT_HXX
#include <com/sun/star/xml/crypto/XCipherContext.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <cppuhelper/implbase.hxx>
diff --git a/xmlsecurity/source/gpg/DigestContext.hxx b/xmlsecurity/source/gpg/DigestContext.hxx
index 41aa7cadd663..99fa264ef8d2 100644
--- a/xmlsecurity/source/gpg/DigestContext.hxx
+++ b/xmlsecurity/source/gpg/DigestContext.hxx
@@ -11,8 +11,6 @@
#define INCLUDED_XMLSECURITY_SOURCE_GPG_DIGESTCONTEXT_HXX
#include <com/sun/star/xml/crypto/XDigestContext.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
#include <cppuhelper/implbase.hxx>
diff --git a/xmlsecurity/source/gpg/SEInitializer.cxx b/xmlsecurity/source/gpg/SEInitializer.cxx
index 689d00f726c1..02104cf4e4c1 100644
--- a/xmlsecurity/source/gpg/SEInitializer.cxx
+++ b/xmlsecurity/source/gpg/SEInitializer.cxx
@@ -9,6 +9,8 @@
#include <config_gpgme.h>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
#include <cppuhelper/supportsservice.hxx>
#include <gpg/SEInitializer.hxx>
#include "SecurityEnvironment.hxx"
diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.cxx b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
index 6ba1bced5cfa..99dc064ca6d2 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.cxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
@@ -12,6 +12,9 @@
#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>
@@ -28,6 +31,16 @@
#include <keylistresult.h>
#include <xmlsec-wrapper.h>
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wundef"
+#endif
+#include <gpgme.h>
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
+#include <context.h>
+
using namespace css;
using namespace css::security;
using namespace css::uno;
diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.hxx b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
index 00480824b72a..a8aacfa5a10b 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.hxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
@@ -12,27 +12,14 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/SecurityException.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
-#include <com/sun/star/security/XCertificate.hpp>
-#include <com/sun/star/security/CertificateCharacters.hpp>
-#include <com/sun/star/security/CertificateValidity.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#if defined _MSC_VER && defined __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wundef"
-#endif
-#include <gpgme.h>
-#if defined _MSC_VER && defined __clang__
-#pragma clang diagnostic pop
-#endif
-#include <context.h>
+namespace com::sun::star::security { class XCertificate; }
+namespace GpgME { class Context; }
class SecurityEnvironmentGpg : public cppu::WeakImplHelper< css::xml::crypto::XSecurityEnvironment,
css::lang::XUnoTunnel >
diff --git a/xmlsecurity/source/gpg/XMLEncryption.hxx b/xmlsecurity/source/gpg/XMLEncryption.hxx
index d9c6b508c666..168128b40a9c 100644
--- a/xmlsecurity/source/gpg/XMLEncryption.hxx
+++ b/xmlsecurity/source/gpg/XMLEncryption.hxx
@@ -11,15 +11,13 @@
#define INCLUDED_XMLSECURITY_SOURCE_GPG_XMLENCRYPTION_HXX
#include <sal/config.h>
-#include <rtl/ustring.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/xml/crypto/XXMLEncryption.hpp>
-#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.hpp>
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
-#include <com/sun/star/xml/crypto/XMLEncryptionException.hpp>
+
+namespace com::sun::star::xml::crypto { class XXMLEncryptionTemplate; }
+namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
class XMLEncryptionGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLEncryption >
{
diff --git a/xmlsecurity/source/gpg/XMLSecurityContext.hxx b/xmlsecurity/source/gpg/XMLSecurityContext.hxx
index 4355cc0ce67a..3ca399f2be2d 100644
--- a/xmlsecurity/source/gpg/XMLSecurityContext.hxx
+++ b/xmlsecurity/source/gpg/XMLSecurityContext.hxx
@@ -12,20 +12,16 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
-#include <com/sun/star/security/SecurityInfrastructureException.hpp>
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include <vector>
+namespace com::sun::star::xml::crypto { class XSecurityEnvironment; }
+
class XMLSecurityContextGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLSecurityContext,
css::lang::XServiceInfo>
{
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 0b197abc8efe..abbfd617c9f3 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -32,6 +32,7 @@
#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>
#include <comphelper/documentconstants.hxx>
#include <comphelper/ofopxmlhelper.hxx>
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index 65d691052348..8ca9f07f4d64 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/embed/StorageFormats.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/io/TempFile.hpp>
#include <com/sun/star/io/XTruncate.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
@@ -31,6 +32,8 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/packages/manifest/ManifestReader.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <comphelper/base64.hxx>
#include <comphelper/storagehelper.hxx>
diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index 1518b8b4e092..062c76d5c47b 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -15,6 +15,7 @@
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
#include <com/sun/star/beans/StringPair.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <comphelper/ofopxmlhelper.hxx>
#include <rtl/ref.hxx>
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index 457ef66bf24b..c22e8c2261bf 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -10,6 +10,7 @@
#include "ooxmlsecparser.hxx"
#include <xmlsignaturehelper.hxx>
+#include <xsecctl.hxx>
#include <sal/log.hxx>
using namespace com::sun::star;
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx
index b425e4c32a0f..d3c199147255 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.hxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx
@@ -10,14 +10,13 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_HELPER_OOXMLSECPARSER_HXX
#define INCLUDED_XMLSECURITY_SOURCE_HELPER_OOXMLSECPARSER_HXX
-#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <cppuhelper/implbase.hxx>
-#include <xsecctl.hxx>
+class XSecController;
+class XMLSignatureHelper;
/// Parses an OOXML digital signature.
class OOXMLSecParser: public cppu::WeakImplHelper
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 56d354572a41..f4ff8a156f47 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -36,6 +36,8 @@
#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/beans/StringPair.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/xml/sax/XParser.hpp>
#include <xmloff/attrlist.hxx>
#include <rtl/math.hxx>
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index 532ba07a0298..f87aec62f21d 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -19,6 +19,7 @@
#include "xsecparser.hxx"
+#include <xsecctl.hxx>
#include <xmlsignaturehelper.hxx>
#include <com/sun/star/xml/sax/SAXException.hpp>
#include <cppuhelper/exc_hlp.hxx>
diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx
index 42b63975ecb9..d9b079aa3116 100644
--- a/xmlsecurity/source/helper/xsecparser.hxx
+++ b/xmlsecurity/source/helper/xsecparser.hxx
@@ -20,15 +20,14 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_HELPER_XSECPARSER_HXX
#define INCLUDED_XMLSECURITY_SOURCE_HELPER_XSECPARSER_HXX
-#include <xsecctl.hxx>
-
-#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <cppuhelper/implbase.hxx>
+class XMLSignatureHelper;
+class XSecController;
+
class XSecParser: public cppu::WeakImplHelper
<
css::xml::sax::XDocumentHandler,
diff --git a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx
index 3dbcbd0c1eb3..11e9a04707d7 100644
--- a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx
+++ b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx
@@ -21,11 +21,7 @@
#define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_CERTIFICATEEXTENSION_XMLSECIMPL_HXX
#include <sal/config.h>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/uno/SecurityException.hpp>
#include <com/sun/star/security/XCertificateExtension.hpp>
#include "certificateextension_certextn.hxx"
diff --git a/xmlsecurity/source/xmlsec/errorcallback.cxx b/xmlsecurity/source/xmlsec/errorcallback.cxx
index 3cbe0ac1142e..c621c1bf715c 100644
--- a/xmlsecurity/source/xmlsec/errorcallback.cxx
+++ b/xmlsecurity/source/xmlsec/errorcallback.cxx
@@ -21,6 +21,7 @@
#include <xmlsec-wrapper.h>
+#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#ifdef _WIN32
diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
index c0465cfb8e3d..af114619e7f9 100644
--- a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
+++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx
@@ -25,6 +25,7 @@
#include <rtl/ref.hxx>
#include "ciphercontext.hxx"
+#include <pk11pub.h>
using namespace ::com::sun::star;
diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx b/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx
index a7a4e6dad54e..1d4a99c309c8 100644
--- a/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx
+++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx
@@ -24,7 +24,8 @@
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
-#include <pk11pub.h>
+#include <seccomon.h>
+#include <secmodt.h>
class OCipherContext : public cppu::WeakImplHelper< css::xml::crypto::XCipherContext >
{
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
index 28a4ffd2af1d..7e1b7ff50537 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
@@ -22,10 +22,11 @@
#include <com/sun/star/xml/crypto/XNSSInitializer.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <cppuhelper/implbase.hxx>
+namespace com::sun::star::uno { class XComponentContext; }
+
#define NSS_SERVICE_NAME "com.sun.star.xml.crypto.NSSInitializer"
class ONSSInitializer : public cppu::WeakImplHelper
diff --git a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx
index 95b4c357ceeb..857aa6cc42ff 100644
--- a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.hxx
@@ -21,12 +21,7 @@
#define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_SANEXTENSION_NSSIMPL_HXX
#include <sal/config.h>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/uno/SecurityException.hpp>
-#include <com/sun/star/security/XCertificateExtension.hpp>
#include <com/sun/star/security/XSanExtension.hpp>
#include <com/sun/star/security/CertAltNameEntry.hpp>
#include <certificateextension_certextn.hxx>
diff --git a/xmlsecurity/source/xmlsec/nss/secerror.hxx b/xmlsecurity/source/xmlsec/nss/secerror.hxx
index 8d4b0294efe8..9de7f5af7cdd 100644
--- a/xmlsecurity/source/xmlsec/nss/secerror.hxx
+++ b/xmlsecurity/source/xmlsec/nss/secerror.hxx
@@ -23,7 +23,7 @@
#include <sal/config.h>
#include <certt.h>
-#include <nspr.h>
+#include <prerror.h>
const char *
getCertError(PRErrorCode errNum);
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 3a1001b7447c..c64b69c2002e 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -41,18 +41,22 @@
#include <osl/thread.h>
#include <comphelper/sequence.hxx>
+#include "x509certificate_nssimpl.hxx"
#include "secerror.hxx"
#include <prerror.h>
+#include <keyhi.h>
// added for password exception
#include <com/sun/star/security/NoPasswordException.hpp>
+#include <com/sun/star/security/CertificateCharacters.hpp>
+#include <com/sun/star/security/CertificateValidity.hpp>
+
namespace csss = ::com::sun::star::security;
using namespace ::com::sun::star::security;
using namespace com::sun::star;
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ;
using ::com::sun::star::lang::XMultiServiceFactory ;
-using ::com::sun::star::lang::XSingleServiceFactory ;
using ::com::sun::star::xml::crypto::XSecurityEnvironment ;
using ::com::sun::star::security::XCertificate ;
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
index a273f0a8bb4c..058f990edb99 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
@@ -22,32 +22,26 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/xml/crypto/XCertificateCreator.hpp>
-#include <com/sun/star/security/XCertificate.hpp>
-#include <com/sun/star/security/CertificateCharacters.hpp>
-#include <com/sun/star/security/CertificateValidity.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include "x509certificate_nssimpl.hxx"
-
#include <osl/mutex.hxx>
-#include <pk11func.h>
-#include <keyhi.h>
-#include <certdb.h>
+#include <keythi.h>
+#include <certt.h>
#include <list>
#include <xmlsec-wrapper.h>
+namespace com { namespace sun { namespace star { namespace security { class XCertificate; } } } }
+class X509Certificate_NssImpl;
+
class SecurityEnvironment_NssImpl : public ::cppu::WeakImplHelper<
css::xml::crypto::XSecurityEnvironment,
css::xml::crypto::XCertificateCreator,
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
index 7eda9a259677..ec6742529306 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
@@ -20,15 +20,14 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_SEINITIALIZER_NSSIMPL_HXX
#define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_SEINITIALIZER_NSSIMPL_HXX
-#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
#include <com/sun/star/xml/crypto/XSEInitializer.hpp>
#include <cppuhelper/implbase.hxx>
-#include <libxml/tree.h>
-
#include "nssinitializer.hxx"
+namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+
class SEInitializer_NssImpl : public cppu::ImplInheritanceHelper
<
ONSSInitializer,
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index 180ef6558d38..6154f6548545 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -22,6 +22,7 @@
#include <nss.h>
#include <secder.h>
+#include <cert.h>
#include <hasht.h>
#include <secoid.h>
#include <pk11func.h>
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
index cae1f7238739..35cd393f2034 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
@@ -22,17 +22,15 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
-#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase.hxx>
-#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/uno/SecurityException.hpp>
#include <com/sun/star/security/CertificateKind.hpp>
#include <com/sun/star/security/XCertificate.hpp>
#include <certificate.hxx>
-#include <cert.h>
+#include <certt.h>
+#include <keythi.h>
class X509Certificate_NssImpl : public ::cppu::WeakImplHelper<
css::security::XCertificate ,
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index b894cd098330..ce01a0a40407 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -23,11 +23,10 @@
#include <cppuhelper/supportsservice.hxx>
#include "securityenvironment_nssimpl.hxx"
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang ;
-using ::com::sun::star::lang::XMultiServiceFactory ;
-using ::com::sun::star::lang::XSingleServiceFactory ;
using ::com::sun::star::xml::crypto::XSecurityEnvironment ;
using ::com::sun::star::xml::crypto::XXMLSecurityContext ;
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index a5d8739aa48b..1f5256d22383 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -29,13 +29,12 @@
#include <xmlsec-wrapper.h>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::lang ;
-using ::com::sun::star::lang::XMultiServiceFactory ;
-using ::com::sun::star::lang::XSingleServiceFactory ;
using ::com::sun::star::xml::wrapper::XXMLElementWrapper ;
using ::com::sun::star::xml::wrapper::XXMLDocumentWrapper ;
diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index 091773992324..bf3c39127c44 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -23,12 +23,14 @@
#include <xmlsec/saxhelper.hxx>
#include <libxml/parserInternals.h>
+#include <com/sun/star/xml/csax/XMLAttribute.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+
#ifndef XMLSEC_NO_XSLT
#include "libxslt/xslt.h"
#endif
namespace cssu = com::sun::star::uno;
-namespace cssxs = com::sun::star::xml::sax;
namespace cssxcsax = com::sun::star::xml::csax;
/**
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index de0cd43f3c8f..ba6f9f807dfe 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -21,6 +21,7 @@
#include <osl/diagnose.h>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/xml/crypto/sax/XSAXEventKeeper.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <xmlsec/xmldocumentwrapper_xmlsecimpl.hxx>
#include "xmlelementwrapper_xmlsecimpl.hxx"
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
index 27940e73c61b..35c584203b63 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
@@ -22,17 +22,12 @@
#include <com/sun/star/xml/wrapper/XXMLElementWrapper.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
#include <libxml/tree.h>
#include <xsecxmlsecdllapi.h>
-namespace com { namespace sun { namespace star { namespace uno {
- class XComponentContext;
-} } } }
-
class XSECXMLSEC_DLLPUBLIC XMLElementWrapper_XmlSecImpl : public cppu::WeakImplHelper
<
css::xml::wrapper::XXMLElementWrapper,
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index 5b1b0212073c..3c61084ad6ef 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -27,6 +27,8 @@
#include <rtl/uri.hxx>
#include <comphelper/scopeguard.hxx>
+#include <com/sun/star/xml/crypto/XUriBinding.hpp>
+
#include <libxml/uri.h>
#include <xmlsec-wrapper.h>