summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-03-24 18:26:16 +0530
committerMichael Meeks <michael.meeks@collabora.com>2020-05-16 19:46:42 +0100
commitacbb1b92d53ba77528b941254e5a08b3a39a89b4 (patch)
tree2ec536abc495d9b9576da95ca8b23ecfb67a02c5 /chart2
parent4306eb8775e322c6ff0fd52f9b099723ac1a35a5 (diff)
lokit: Mark document as modified on chart insert/edit...
immediately at least in the case when LOKit is active. This is to allow prompt emission of .uno:ModifiedStatus=true statechange message from lokit to the client. Without this, in online the chart insert/modify related changes may not get saved on client exit. (cherry picked from commit 75adb624dfff4659e6f3099a1720fbd697560f9c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91036 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Change-Id: I8c38a37cc455f74a70d43b6aaa3e5035b283d47f
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index f8474959a619..4508a83adb4d 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -36,6 +36,9 @@
#include <vcl/svapp.hxx>
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
+#include <comphelper/lok.hxx>
+#include <sfx2/viewsh.hxx>
+#include <sfx2/objsh.hxx>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -806,6 +809,13 @@ void SAL_CALL ControllerCommandDispatch::modified( const lang::EventObject& aEve
if( bUpdateCommandAvailability )
updateCommandAvailability();
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ if (SfxViewShell* pViewShell = SfxViewShell::Current())
+ if (SfxObjectShell* pObjSh = pViewShell->GetObjectShell())
+ pObjSh->SetModified();
+ }
+
CommandDispatch::modified( aEvent );
}