diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-09-18 09:59:08 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-09-19 07:55:17 +0200 |
commit | c3de0478fbcbe1dc22ab5dea42b423bb8e45fcba (patch) | |
tree | b5e4d4c6ff9457e1046cbfccf21774e87524c727 /xmlsecurity/source/helper/documentsignaturehelper.cxx | |
parent | 02ae1077f118dc9d287913d99528de58f69852ce (diff) |
tdf#118567 Signature Line: Fix ooxml signing
Change-Id: Ie2467db7ab209f10e92b6db1f5680e7a9be614ab
Reviewed-on: https://gerrit.libreoffice.org/60676
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmlsecurity/source/helper/documentsignaturehelper.cxx')
-rw-r--r-- | xmlsecurity/source/helper/documentsignaturehelper.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx index dc97143f0029..dc00cc18e626 100644 --- a/xmlsecurity/source/helper/documentsignaturehelper.cxx +++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx @@ -515,7 +515,7 @@ void DocumentSignatureHelper::writeDigestMethod( void DocumentSignatureHelper::writeSignedProperties( const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler, const SignatureInformation& signatureInfo, - const OUString& sDate) + const OUString& sDate, const bool bWriteSignatureLineData) { { rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); @@ -554,8 +554,8 @@ void DocumentSignatureHelper::writeSignedProperties( xDocumentHandler->endElement("xd:SignaturePolicyImplied"); xDocumentHandler->endElement("xd:SignaturePolicyIdentifier"); - if (!signatureInfo.ouSignatureLineId.isEmpty() && signatureInfo.aValidSignatureImage.is() - && signatureInfo.aInvalidSignatureImage.is()) + if (bWriteSignatureLineData && !signatureInfo.ouSignatureLineId.isEmpty() + && signatureInfo.aValidSignatureImage.is() && signatureInfo.aInvalidSignatureImage.is()) { rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList()); pAttributeList->AddAttribute( @@ -574,7 +574,7 @@ void DocumentSignatureHelper::writeSignedProperties( } { - // Write SignatureLineId element + // Write SignatureLineValidImage element xDocumentHandler->startElement( "loext:SignatureLineValidImage", Reference<XAttributeList>(new SvXMLAttributeList())); @@ -589,7 +589,7 @@ void DocumentSignatureHelper::writeSignedProperties( } { - // Write SignatureLineId element + // Write SignatureLineInvalidImage element xDocumentHandler->startElement( "loext:SignatureLineInvalidImage", Reference<XAttributeList>(new SvXMLAttributeList())); |