diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-06-28 21:37:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-06-29 09:07:15 +0200 |
commit | 02119ce226ef7c1fcf419aa0933aa95381ee309b (patch) | |
tree | fc14251a7588d60a6ff29ba35e55d2ece37b7922 | |
parent | 5437eb15ad3975b11c6eefe77dfd6687e0e73f81 (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>
-rw-r--r-- | xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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; |