diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-10-23 13:29:37 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-10-23 16:26:24 +0200 |
commit | c7b97f2e4b8f47107bc91ded0295dcfffd0c71b6 (patch) | |
tree | 1a5b5c5668aa95c22f0159a7c71f2ade1b1e690a /vcl | |
parent | 36a1942bccdf63f26ea3a4497688f367083d2f0e (diff) |
jsdilogs: send data for font name & size toolitems
Change-Id: Ia5ea058ba44b3a511a0bdbfc132a7de2d68f2e6b
Reviewed-on: https://gerrit.libreoffice.org/81380
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 4aecf7abfaa6..6700c3466ff2 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1771,21 +1771,25 @@ boost::property_tree::ptree ToolBox::DumpAsPropertyTree() boost::property_tree::ptree aTree(DockingWindow::DumpAsPropertyTree()); boost::property_tree::ptree aChildren; - for (unsigned long i = 0; i < GetItemCount(); ++i) + boost::property_tree::ptree::const_assoc_iterator found = aTree.find("children"); + if (found == aTree.not_found()) { - ToolBoxItemType type = GetItemType(i); - if (type == ToolBoxItemType::BUTTON) + for (unsigned long i = 0; i < GetItemCount(); ++i) { - boost::property_tree::ptree aEntry; - int nId = GetItemId(i); - aEntry.put("type", "toolitem"); - aEntry.put("text", GetItemText(nId)); - aEntry.put("command", GetItemCommand(nId)); - aChildren.push_back(std::make_pair("", aEntry)); + ToolBoxItemType type = GetItemType(i); + if (type == ToolBoxItemType::BUTTON) + { + boost::property_tree::ptree aEntry; + int nId = GetItemId(i); + aEntry.put("type", "toolitem"); + aEntry.put("text", GetItemText(nId)); + aEntry.put("command", GetItemCommand(nId)); + aChildren.push_back(std::make_pair("", aEntry)); + } } - } - aTree.add_child("children", aChildren); + aTree.add_child("children", aChildren); + } return aTree; } |