summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-12-29 09:36:50 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2021-01-10 19:19:16 +0100
commitf55266b456b1534bdbc9c3ce6d04d2b65f152a6e (patch)
treeb276d586b530411f2b8a3b9c0014a33c186e7ae8
parent6593b7d4d5a71f5be63eecce618a0000f24d51da (diff)
jsdialog: updates in similar fashion like other messages
to unify all jsdialog interactions Change-Id: I22e14282f5a2c52ef44e68cb39338600004c4e24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108435 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 3352bac904d1..f33d0be85fd5 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -102,6 +102,7 @@ void JSDialogNotifyIdle::updateStatus(VclPtr<vcl::Window> pWindow)
if (!m_aNotifierWindow)
return;
+ // will be deprecated soon
if (m_aNotifierWindow->IsReallyVisible())
{
if (const vcl::ILibreOfficeKitNotifier* pNotifier = m_aNotifierWindow->GetLOKNotifier())
@@ -124,6 +125,21 @@ void JSDialogNotifyIdle::updateStatus(VclPtr<vcl::Window> pWindow)
aJsonWriter.extractData());
}
}
+
+ // new approach - update also if hidden
+ if (const vcl::ILibreOfficeKitNotifier* pNotifier = m_aNotifierWindow->GetLOKNotifier())
+ {
+ tools::JsonWriter aJsonWriter;
+
+ aJsonWriter.put("jsontype", m_sTypeOfJSON);
+ aJsonWriter.put("action", "update");
+ aJsonWriter.put("id", m_aNotifierWindow->GetLOKWindowId());
+ {
+ auto aEntries = aJsonWriter.startNode("control");
+ pWindow->DumpAsPropertyTree(aJsonWriter);
+ }
+ pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, aJsonWriter.extractData());
+ }
}
std::unique_ptr<tools::JsonWriter> JSDialogNotifyIdle::generateCloseMessage() const