vcl/source/window/toolbox2.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
New commits: commit 312191c32af99eb46934df71807f3a1723b61fa7 Author: Szymon Kłos <[email protected]> AuthorDate: Wed Apr 28 15:20:35 2021 +0200 Commit: Szymon Kłos <[email protected]> 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 <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> 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)); + } } } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
