[Libreoffice-commits] core.git: Branch 'feature/jsdialogs' - vcl/source

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 25 14:31:21 UTC 2019


 vcl/source/window/layout.cxx |    6 +-----
 vcl/source/window/window.cxx |   13 +++++++++++--
 2 files changed, 12 insertions(+), 7 deletions(-)

New commits:
commit 256880fc9b6a66d58876cff5ef9ab7e4046b3608
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Sep 25 16:27:57 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Sep 25 16:27:57 2019 +0200

    jsdialogs: send grid attach data
    
    Change-Id: I667e1ba97f42ac3e7b806bcec929ff346400bdda

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index e487296de7a7..39bc513de916 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1440,11 +1440,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 3dd8d1167f67..13f36e3a19dc 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3354,8 +3354,17 @@ 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)
+                {
+                    aSubTree.put("left", OUString::number(nLeft));
+                    aSubTree.put("top", OUString::number(nTop));
+                }
+                aChildren.push_back(std::make_pair("", aSubTree));
+            }
             pChild = pChild->mpWindowImpl->mpNext;
         }
         aTree.add_child("children", aChildren);


More information about the Libreoffice-commits mailing list