From 3ebaaebf544be4f7f39b7fcbbbc377418a897442 Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Thu, 10 Aug 2017 16:44:06 +0530 Subject: Change CB_DIALOG_INVALIDATE to CB_DIALOG We can specify whether it is an invalidation or something else in the payload. Change-Id: I95c5fc0a0a88b5277eaa93c8d1f9b937bddce7b3 --- sfx2/source/view/lokhelper.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sfx2/source') diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 85b1815c57a8..702e88d09cf0 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -144,15 +144,19 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* pThisView, int nType, const OS } } -void SfxLokHelper::notifyDialogInvalidation(const OUString& rDialogID) +void SfxLokHelper::notifyDialog(const OUString& rDialogID, const OUString& rAction) { if (SfxLokHelper::getViewsCount() <= 0) return; SfxViewShell* pViewShell = SfxViewShell::GetFirst(); + const OString aPayload = OString("{ \"dialogId\": \"") + OUStringToOString(rDialogID, RTL_TEXTENCODING_UTF8).getStr() + + OString("\", \"action\": \"") + OUStringToOString(rAction, RTL_TEXTENCODING_UTF8).getStr() + + + "\" }"; + while (pViewShell) { - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DIALOG_INVALIDATE, OUStringToOString(rDialogID, RTL_TEXTENCODING_UTF8).getStr()); + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DIALOG, aPayload.getStr()); pViewShell = SfxViewShell::GetNext(*pViewShell); } } -- cgit