[Libreoffice-commits] core.git: vcl/source

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 31 10:05:24 UTC 2019


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

New commits:
commit db9fc72383496708fd18471f9c8dc31b284db210
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: Thu Oct 31 11:04:33 2019 +0100

    jsdialogs: send grid attach data
    
    Change-Id: I667e1ba97f42ac3e7b806bcec929ff346400bdda
    Reviewed-on: https://gerrit.libreoffice.org/79699
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/81764
    Tested-by: Jenkins

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);


More information about the Libreoffice-commits mailing list