diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-11-29 21:58:57 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-12-01 18:30:35 +0100 |
commit | 416ce6cca8cf1178239cfd603c4248e8ba044861 (patch) | |
tree | b889617c24f30ecd81d7e3046495394629ad0f0a /sfx2 | |
parent | ac8dd8cfc41b5a3feac5ad7e7ed303ab66a13833 (diff) |
lokit: disable triggering of GUI when changing a signed doc
When a signed document is changed and saved, the dialog pops up
on the GUI to warn that the signature will be removed. When saving
over the lokit this dialog isn't shown and assumes that we don't
want to save (throws an exception) which means we can't save the
document ever. This changes the behavior so that we allow removal
of the signature and saving can proceed.
Reviewed-on: https://gerrit.libreoffice.org/64293
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit c2ee336288dcee103f297a55287fbca596a6c7a1)
Change-Id: I52e4a53f0cd3a326c767daee6301a78122af09d4
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 522fea6935a7..956a03f30002 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -65,6 +65,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/mimeconfighelper.hxx> #include <vcl/layout.hxx> +#include <comphelper/lok.hxx> #include <vcl/window.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <o3tl/char16_t2wchar_t.hxx> @@ -1389,7 +1390,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo } } - if ( !( nStoreMode & EXPORT_REQUESTED ) ) + if (!comphelper::LibreOfficeKit::isActive() && !( nStoreMode & EXPORT_REQUESTED ) ) { // if it is no export, warn user that the signature will be removed if ( SignatureState::OK == nDocumentSignatureState @@ -1402,7 +1403,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo { // the user has decided not to store the document throw task::ErrorCodeIOException( - "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT", + "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT (Preserve Signature)", uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT)); } } |