[Libreoffice-commits] core.git: Branch 'feature/cib_contract138c' - xmlsecurity/inc xmlsecurity/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Sat Apr 17 15:26:41 UTC 2021
Rebased ref, commits from common ancestor:
commit 404d7451d891d4d7d065e054e19efbb849153e82
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Fri Apr 16 22:49:37 2021 +0300
Commit: Vasily Melenchuk <vasily.melenchuk at cib.de>
CommitDate: Sat Apr 17 18:24:37 2021 +0300
xmlsecurity: downgrade to support gcc 4.8.2
* pre stdcxx17 compilers do not support nested namespaces
* std::make_unique is not supported (replaced by o3tl::make_unique)
* extra usage of #include <memory>: it did fail wihout it in some cases
* rewriting lambdas: they are working really bad in old versions
Change-Id: I2c99ababa16de76549c976c79c6a8ab7927ad200
diff --git a/xmlsecurity/inc/certificatechooser.hxx b/xmlsecurity/inc/certificatechooser.hxx
index 7eec11407250..e0c9035ce902 100644
--- a/xmlsecurity/inc/certificatechooser.hxx
+++ b/xmlsecurity/inc/certificatechooser.hxx
@@ -41,7 +41,7 @@ namespace xml { namespace crypto {
class XSecurityEnvironment; }}
}}}
-namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLSecurityContext; } } } } }
struct UserData
{
diff --git a/xmlsecurity/inc/documentsignaturehelper.hxx b/xmlsecurity/inc/documentsignaturehelper.hxx
index ccf71edd9c62..faf7b95601b3 100644
--- a/xmlsecurity/inc/documentsignaturehelper.hxx
+++ b/xmlsecurity/inc/documentsignaturehelper.hxx
@@ -35,7 +35,7 @@ namespace embed {
class XStorage; }
}}}
-namespace com::sun::star::xml::sax { class XDocumentHandler; }
+namespace com { namespace sun { namespace star { namespace xml { namespace sax { class XDocumentHandler; }}}}}
enum class DocumentSignatureMode
{
diff --git a/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx b/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
index 04994cca63a5..197aa03c92ac 100644
--- a/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
+++ b/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
@@ -36,9 +36,9 @@ 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; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { namespace sax { class XSAXEventKeeperStatusChangeListener; }}}}}}
+namespace com { namespace sun { namespace star { namespace xml { namespace csax { class XCompressedDocumentHandler; }}}}}
+namespace com { namespace sun { namespace star { namespace xml { namespace wrapper { class XXMLDocumentWrapper; }}}}}
class XMLSECURITY_DLLPUBLIC SAXEventKeeperImpl : public cppu::WeakImplHelper
<
diff --git a/xmlsecurity/inc/framework/signaturecreatorimpl.hxx b/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
index fe7fb5669d0e..faba92b586c0 100644
--- a/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
+++ b/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
@@ -28,8 +28,8 @@
#include <framework/signatureengine.hxx>
-namespace com::sun::star::xml::crypto { class XSecurityEnvironment; }
-namespace com::sun::star::xml::crypto::sax { class XSignatureCreationResultListener;}
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XSecurityEnvironment; }}}}}
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { namespace sax { class XSignatureCreationResultListener; }}}}}}
typedef cppu::ImplInheritanceHelper
<
diff --git a/xmlsecurity/inc/framework/signatureengine.hxx b/xmlsecurity/inc/framework/signatureengine.hxx
index 56fc057ebf39..a1b85e0dcd50 100644
--- a/xmlsecurity/inc/framework/signatureengine.hxx
+++ b/xmlsecurity/inc/framework/signatureengine.hxx
@@ -33,8 +33,8 @@
#include <vector>
-namespace com::sun::star::io { class XInputStream; }
-namespace com::sun::star::xml::crypto { class XXMLSignature; }
+namespace com { namespace sun { namespace star { namespace io { class XInputStream; }}}}
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLSignature; }}}}}
namespace rtl { template <class reference_type> class Reference; }
class XMLSignatureTemplateImpl;
diff --git a/xmlsecurity/inc/framework/signatureverifierimpl.hxx b/xmlsecurity/inc/framework/signatureverifierimpl.hxx
index 7b022afd1f0c..3ab934713c74 100644
--- a/xmlsecurity/inc/framework/signatureverifierimpl.hxx
+++ b/xmlsecurity/inc/framework/signatureverifierimpl.hxx
@@ -28,8 +28,8 @@
#include <xmlsecuritydllapi.h>
#include <framework/signatureengine.hxx>
-namespace com::sun::star::xml::crypto::sax { class XSignatureVerifyResultListener; }
-namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { namespace sax { class XSignatureVerifyResultListener; } } } } }}
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLSecurityContext; } } } } }
typedef cppu::ImplInheritanceHelper
<
diff --git a/xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx b/xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx
index 4be61d5fe562..9464e49297ab 100644
--- a/xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx
+++ b/xmlsecurity/inc/framework/xmlsignaturetemplateimpl.hxx
@@ -31,8 +31,8 @@
#include <vector>
-namespace com::sun::star::lang { class XMultiServiceFactory; }
-namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; }}}}
+namespace com { namespace sun { namespace star { namespace xml { namespace wrapper { class XXMLElementWrapper; }}}}}
class XMLSignatureTemplateImpl : public ::cppu::WeakImplHelper<
css::xml::crypto::XXMLSignatureTemplate ,
diff --git a/xmlsecurity/inc/gpg/SEInitializer.hxx b/xmlsecurity/inc/gpg/SEInitializer.hxx
index db00a3a0a03a..1af17d1af765 100644
--- a/xmlsecurity/inc/gpg/SEInitializer.hxx
+++ b/xmlsecurity/inc/gpg/SEInitializer.hxx
@@ -18,7 +18,7 @@
#include <xsecgpgdllapi.h>
#include <cppuhelper/implbase.hxx>
-namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLSecurityContext; } } } } }
class XSECGPG_DLLPUBLIC SEInitializerGpg : public cppu::WeakImplHelper
<
diff --git a/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx b/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx
index 0052c3ec7de7..361736964e01 100644
--- a/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx
+++ b/xmlsecurity/inc/gpg/xmlsignature_gpgimpl.hxx
@@ -31,10 +31,10 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
-namespace com::sun::star::xml::crypto { class XXMLSignatureTemplate; }
-namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
-namespace com::sun::star::lang { class XMultiServiceFactory; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLSignatureTemplate; } } } } }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLSecurityContext; } } } } }
+namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
class XSECGPG_DLLPUBLIC XMLSignature_GpgImpl : public ::cppu::WeakImplHelper<
css::xml::crypto::XXMLSignature ,
diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx
index e1eed377d6fa..d9a4a917bc00 100644
--- a/xmlsecurity/inc/xmlsec/saxhelper.hxx
+++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx
@@ -24,8 +24,8 @@
#include <rtl/ustring.hxx>
-namespace com::sun::star::xml::csax { struct XMLAttribute; }
-namespace com::sun::star::uno { template <typename > class Sequence; }
+namespace com { namespace sun { namespace star { namespace xml { namespace csax { struct XMLAttribute; }}}}}
+namespace com { namespace sun { namespace star { namespace 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/xmlstreamio.hxx b/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
index ee9e40e54ce6..ca89ba892553 100644
--- a/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
+++ b/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
@@ -22,8 +22,8 @@
#include <xsecxmlsecdllapi.h>
-namespace com::sun::star::xml::crypto { class XUriBinding; }
-namespace com::sun::star::uno { template <typename > class Reference; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XUriBinding; }}}}}
+namespace com { namespace sun { namespace star { namespace uno { template <typename > class Reference; }}}}
XSECXMLSEC_DLLPUBLIC int xmlEnableStreamInputCallbacks() ;
XSECXMLSEC_DLLPUBLIC void xmlDisableStreamInputCallbacks() ;
diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
index 4d00cc83c4a1..18b04d6f19f5 100644
--- a/xmlsecurity/inc/xsecctl.hxx
+++ b/xmlsecurity/inc/xsecctl.hxx
@@ -33,16 +33,22 @@
#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; }
-
+namespace com {
+namespace sun {
+namespace star {
+namespace embed { class XStorage; }
+namespace graphic { class XGraphic; }
+namespace io { class XInputStream; }
+namespace lang { class XInitialization; }
+namespace uno { class XComponentContext; }
+namespace xml {
+namespace crypto {
+ class XXMLSecurityContext;
+ class XXMLSignature;
+ namespace sax { class XReferenceResolvedListener; }
+}
+namespace 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#"
diff --git a/xmlsecurity/source/component/certificatecontainer.cxx b/xmlsecurity/source/component/certificatecontainer.cxx
index 5c9318ce07a3..04a7f341cb85 100644
--- a/xmlsecurity/source/component/certificatecontainer.cxx
+++ b/xmlsecurity/source/component/certificatecontainer.cxx
@@ -28,7 +28,7 @@
#include <sal/config.h>
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
diff --git a/xmlsecurity/source/framework/buffernode.hxx b/xmlsecurity/source/framework/buffernode.hxx
index 1b8e6f8574e9..50970dbf9e8e 100644
--- a/xmlsecurity/source/framework/buffernode.hxx
+++ b/xmlsecurity/source/framework/buffernode.hxx
@@ -25,7 +25,7 @@
#include <memory>
#include <vector>
-namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+namespace com { namespace sun { namespace star { namespace xml { namespace wrapper { class XXMLElementWrapper; } } } } }
class ElementMark;
class ElementCollector;
diff --git a/xmlsecurity/source/framework/elementcollector.hxx b/xmlsecurity/source/framework/elementcollector.hxx
index 8af12f246b60..4a61fde78322 100644
--- a/xmlsecurity/source/framework/elementcollector.hxx
+++ b/xmlsecurity/source/framework/elementcollector.hxx
@@ -24,7 +24,7 @@
#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; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { namespace sax { class XReferenceResolvedListener; }}}}}}
class ElementCollector : public ElementMark
/****** elementcollector.hxx/CLASS ElementCollector ***************************
diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
index 95e17b646cb0..257abf218df0 100644
--- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx
+++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
@@ -25,7 +25,7 @@
#include <osl/diagnose.h>
#include <rtl/ref.hxx>
-namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+namespace com { namespace sun { namespace star { namespace xml { namespace wraper { class XXMLElementWrapper; } } } } }
using namespace com::sun::star::uno;
namespace cssu = com::sun::star::uno;
diff --git a/xmlsecurity/source/framework/signatureengine.cxx b/xmlsecurity/source/framework/signatureengine.cxx
index 3e74a7b25452..dd729c47345f 100644
--- a/xmlsecurity/source/framework/signatureengine.cxx
+++ b/xmlsecurity/source/framework/signatureengine.cxx
@@ -22,7 +22,7 @@
#include <framework/xmlsignaturetemplateimpl.hxx>
#include <rtl/ref.hxx>
-namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+namespace com { namespace sun { namespace star { namespace xml { namespace wraper { class XXMLElementWrapper; } } } } }
using namespace com::sun::star::uno;
namespace cssu = com::sun::star::uno;
diff --git a/xmlsecurity/source/gpg/SEInitializer.cxx b/xmlsecurity/source/gpg/SEInitializer.cxx
index f11ad59d8ba1..96ab97321b4e 100644
--- a/xmlsecurity/source/gpg/SEInitializer.cxx
+++ b/xmlsecurity/source/gpg/SEInitializer.cxx
@@ -14,7 +14,7 @@
#include <global.h>
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
using namespace css;
using namespace css::lang;
diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.hxx b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
index a8aacfa5a10b..7d392cda53ea 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.hxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
@@ -10,6 +10,7 @@
#ifndef INCLUDED_XMLSECURITY_SOURCE_GPG_SECURITYENVIRONMENT_HXX
#define INCLUDED_XMLSECURITY_SOURCE_GPG_SECURITYENVIRONMENT_HXX
+#include <memory>
#include <sal/config.h>
#include <rtl/ustring.hxx>
#include <cppuhelper/implbase.hxx>
@@ -18,7 +19,7 @@
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-namespace com::sun::star::security { class XCertificate; }
+namespace com { namespace sun { namespace star { namespace security { class XCertificate; }}}}
namespace GpgME { class Context; }
class SecurityEnvironmentGpg : public cppu::WeakImplHelper< css::xml::crypto::XSecurityEnvironment,
diff --git a/xmlsecurity/source/gpg/XMLEncryption.hxx b/xmlsecurity/source/gpg/XMLEncryption.hxx
index 168128b40a9c..b25b26640667 100644
--- a/xmlsecurity/source/gpg/XMLEncryption.hxx
+++ b/xmlsecurity/source/gpg/XMLEncryption.hxx
@@ -16,8 +16,8 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/xml/crypto/XXMLEncryption.hpp>
-namespace com::sun::star::xml::crypto { class XXMLEncryptionTemplate; }
-namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLEncryptionTemplate; }}}}}
+namespace com { namespace sun { namespace star { namespace xml { namespace 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 3ca399f2be2d..ea383050b61b 100644
--- a/xmlsecurity/source/gpg/XMLSecurityContext.hxx
+++ b/xmlsecurity/source/gpg/XMLSecurityContext.hxx
@@ -20,7 +20,7 @@
#include <vector>
-namespace com::sun::star::xml::crypto { class XSecurityEnvironment; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XSecurityEnvironment; }}}}}
class XMLSecurityContextGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLSecurityContext,
css::lang::XServiceInfo>
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index 42f226f57d14..540e1f9802c1 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -15,6 +15,7 @@
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlimp.hxx>
+#include <o3tl/make_unique.hxx>
#include <com/sun/star/xml/sax/SAXException.hpp>
#include <sal/log.hxx>
@@ -84,7 +85,7 @@ auto OOXMLSecParser::Context::CreateChildContext(
-> std::unique_ptr<Context>
{
// default: create new base context
- return std::make_unique<UnknownContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<UnknownContext>(m_rParser, std::move(pOldNamespaceMap));
}
/**
@@ -209,11 +210,11 @@ class OOXMLSecParser::DsX509IssuerSerialContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerName")
{
- return std::make_unique<DsX509IssuerNameContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509IssuerName);
+ return o3tl::make_unique<DsX509IssuerNameContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509IssuerName);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "X509SerialNumber")
{
- return std::make_unique<DsX509SerialNumberContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509SerialNumber);
+ return o3tl::make_unique<DsX509SerialNumberContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509SerialNumber);
}
// missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -249,12 +250,12 @@ class OOXMLSecParser::DsX509DataContext
if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerSerial")
{
m_X509IssuerSerials.emplace_back();
- return std::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerSerials.back().first, m_X509IssuerSerials.back().second);
+ return o3tl::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerSerials.back().first, m_X509IssuerSerials.back().second);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "X509Certificate")
{
m_X509Certificates.emplace_back();
- return std::make_unique<DsX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_X509Certificates.back());
+ return o3tl::make_unique<DsX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_X509Certificates.back());
}
// missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -283,7 +284,7 @@ class OOXMLSecParser::DsKeyInfoContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "X509Data")
{
- return std::make_unique<DsX509DataContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsX509DataContext>(m_rParser, std::move(pOldNamespaceMap));
}
// missing: ds:PGPData
// missing: ds:KeyName, ds:KeyValue, ds:RetrievalMethod, ds:SPKIData, ds:MgmtData
@@ -438,7 +439,7 @@ class OOXMLSecParser::DsTransformsContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "Transform")
{
- return std::make_unique<DsTransformContext>(m_rParser, std::move(pOldNamespaceMap), m_rIsC14N);
+ return o3tl::make_unique<DsTransformContext>(m_rParser, std::move(pOldNamespaceMap), m_rIsC14N);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -507,15 +508,15 @@ class OOXMLSecParser::DsReferenceContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "Transforms")
{
- return std::make_unique<DsTransformsContext>(m_rParser, std::move(pOldNamespaceMap), m_IsC14N);
+ return o3tl::make_unique<DsTransformsContext>(m_rParser, std::move(pOldNamespaceMap), m_IsC14N);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod")
{
- return std::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID);
+ return o3tl::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue")
{
- return std::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_DigestValue);
+ return o3tl::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_DigestValue);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -570,11 +571,11 @@ class OOXMLSecParser::DsSignedInfoContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureMethod")
{
- return std::make_unique<DsSignatureMethodContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsSignatureMethodContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "Reference")
{
- return std::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
}
// missing: ds:CanonicalizationMethod
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -604,11 +605,11 @@ class OOXMLSecParser::XadesCertDigestContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod")
{
- return std::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_rReferenceDigestID);
+ return o3tl::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_rReferenceDigestID);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue")
{
- return std::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rDigestValue);
+ return o3tl::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rDigestValue);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -649,11 +650,11 @@ class OOXMLSecParser::XadesCertContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertDigest")
{
- return std::make_unique<XadesCertDigestContext>(m_rParser, std::move(pOldNamespaceMap), m_CertDigest, m_nReferenceDigestID);
+ return o3tl::make_unique<XadesCertDigestContext>(m_rParser, std::move(pOldNamespaceMap), m_CertDigest, m_nReferenceDigestID);
}
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "IssuerSerial")
{
- return std::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerName, m_X509SerialNumber);
+ return o3tl::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerName, m_X509SerialNumber);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -676,7 +677,7 @@ class OOXMLSecParser::XadesSigningCertificateContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "Cert")
{
- return std::make_unique<XadesCertContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesCertContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -737,11 +738,11 @@ class OOXMLSecParser::XadesSignedSignaturePropertiesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningTime")
{
- return std::make_unique<XadesSigningTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesSigningTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningCertificate")
{
- return std::make_unique<XadesSigningCertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesSigningCertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
// missing: xades:SignaturePolicyIdentifier, xades:SignatureProductionPlace, xades:SignerRole
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -771,7 +772,7 @@ class OOXMLSecParser::XadesSignedPropertiesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedSignatureProperties")
{
- return std::make_unique<XadesSignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesSignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
// missing: xades:SignedDataObjectProperties
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -801,7 +802,7 @@ class OOXMLSecParser::XadesQualifyingPropertiesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedProperties")
{
- return std::make_unique<XadesSignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesSignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
// missing: xades:UnsignedSignatureProperties
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -877,11 +878,11 @@ class OOXMLSecParser::MsodigsigSignatureInfoV1Context
{
if (nNamespace == XML_NAMESPACE_MSODIGSIG && rName == "SetupID")
{
- return std::make_unique<MsodigsigSetupIDContext>(m_rParser, std::move(pOldNamespaceMap), m_SetupID);
+ return o3tl::make_unique<MsodigsigSetupIDContext>(m_rParser, std::move(pOldNamespaceMap), m_SetupID);
}
if (nNamespace == XML_NAMESPACE_MSODIGSIG && rName == "SignatureComments")
{
- return std::make_unique<MsodigsigSignatureCommentsContext>(m_rParser, std::move(pOldNamespaceMap), m_SignatureComments);
+ return o3tl::make_unique<MsodigsigSignatureCommentsContext>(m_rParser, std::move(pOldNamespaceMap), m_SignatureComments);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -949,7 +950,7 @@ class OOXMLSecParser::MdssiSignatureTimeContext
{
if (nNamespace == XML_NAMESPACE_MDSSI && rName == "Value")
{
- return std::make_unique<MdssiValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rValue);
+ return o3tl::make_unique<MdssiValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rValue);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1008,11 +1009,11 @@ class OOXMLSecParser::DsSignaturePropertyContext
if (nNamespace == XML_NAMESPACE_MDSSI && rName == "SignatureTime")
{
m_Property = SignatureProperty::Date;
- return std::make_unique<MdssiSignatureTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
+ return o3tl::make_unique<MdssiSignatureTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
}
if (nNamespace == XML_NAMESPACE_MSODIGSIG && rName == "SignatureInfoV1")
{
- return std::make_unique<MsodigsigSignatureInfoV1Context>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<MsodigsigSignatureInfoV1Context>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1041,7 +1042,7 @@ class OOXMLSecParser::DsSignaturePropertiesContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperty")
{
- return std::make_unique<DsSignaturePropertyContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<DsSignaturePropertyContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1078,7 +1079,7 @@ class OOXMLSecParser::DsManifestContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "Reference")
{
- return std::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
}
// missing: ds:CanonicalizationMethod
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -1154,15 +1155,15 @@ class OOXMLSecParser::DsObjectContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperties")
{
- return std::make_unique<DsSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<DsSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "QualifyingProperties")
{
- return std::make_unique<XadesQualifyingPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesQualifyingPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "Manifest")
{
- return std::make_unique<DsManifestContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<DsManifestContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1196,19 +1197,19 @@ class OOXMLSecParser::DsSignatureContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "SignedInfo")
{
- return std::make_unique<DsSignedInfoContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsSignedInfoContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureValue")
{
- return std::make_unique<DsSignatureValueContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsSignatureValueContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "KeyInfo")
{
- return std::make_unique<DsKeyInfoContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsKeyInfoContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "Object")
{
- return std::make_unique<DsObjectContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsObjectContext>(m_rParser, std::move(pOldNamespaceMap));
}
return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx
index 540028b22fc9..1d2d3d3da35c 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.hxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx
@@ -18,6 +18,7 @@
#include <xmloff/nmspmap.hxx>
#include <stack>
+#include <memory>
class XSecController;
class XMLSignatureHelper;
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index f2e00fca99c9..64132290f160 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -25,6 +25,7 @@
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlimp.hxx>
+#include <o3tl/make_unique.hxx>
#include <com/sun/star/xml/sax/SAXException.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include <sal/log.hxx>
@@ -92,7 +93,7 @@ auto XSecParser::Context::CreateChildContext(
-> std::unique_ptr<Context>
{
// default: create new base context
- return std::make_unique<UnknownContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<UnknownContext>(m_rParser, std::move(pOldNamespaceMap));
}
/**
@@ -225,15 +226,15 @@ class XSecParser::DsPGPDataContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "PGPKeyID")
{
- return std::make_unique<DsPGPKeyIDContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsPGPKeyIDContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "PGPKeyPacket")
{
- return std::make_unique<DsPGPKeyPacketContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsPGPKeyPacketContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "PGPOwner")
{
- return std::make_unique<LoPGPOwnerContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<LoPGPOwnerContext>(m_rParser, std::move(pOldNamespaceMap));
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -325,11 +326,11 @@ class XSecParser::DsX509IssuerSerialContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerName")
{
- return std::make_unique<DsX509IssuerNameContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509IssuerName);
+ return o3tl::make_unique<DsX509IssuerNameContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509IssuerName);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "X509SerialNumber")
{
- return std::make_unique<DsX509SerialNumberContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509SerialNumber);
+ return o3tl::make_unique<DsX509SerialNumberContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509SerialNumber);
}
// missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -365,12 +366,12 @@ class XSecParser::DsX509DataContext
if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerSerial")
{
m_X509IssuerSerials.emplace_back();
- return std::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerSerials.back().first, m_X509IssuerSerials.back().second);
+ return o3tl::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerSerials.back().first, m_X509IssuerSerials.back().second);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "X509Certificate")
{
m_X509Certificates.emplace_back();
- return std::make_unique<DsX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_X509Certificates.back());
+ return o3tl::make_unique<DsX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_X509Certificates.back());
}
// missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -399,11 +400,11 @@ class XSecParser::DsKeyInfoContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "X509Data")
{
- return std::make_unique<DsX509DataContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsX509DataContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "PGPData")
{
- return std::make_unique<DsPGPDataContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsPGPDataContext>(m_rParser, std::move(pOldNamespaceMap));
}
// missing: ds:KeyName, ds:KeyValue, ds:RetrievalMethod, ds:SPKIData, ds:MgmtData
// (old code would read ds:Transform inside ds:RetrievalMethod but
@@ -560,7 +561,7 @@ class XSecParser::DsTransformsContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "Transform")
{
- return std::make_unique<DsTransformContext>(m_rParser, std::move(pOldNamespaceMap), m_rIsC14N);
+ return o3tl::make_unique<DsTransformContext>(m_rParser, std::move(pOldNamespaceMap), m_rIsC14N);
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -629,15 +630,15 @@ class XSecParser::DsReferenceContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "Transforms")
{
- return std::make_unique<DsTransformsContext>(m_rParser, std::move(pOldNamespaceMap), m_IsC14N);
+ return o3tl::make_unique<DsTransformsContext>(m_rParser, std::move(pOldNamespaceMap), m_IsC14N);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod")
{
- return std::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID);
+ return o3tl::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue")
{
- return std::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_DigestValue);
+ return o3tl::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_DigestValue);
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -692,11 +693,11 @@ class XSecParser::DsSignedInfoContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureMethod")
{
- return std::make_unique<DsSignatureMethodContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsSignatureMethodContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "Reference")
{
- return std::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
}
// missing: ds:CanonicalizationMethod
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -755,7 +756,7 @@ class XSecParser::XadesCertificateValuesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "EncapsulatedX509Certificate")
{
- return std::make_unique<XadesEncapsulatedX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<XadesEncapsulatedX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap));
}
// missing: xades:OtherCertificate
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -784,7 +785,7 @@ class XSecParser::XadesUnsignedSignaturePropertiesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertificateValues")
{
- return std::make_unique<XadesCertificateValuesContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<XadesCertificateValuesContext>(m_rParser, std::move(pOldNamespaceMap));
}
// missing:
// xades:CounterSignature
@@ -827,7 +828,7 @@ class XSecParser::XadesUnsignedPropertiesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "UnsignedSignatureProperties")
{
- return std::make_unique<XadesUnsignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<XadesUnsignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap));
}
// missing: xades:UnsignedDataObjectProperties
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -947,15 +948,15 @@ class XSecParser::LoSignatureLineContext
{
if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineId")
{
- return std::make_unique<LoSignatureLineIdContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<LoSignatureLineIdContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineValidImage")
{
- return std::make_unique<LoSignatureLineValidImageContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<LoSignatureLineValidImageContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineInvalidImage")
{
- return std::make_unique<LoSignatureLineInvalidImageContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<LoSignatureLineInvalidImageContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -984,11 +985,11 @@ class XSecParser::XadesCertDigestContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod")
{
- return std::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_rReferenceDigestID);
+ return o3tl::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_rReferenceDigestID);
}
if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue")
{
- return std::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rDigestValue);
+ return o3tl::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rDigestValue);
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1029,11 +1030,11 @@ class XSecParser::XadesCertContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertDigest")
{
- return std::make_unique<XadesCertDigestContext>(m_rParser, std::move(pOldNamespaceMap), m_CertDigest, m_nReferenceDigestID);
+ return o3tl::make_unique<XadesCertDigestContext>(m_rParser, std::move(pOldNamespaceMap), m_CertDigest, m_nReferenceDigestID);
}
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "IssuerSerial")
{
- return std::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerName, m_X509SerialNumber);
+ return o3tl::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerName, m_X509SerialNumber);
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1056,7 +1057,7 @@ class XSecParser::XadesSigningCertificateContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "Cert")
{
- return std::make_unique<XadesCertContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesCertContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1117,15 +1118,15 @@ class XSecParser::XadesSignedSignaturePropertiesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningTime")
{
- return std::make_unique<XadesSigningTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesSigningTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningCertificate")
{
- return std::make_unique<XadesSigningCertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesSigningCertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLine")
{
- return std::make_unique<LoSignatureLineContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<LoSignatureLineContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
// missing: xades:SignaturePolicyIdentifier, xades:SignatureProductionPlace, xades:SignerRole
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -1155,7 +1156,7 @@ class XSecParser::XadesSignedPropertiesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedSignatureProperties")
{
- return std::make_unique<XadesSignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesSignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
// missing: xades:SignedDataObjectProperties
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -1185,11 +1186,11 @@ class XSecParser::XadesQualifyingPropertiesContext
{
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedProperties")
{
- return std::make_unique<XadesSignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesSignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "UnsignedProperties")
{
- return std::make_unique<XadesUnsignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<XadesUnsignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap));
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1290,12 +1291,12 @@ class XSecParser::DsSignaturePropertyContext
if (nNamespace == XML_NAMESPACE_DC && rName == "date")
{
m_Property = SignatureProperty::Date;
- return std::make_unique<DcDateContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
+ return o3tl::make_unique<DcDateContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
}
if (nNamespace == XML_NAMESPACE_DC && rName == "description")
{
m_Property = SignatureProperty::Description;
- return std::make_unique<DcDescriptionContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
+ return o3tl::make_unique<DcDescriptionContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1324,7 +1325,7 @@ class XSecParser::DsSignaturePropertiesContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperty")
{
- return std::make_unique<DsSignaturePropertyContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<DsSignaturePropertyContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1353,11 +1354,11 @@ class XSecParser::DsObjectContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperties")
{
- return std::make_unique<DsSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<DsSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
if (nNamespace == XML_NAMESPACE_XADES132 && rName == "QualifyingProperties")
{
- return std::make_unique<XadesQualifyingPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ return o3tl::make_unique<XadesQualifyingPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
}
// missing: ds:Manifest
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
@@ -1392,19 +1393,19 @@ class XSecParser::DsSignatureContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "SignedInfo")
{
- return std::make_unique<DsSignedInfoContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsSignedInfoContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureValue")
{
- return std::make_unique<DsSignatureValueContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsSignatureValueContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "KeyInfo")
{
- return std::make_unique<DsKeyInfoContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsKeyInfoContext>(m_rParser, std::move(pOldNamespaceMap));
}
if (nNamespace == XML_NAMESPACE_DS && rName == "Object")
{
- return std::make_unique<DsObjectContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsObjectContext>(m_rParser, std::move(pOldNamespaceMap));
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
@@ -1426,7 +1427,7 @@ class XSecParser::DsigSignaturesContext
{
if (nNamespace == XML_NAMESPACE_DS && rName == "Signature")
{
- return std::make_unique<DsSignatureContext>(m_rParser, std::move(pOldNamespaceMap));
+ return o3tl::make_unique<DsSignatureContext>(m_rParser, std::move(pOldNamespaceMap));
}
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx
index ff75daf3ce1d..c62b980a8b46 100644
--- a/xmlsecurity/source/helper/xsecparser.hxx
+++ b/xmlsecurity/source/helper/xsecparser.hxx
@@ -25,6 +25,7 @@
#include <cppuhelper/implbase.hxx>
#include <xmloff/nmspmap.hxx>
#include <stack>
+#include <memory>
class XMLSignatureHelper;
class XSecController;
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index fd33a320d9bd..39f9583894cd 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -28,7 +28,7 @@
#include <framework/signaturecreatorimpl.hxx>
#include <framework/saxeventkeeperimpl.hxx>
-namespace com::sun::star::graphic { class XGraphic; }
+namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; }}}}
using namespace css;
using namespace css::uno;
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index d8dedeb52d8c..12ec85fe13b2 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -42,7 +42,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/seqstream.hxx>
-namespace com::sun::star::graphic { class XGraphic; }
+namespace com { namespace sun { namespace star { namespace graphic { class XGraphic; }}}}
using namespace css;
using namespace css::uno;
@@ -269,16 +269,15 @@ void XSecController::setX509Data(
}
OUString const issuerName(xCert->getIssuerName());
OUString const serialNumber(xmlsecurity::bigIntegerToNumericString(xCert->getSerialNumber()));
- auto const iter = std::find_if(rX509IssuerSerials.begin(), rX509IssuerSerials.end(),
- [&](auto const& rX509IssuerSerial) {
- return xmlsecurity::EqualDistinguishedNames(issuerName, rX509IssuerSerial.first)
- && serialNumber == rX509IssuerSerial.second;
- });
- if (iter != rX509IssuerSerials.end())
+ for (auto iter = rX509IssuerSerials.begin(); iter != rX509IssuerSerials.end(); ++iter)
{
- data.back().X509IssuerName = iter->first;
- data.back().X509SerialNumber = iter->second;
- rX509IssuerSerials.erase(iter);
+ if (xmlsecurity::EqualDistinguishedNames(issuerName, iter->first)
+ && serialNumber == iter->second)
+ {
+ data.back().X509IssuerName = iter->first;
+ data.back().X509SerialNumber = iter->second;
+ rX509IssuerSerials.erase(iter);
+ }
}
}
catch (uno::Exception const&)
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
index 7e1b7ff50537..d1a69a40bd5f 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
@@ -25,7 +25,7 @@
#include <cppuhelper/implbase.hxx>
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
#define NSS_SERVICE_NAME "com.sun.star.xml.crypto.NSSInitializer"
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
index ec6742529306..c53656ba7836 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.hxx
@@ -26,7 +26,7 @@
#include "nssinitializer.hxx"
-namespace com::sun::star::xml::crypto { class XXMLSecurityContext; }
+namespace com { namespace sun { namespace star { namespace xml { namespace crypto { class XXMLSecurityContext; } } } } }
class SEInitializer_NssImpl : public cppu::ImplInheritanceHelper
<
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index 1ed575e92300..bf11783b0057 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com { namespace sun { namespace star { namespace 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 18c7c1e5c4ff..e50daa47e868 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -32,7 +32,7 @@
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
#include <memory>
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; }}}}
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno ;
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
index 60b9714256b7..4d06bf687019 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
@@ -23,7 +23,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; }}}}
using namespace com::sun::star;
More information about the Libreoffice-commits
mailing list