summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-11-29 21:58:57 +0100
committerTomaž Vajngerl <quikee@gmail.com>2018-12-01 09:07:42 +0100
commitc2ee336288dcee103f297a55287fbca596a6c7a1 (patch)
treef800e7ad2eea3b98da593937b3d2530075221c33
parentd7a88b902af983145b196990949e89420e5bc4cf (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. Change-Id: I52e4a53f0cd3a326c767daee6301a78122af09d4 Reviewed-on: https://gerrit.libreoffice.org/64293 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--sfx2/source/doc/guisaveas.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index c9692ca90d8c..0e78de6ff18e 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -67,6 +67,7 @@
#include <comphelper/propertysequence.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/mimeconfighelper.hxx>
+#include <comphelper/lok.hxx>
#include <vcl/weld.hxx>
#include <vcl/window.hxx>
#include <toolkit/awt/vclxwindow.hxx>
@@ -1369,7 +1370,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
@@ -1383,7 +1384,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));
}
}