sfx2/source/sidebar/Deck.cxx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
New commits: commit 6b7d962330a0580721a2304ac1ada133d166011f Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Fri Jan 10 18:03:49 2020 +0000 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Fri Jan 10 22:06:59 2020 +0100 lok: jsdialog creation for sidebar panels cleanup. Use UNO panel names as ids on new Panel nodes. This avoids problems with over-writing child details, items like sd::PanelLayout don't have an empty parent to overwrite, but have an immediate valueset node. Change-Id: I00bab7f0d6a4fb247e0509bce7548b2da164bd23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86571 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 6def9683727e..ba8f4928ac0b 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -193,7 +193,7 @@ boost::property_tree::ptree Deck::DumpAsPropertyTree() aTree.put("text", GetText()); aTree.put("enabled", IsEnabled()); - boost::property_tree::ptree aChildren; + boost::property_tree::ptree aPanelNodes; for (auto &it : maPanels) { if (it->IsLurking()) @@ -207,13 +207,20 @@ boost::property_tree::ptree Deck::DumpAsPropertyTree() if (!pWindow) continue; - boost::property_tree::ptree aChild = pWindow->DumpAsPropertyTree(); - aChild.put("text", it->GetText()); - aChild.put("type", "panel"); - aChildren.push_back(std::make_pair("", aChild)); + boost::property_tree::ptree aPanel; + aPanel.put("id", it->GetId()); + aPanel.put("type", "panel"); + aPanel.put("text", it->GetText()); + aPanel.put("enabled", it->IsEnabled()); + + boost::property_tree::ptree aChildren; + aChildren.push_back(std::make_pair("", pWindow->DumpAsPropertyTree())); + aPanel.add_child("children", aChildren); + + aPanelNodes.push_back(std::make_pair("", aPanel)); } + aTree.add_child("children", aPanelNodes); - aTree.add_child("children", aChildren); return aTree; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits