diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-08-10 16:44:06 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2017-10-02 11:01:39 +0530 |
commit | 3ebaaebf544be4f7f39b7fcbbbc377418a897442 (patch) | |
tree | afc4a518aa954a7450d049344a4d733331380359 /sfx2 | |
parent | 77bb77aedee4b4596f769df8e334b8063c5846b0 (diff) |
Change CB_DIALOG_INVALIDATE to CB_DIALOG
We can specify whether it is an invalidation or something else in the
payload.
Change-Id: I95c5fc0a0a88b5277eaa93c8d1f9b937bddce7b3
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
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); } } |