summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-10 17:34:21 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-07 12:24:24 +0200
commit333c33960f77cb041092f1768bacd3e0b0c406d7 (patch)
treec617ffcbaa8d89ca886a580161cb46addeebe7bb /xmlsecurity
parent81afd36fe105ed919276eb3489f841b44cc13af6 (diff)
xmlsecurity: handle creation of OOXML _xmlsignatures sub-storage
Previously this code worked only for reading, as we assumed if it doesn't exist, then the storage is not OOXML, either. With this, DigitalSignaturesDialog::OKButtonHdl() gets a valid storage, where it'll be able to write the actual signatures. Change-Id: Iadf63a88c962386abc31225c02398761aea818cb (cherry picked from commit 600a7a79ecffc47a68438d308f5829868c2f37e6)
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 7537b342d660..c799a527e55c 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -383,7 +383,7 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream(
DBG_ASSERT( nOpenMode == css::embed::ElementModes::READ, "Error creating signature stream..." );
}
}
- else if(xNameAccess->hasByName("_xmlsignatures"))
+ else if(xNameAccess->hasByName("[Content_Types].xml"))
{
try
{
@@ -392,7 +392,7 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream(
}
catch (const io::IOException& rException)
{
- SAL_WARN("xmlsecurity.helper", "DocumentSignatureHelper::OpenSignatureStream: " << rException.Message);
+ SAL_WARN_IF(nOpenMode != css::embed::ElementModes::READ, "xmlsecurity.helper", "DocumentSignatureHelper::OpenSignatureStream: " << rException.Message);
}
}