[Libreoffice-commits] core.git: vcl/jsdialog

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 20 15:45:42 UTC 2021


 vcl/jsdialog/jsdialogbuilder.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 5f6b7aac3b9561ec5f31b6294f43dcd24e8da1c9
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Jan 20 16:42:21 2021 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jan 20 16:44:42 2021 +0100

    Revert "jsdialog: enqueue update on dialog weld"
    
    This reverts commit ab85732e1c6a1b52cf95fd9fb50b9ccb7cac2137.
    <https://gerrit.libreoffice.org/c/core/+/109636/2> had built green on Jenkins
    against parent Gerrit commit <https://git.libreoffice.org/core/+/
    e63416d7151507dbaf51814316c26c63aec73889%5E%21> "jsdialog: send updates also for
    source treeview on drag", which introduced JSDialogSender::sendFullUpdate, but
    which has apparently never been submitted to master.  Thus, this commit on
    master now started to fail with
    
    > /home/buildslave/lode/jenkins/workspace/lo_callgrind_linux/vcl/jsdialog/jsdialogbuilder.cxx: In member function ‘virtual std::unique_ptr<weld::Dialog> JSInstanceBuilder::weld_dialog(const rtl::OString&)’:
    > /home/buildslave/lode/jenkins/workspace/lo_callgrind_linux/vcl/jsdialog/jsdialogbuilder.cxx:476:9: error: ‘sendFullUpdate’ was not declared in this scope
    >          sendFullUpdate();
    >          ^~~~~~~~~~~~~~
    
    (<https://ci.libreoffice.org/job/lo_callgrind_linux/10209/>).
    
    Change-Id: I98e58ea50fb7524123e25fccb3da571a2ec9783c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109685
    Tested-by: Stephan Bergmann <sbergman at redhat.com>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index ecd0f3d1b36d..38ef2a44e354 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -472,8 +472,16 @@ std::unique_ptr<weld::Dialog> JSInstanceBuilder::weld_dialog(const OString& id)
 
         RememberWidget("__DIALOG__", pRet.get());
 
+        const vcl::ILibreOfficeKitNotifier* pNotifier = pDialog->GetLOKNotifier();
+        if (pNotifier)
+        {
+            tools::JsonWriter aJsonWriter;
+            m_aOwnedToplevel->DumpAsPropertyTree(aJsonWriter);
+            aJsonWriter.put("id", m_aOwnedToplevel->GetLOKWindowId());
+            pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, aJsonWriter.extractData());
+        }
+
         initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON());
-        sendFullUpdate();
     }
 
     return pRet;


More information about the Libreoffice-commits mailing list