Kaydet (Commit) a83888e7 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt Kaydeden (comit) Thorsten Behrens

Fix warning for loext namespace

Define the namespace near the element that's using it

Change-Id: If0a135a331d4f67ef2dfe4981e93110e7a1a787a
Reviewed-on: https://gerrit.libreoffice.org/40084Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 72b48cb9
......@@ -96,7 +96,6 @@ private:
rtl::Reference<XSecController> mpXSecController;
bool mbError;
bool mbODFPre1_2;
bool mbHasGpgSignatures;
Link<LinkParamNone*,bool> maStartVerifySignatureHdl;
private:
......
......@@ -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",
......
......@@ -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(
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment