include/vcl/button.hxx        |    2 ++
 include/vcl/layout.hxx        |    1 +
 vcl/source/control/button.cxx |    7 +++++++
 vcl/source/window/layout.cxx  |   11 +++++++++++
 vcl/source/window/window.cxx  |    4 +++-
 5 files changed, 24 insertions(+), 1 deletion(-)

New commits:
commit 7388db1b63fb19224f80cd7930268ec924f2c93f
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Sun Sep 22 17:06:38 2019 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue Oct 1 10:22:44 2019 +0200

    jsdialogs: export more properties
    
    Change-Id: Iaabe560867025c30c1478d4b33357231e67b0b57
    Reviewed-on: https://gerrit.libreoffice.org/79799
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index bff3c8af3de9..eaa074332cba 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -91,6 +91,8 @@ public:
 
     virtual FactoryFunction GetUITestFactory() const override;
 
+    virtual boost::property_tree::ptree DumpAsPropertyTree() override;
+
 protected:
 
     /// Handler for click, in case we want the button to handle uno commands 
(.uno:Something).
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index fa8765277488..6a2d38d77a49 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -321,6 +321,7 @@ private:
     Size calculateRequisitionForSpacings(sal_Int32 nRowSpacing, sal_Int32 
nColSpacing) const;
     virtual Size calculateRequisition() const override;
     virtual void setAllocation(const Size &rAllocation) override;
+    virtual boost::property_tree::ptree DumpAsPropertyTree() override;
 public:
     VclGrid(vcl::Window *pParent)
         : VclContainer(pParent)
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index b130686d82ee..5fbf156417b9 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -578,6 +578,13 @@ FactoryFunction Button::GetUITestFactory() const
     return ButtonUIObject::create;
 }
 
+boost::property_tree::ptree Button::DumpAsPropertyTree()
+{
+    boost::property_tree::ptree aTree(Control::DumpAsPropertyTree());
+    aTree.put("text", GetText());
+    return aTree;
+}
+
 IMPL_STATIC_LINK( Button, dispatchCommandHandler, Button*, pButton, void )
 {
     if (pButton == nullptr)
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 49fecb7476fc..f558e6118da2 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1431,6 +1431,17 @@ 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);
+    return aTree;
+}
+
 bool toBool(const OUString &rValue)
 {
     return (!rValue.isEmpty() && (rValue[0] == 't' || rValue[0] == 'T' || 
rValue[0] == '1'));
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 4121cb565c30..7339e881b4db 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3350,13 +3350,15 @@ boost::property_tree::ptree Window::DumpAsPropertyTree()
     aTree.put("id", get_id());  // TODO could be missing - sort out
     aTree.put("type", windowTypeName(GetType()));
     aTree.put("text", GetText());
+    aTree.put("enabled", IsEnabled());
 
     boost::property_tree::ptree aChildren;
     if (vcl::Window* pChild = mpWindowImpl->mpFirstChild)
     {
         while (pChild)
         {
-            aChildren.push_back(std::make_pair("", 
pChild->DumpAsPropertyTree()));
+            if (pChild->IsVisible())
+                aChildren.push_back(std::make_pair("", 
pChild->DumpAsPropertyTree()));
             pChild = pChild->mpWindowImpl->mpNext;
         }
         aTree.add_child("children", aChildren);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to