summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/lokhelper.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index eccb3b1bf1f0..633e221e4f86 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -144,15 +144,18 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* pThisView, int nType, const OS
}
}
-void SfxLokHelper::notifyDialog(const OUString& rDialogID, const OUString& rAction)
+void SfxLokHelper::notifyDialog(const OUString& rDialogID, const OUString& rAction, const tools::Rectangle* rRect)
{
if (SfxLokHelper::getViewsCount() <= 0 || rDialogID.isEmpty())
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 aPayload = OString("{ \"dialogId\": \"") + OUStringToOString(rDialogID, RTL_TEXTENCODING_UTF8).getStr() + OString("\"");
+ aPayload += OString(", \"action\": \"") + OUStringToOString(rAction, RTL_TEXTENCODING_UTF8).getStr() + OString("\"");
+ if (!rAction.isEmpty() && rRect && !rRect->IsEmpty())
+ aPayload += OString(", \"rectangle\": \"") + rRect->toString() + OString("\"");
+
+ aPayload += "}";
while (pViewShell)
{