[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 29 10:59:33 UTC 2021


 vcl/source/window/toolbox2.cxx |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

New commits:
commit 312191c32af99eb46934df71807f3a1723b61fa7
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Apr 28 15:20:35 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Apr 29 12:58:55 2021 +0200

    jsdialog: dump toolbox item's window if present
    
    Change-Id: Ia882bcadb844993f2b761bd91c6f6f60c9e1b2ee
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114807
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 360fa312640d..2e442923899b 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1739,11 +1739,20 @@ void ToolBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
         {
             auto childNode = rJsonWriter.startStruct();
             int nId = GetItemId(i);
-            if (!IsItemVisible(nId))
-                continue;
-            rJsonWriter.put("type", "toolitem");
-            rJsonWriter.put("text", GetItemText(nId));
-            rJsonWriter.put("command", GetItemCommand(nId));
+
+            vcl::Window* pWindow = GetItemWindow(nId);
+            if (pWindow)
+            {
+                pWindow->DumpAsPropertyTree(rJsonWriter);
+            }
+            else
+            {
+                if (!IsItemVisible(nId))
+                    continue;
+                rJsonWriter.put("type", "toolitem");
+                rJsonWriter.put("text", GetItemText(nId));
+                rJsonWriter.put("command", GetItemCommand(nId));
+            }
         }
     }
 }


More information about the Libreoffice-commits mailing list