From 22361439544aa4354daeabe92c1732cf9cbf1e9c Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 21 Jun 2024 18:45:22 +0500 Subject: Handle ".uno:DocumentStatus" instead of SlideMasterPage special-handling Since other view modes are needed, too, not only master page view, we need to send / handle status updates not only in case of SlideMasterPage update. The ".uno:DocumentStatus" pseudo-command update sent from ChangeEditMode in core serves for that. Signed-off-by: Mike Kaganski Change-Id: If7bc7ae124d161658b06784f3e86d85f3c76f3c6 --- kit/ChildSession.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index d840fff43e..af7605ed19 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -3039,17 +3039,19 @@ void ChildSession::loKitCallback(const int type, const std::string& payload) break; case LOK_CALLBACK_STATE_CHANGED: { + if (payload == ".uno:DocumentStatus") // a special pseudo-command + { + std::string status = LOKitHelper::documentStatus(getLOKitDocument()->get()); + sendTextFrame("statusupdate: " + status); + break; + } + bool filter = false; if (payload.find(".uno:ModifiedStatus") != std::string::npos) filter = _docManager->trackDocModifiedState(payload); if (!filter) sendTextFrame("statechanged: " + payload); - if (payload.starts_with(".uno:SlideMasterPage")) - { - std::string status = LOKitHelper::documentStatus(getLOKitDocument()->get()); - sendTextFrame("status: " + status); - } break; } case LOK_CALLBACK_SEARCH_NOT_FOUND: -- cgit