summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-09-25 16:27:57 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2019-10-31 11:04:33 +0100
commitdb9fc72383496708fd18471f9c8dc31b284db210 (patch)
treedcad84c13f9061b0be4da207c10302cca14cb000
parent51f6b20a0c8c3b2830547e4400cf4c513e9d9c00 (diff)
jsdialogs: send grid attach data
Change-Id: I667e1ba97f42ac3e7b806bcec929ff346400bdda Reviewed-on: https://gerrit.libreoffice.org/79699 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/81764 Tested-by: Jenkins
-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);