summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xmlsecurity/inc/xmlsignaturehelper.hxx1
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx7
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx5
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx4
4 files changed, 7 insertions, 10 deletions
diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx
index 2b2a82c413c8..d527942f50f2 100644
--- a/xmlsecurity/inc/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper.hxx
@@ -96,7 +96,6 @@ private:
rtl::Reference<XSecController> mpXSecController;
bool mbError;
bool mbODFPre1_2;
- bool mbHasGpgSignatures;
Link<LinkParamNone*,bool> maStartVerifySignatureHdl;
private:
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index e9b5ff749aa4..c7841a5d5614 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -51,7 +51,6 @@
#define NS_DOCUMENTSIGNATURES "http://openoffice.org/2004/documentsignatures"
#define NS_DOCUMENTSIGNATURES_ODF_1_2 "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0"
-#define NS_DOCUMENTSIGNATURES_LOEXT "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
#define OOXML_SIGNATURE_ORIGIN "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin"
#define OOXML_SIGNATURE_SIGNATURE "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature"
@@ -59,7 +58,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
XMLSignatureHelper::XMLSignatureHelper( const uno::Reference< uno::XComponentContext >& rxCtx)
- : mxCtx(rxCtx), mbODFPre1_2(false), mbHasGpgSignatures(false)
+ : mxCtx(rxCtx), mbODFPre1_2(false)
{
mpXSecController = new XSecController(rxCtx);
mbError = false;
@@ -129,7 +128,6 @@ void XMLSignatureHelper::SetGpgCertificate(sal_Int32 nSecurityId,
const OUString& ouGpgCert,
const OUString& ouGpgOwner)
{
- mbHasGpgSignatures = true;
mpXSecController->setGpgCertificate(
nSecurityId,
ouGpgCertDigest,
@@ -181,9 +179,6 @@ uno::Reference<xml::sax::XWriter> XMLSignatureHelper::CreateDocumentHandlerWithH
"xmlns",
sNamespace);
- if (mbHasGpgSignatures)
- pAttributeList->AddAttribute("xmlns:loext", NS_DOCUMENTSIGNATURES_LOEXT);
-
xSaxWriter->startDocument();
xSaxWriter->startElement(
"document-signatures",
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index abe8bd1760e1..e731951369c0 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -726,10 +726,13 @@ void XSecController::exportSignature(
// GPG or X509 key?
if (!signatureInfo.ouGpgCertificate.isEmpty())
{
+ pAttributeList = new SvXMLAttributeList();
+ pAttributeList->AddAttribute("xmlns:loext",
+ "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0");
/* Write PGPData element */
xDocumentHandler->startElement(
"PGPData",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ cssu::Reference< cssxs::XAttributeList > (pAttributeList));
{
/* Write keyid element */
xDocumentHandler->startElement(
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index 00054b4f3ef4..bcab9811faf7 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -194,7 +194,7 @@ void SAL_CALL XSecParser::startElement(
m_ouGpgCertificate.clear();
m_bInGpgCertificate = true;
}
- else if (aName == "PGPOwner")
+ else if (aName == "loext:PGPOwner")
{
m_ouGpgOwner.clear();
m_bInGpgOwner = true;
@@ -322,7 +322,7 @@ void SAL_CALL XSecParser::endElement( const OUString& aName )
m_pXSecController->setGpgCertificate( m_ouGpgCertificate );
m_bInGpgCertificate = false;
}
- else if (aName == "PGPOwner")
+ else if (aName == "loext:PGPOwner")
{
m_pXSecController->setGpgOwner( m_ouGpgOwner );
m_bInGpgOwner = false;