Kaydet (Commit) c2ee3362 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

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: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst d7a88b90
......@@ -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));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment