chart2/source/controller/main/ControllerCommandDispatch.cxx | 10 ++++++++++ sc/source/ui/view/tabvwshb.cxx | 2 ++ 2 files changed, 12 insertions(+)
New commits: commit d90b0305e0769c89c5644854c216e0849df3313e Author: Dennis Francis <[email protected]> AuthorDate: Tue Mar 24 18:26:16 2020 +0530 Commit: Dennis Francis <[email protected]> CommitDate: Wed Mar 25 14:17:17 2020 +0100 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. Change-Id: I8c38a37cc455f74a70d43b6aaa3e5035b283d47f (cherry picked from commit 75adb624dfff4659e6f3099a1720fbd697560f9c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91036 Tested-by: Jenkins Reviewed-by: Dennis Francis <[email protected]> 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 ); } diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 157ab4967484..9ebb98f8e24d 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -334,6 +334,8 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) case SID_INSERT_DIAGRAM: FuInsertChart(*this, pWin, pView, pDrModel, rReq); + if (comphelper::LibreOfficeKit::isActive()) + pDocSh->SetModified(); break; case SID_INSERT_OBJECT: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
