summaryrefslogtreecommitdiffstats
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-04 18:13:18 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-04 18:30:44 +0100
commit8865a3b092a4b34530d8ca67286aa3765181d235 (patch)
treebc2e1403b7bd226bcd86b0a023fd42941709d576 /xmlsecurity
parentxmlsecurity: don't write the stream of an OOXML storage (diff)
downloadcore-8865a3b092a4b34530d8ca67286aa3765181d235.tar.gz
core-8865a3b092a4b34530d8ca67286aa3765181d235.zip
sfx2: avoid writing META-INF/ when signing OOXML files
Instead just pass an empty stream, xmlsecurity knows how to look up its signature storage from the root one. With this, opening the digital signatures dialog, clicking on add, and then OK in both dialogs no longer results in an (empty) META-INF storage written to an OOXML file. Change-Id: I7e4a93687465ec19be307917ec00cde08ed8092f
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 6601bbe6ec5e..a5effe9f7abb 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -395,7 +395,7 @@ IMPL_LINK_NOARG_TYPED(DigitalSignaturesDialog, OKButtonHdl, Button*, void)
SignatureStreamHelper aStreamHelper = ImplOpenSignatureStream(
embed::ElementModes::WRITE|embed::ElementModes::TRUNCATE, false );
- if (aStreamHelper.xSignatureStream.is())
+ if (aStreamHelper.xSignatureStream.is() && aStreamHelper.nStorageFormat != embed::StorageFormats::OFOPXML)
{
// ODF
uno::Reference< io::XOutputStream > xOutputStream(