summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/layout.cxx6
-rw-r--r--vcl/source/window/window.cxx15
2 files changed, 14 insertions, 7 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 75da9e20b9e5..26981992bc04 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1294,11 +1294,7 @@ void VclGrid::setAllocation(const Size& rAllocation)
boost::property_tree::ptree VclGrid::DumpAsPropertyTree()
{
boost::property_tree::ptree aTree(VclContainer::DumpAsPropertyTree());
- array_type A = assembleGrid(*this);
- sal_Int32 nMaxX = A.shape()[0];
- sal_Int32 nMaxY = A.shape()[1];
- aTree.put("cols", nMaxX);
- aTree.put("rows", nMaxY);
+ aTree.put("type", "grid");
return aTree;
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c6434c537eb8..b3df086f64be 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3365,8 +3365,19 @@ boost::property_tree::ptree Window::DumpAsPropertyTree()
{
while (pChild)
{
- if (pChild->IsVisible())
- aChildren.push_back(std::make_pair("", pChild->DumpAsPropertyTree()));
+ if (pChild->IsVisible()) {
+ boost::property_tree::ptree aSubTree = pChild->DumpAsPropertyTree();
+ int nLeft = pChild->get_grid_left_attach();
+ int nTop = pChild->get_grid_top_attach();
+ if (nLeft != -1 && nTop != -1)
+ {
+ OUString sLeft = OUString::number(nLeft);
+ OUString sTop = OUString::number(nTop);
+ aSubTree.put("left", sLeft);
+ aSubTree.put("top", sTop);
+ }
+ aChildren.push_back(std::make_pair("", aSubTree));
+ }
pChild = pChild->mpWindowImpl->mpNext;
}
aTree.add_child("children", aChildren);