diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-08-03 14:42:55 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-15 17:07:11 +0100 |
commit | cc42b2599dfffa3483699d918f0b8eb28505b54f (patch) | |
tree | b9057eccb41acd41f58d757a4be33ac279faaa4d /sfx2 | |
parent | bba61e62f3481fe389bc9d8cfb2f786624b96b5a (diff) |
lokdialog: Support for rendering floating window dialog widgets
Now gtktiledviewer can show floating window dialog widgets when user
clicks any of such widget in the dialog.
Change-Id: I13d756f236379bc8b2041ed41cb7b502f7fd9b24
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 5be64690ac47..6ef091c111a5 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -145,6 +145,24 @@ void SfxLokHelper::notifyDialogInvalidation(const OUString& rDialogID) } } +void SfxLokHelper::notifyDialogChild(const OUString& rDialogID, const OUString& rAction, const Point& rPos) +{ + 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() + + OString("\", \"position\": \"") + OString::number(rPos.getX()) + OString(", ") + OString::number(rPos.getY()) + + + "\" }"; + + while (pViewShell) + { + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DIALOG_CHILD, aPayload.getStr()); + pViewShell = SfxViewShell::GetNext(*pViewShell); + } +} + void SfxLokHelper::notifyInvalidation(SfxViewShell* pThisView, const OString& rPayload) { std::stringstream ss; |