summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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