summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-03-07 12:09:44 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-07 17:42:32 +0200
commitb7bc8cbc299b154e0e10f239a2318bdef418c54b (patch)
tree8dea63fed4c6463196c0411aa46054c8b80d42ed /xmlsecurity
parent0090eb74645d31b0c36120c4749ab6a9afd07d04 (diff)
xmlsecurity OOXML export: remove signature content types when removing ...
... signatures. ExportSignatureContentTypes() was already a "remove all, and then re-add necessary entries" operation, so just make sure we still call it for zero signatures and it'll do the right thing. Change-Id: If9182b39ac6d8f2cf66f33a02d9ddcab170ba5ea (cherry picked from commit 1a04b1e4f2086bfdeaba04d7b67e8b8e21e5037f)
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index 505554e89e1f..47d416ffa8b5 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -374,11 +374,9 @@ void DocumentSignatureManager::write()
{
// OOXML
size_t nSignatureCount = maCurrentSignatureInformations.size();
+ maSignatureHelper.ExportSignatureContentTypes(mxStore, nSignatureCount);
if (nSignatureCount > 0)
- {
- maSignatureHelper.ExportSignatureContentTypes(mxStore, nSignatureCount);
maSignatureHelper.ExportSignatureRelations(aStreamHelper.xSignatureStorage, nSignatureCount);
- }
else
{
// Removing all signatures: then need to remove the signature relation as well.