summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-06-28 21:37:27 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-06-29 12:28:54 +0200
commit79110f761af53fabde45ef4174c5266c71e9d13d (patch)
treeee78db09414a70396392d93e537a83097266c6c3 /xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
parent828cea44d910d8f0e27519b4283c9038bcb022ac (diff)
tdf#118425 xmlsecurity UI: fix OOXML signing
Regression from 13596e704e4b48e8b0892867b3f3fc351a2729f9 (Don't pass ODF version, just retrieve it directly, 2018-05-17), just checking the file format explicitly like the PDF signing does fixes the problem. Change-Id: I1ba7cf9096e01c6c5a2d3875b08fa3a66acae829 Reviewed-on: https://gerrit.libreoffice.org/56635 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 02119ce226ef7c1fcf419aa0933aa95381ee309b) Reviewed-on: https://gerrit.libreoffice.org/56663 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx')
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index d3c6d2d6c92d..26f694623646 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -264,6 +264,11 @@ bool DigitalSignaturesDialog::canAddRemove()
//'canAdd' and 'canRemove' case
bool ret = true;
+ uno::Reference<container::XNameAccess> xNameAccess(maSignatureManager.mxStore, uno::UNO_QUERY);
+ if (xNameAccess.is() && xNameAccess->hasByName("[Content_Types].xml"))
+ // It's always possible to append an OOXML signature.
+ return ret;
+
if (!maSignatureManager.mxStore.is())
// It's always possible to append a PDF signature.
return ret;