diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-08-10 16:44:06 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-15 17:07:13 +0100 |
commit | 910e8d0167886fb1144fb8fb8d5b88a948018151 (patch) | |
tree | 3cc56504bc4c462452830a2ad65dbaf50c8cd8d9 /sfx2 | |
parent | 3b487140f424d3cf515852c1cc12dbf3000b9358 (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 6ef091c111a5..7ae0e65459bd 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -132,15 +132,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); } } |