summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-12-29 09:36:50 +0100
committerAndras Timar <andras.timar@collabora.com>2021-04-09 11:58:43 +0200
commite27857accc258edf2320e206196d967682bf5ce3 (patch)
tree59ebddc1d60b454a6924ea686365209ee846d5fe
parent48b27bd8277212142644fb4536fcbd226b82ae68 (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