[Libreoffice-commits] core.git: xmlsecurity/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jun 29 07:07:39 UTC 2018
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 02119ce226ef7c1fcf419aa0933aa95381ee309b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jun 28 21:37:27 2018 +0200
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 at collabora.co.uk>
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 649c6e53f562..841cb6f6339c 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -263,6 +263,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;
More information about the Libreoffice-commits
mailing list