summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2024-10-02 08:42:26 +0200
committerMiklos Vajna <vmiklos@collabora.com>2024-10-02 09:49:04 +0200
commit1c7f6188eb5b2a2bbf0cf589843d644306e40d6d (patch)
tree01dcca971824cbb4ce6d30f0b263931c8b044023 /sfx2/source
parent2857c0b9cd096a83c7d0de927116dac1fd7c0b09 (diff)
cool#9992 lok doc sign: avoid storing the sign cert in the model after sign
Open the signatures dialog in LOK mode, add a signature, close it, you get a (non-async) popup asking if you want to automatically re-sign the document on each save in the future. This makes sense when only one user edits the document, but the LOK mode stores the signing certificates in the view, so this would mean user A can enable this mode, then user B could edit + save, which is not wanted. Fix the problem by just not offering this functionality in LOK mode, where we assume that certificates are per-view and the save works on the model. Change-Id: I180fc2e6078623d44f8414f7891481218df7cebd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174369 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/doc/objserv.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index a6ac42734c17..12c28f4e614d 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -538,6 +538,12 @@ void SetDocProperties(const uno::Reference<document::XDocumentProperties>& xDP,
void SfxObjectShell::AfterSignContent(bool bHaveWeSigned, weld::Window* pDialogParent)
{
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // LOK signing certificates are per-view, don't store them in the model.
+ return;
+ }
+
if ( bHaveWeSigned && HasValidSignatures() )
{
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( pDialogParent,