[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - include/vcl vcl/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 30 07:45:00 UTC 2019
include/vcl/button.hxx | 2 ++
include/vcl/layout.hxx | 2 ++
vcl/source/control/button.cxx | 7 +++++++
vcl/source/window/layout.cxx | 18 ++++++++++++++++++
vcl/source/window/window.cxx | 4 +++-
5 files changed, 32 insertions(+), 1 deletion(-)
New commits:
commit 9ec5817a6103b2fb9b154451cf015e04b814ca5c
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Sun Sep 22 17:06:38 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Sep 30 09:44:25 2019 +0200
jsdialogs: export more properties
Change-Id: Iaabe560867025c30c1478d4b33357231e67b0b57
Reviewed-on: https://gerrit.libreoffice.org/79691
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 468b5121affb..0fc7f6552009 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -97,6 +97,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 9c8ad386340f..561a0e7135e3 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -323,6 +323,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 35e267a6030c..dc4beeb2ef7a 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -620,6 +620,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 664928791988..44988cfee49c 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1436,6 +1436,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 086c3f61971e..b080c6b706b6 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3345,13 +3345,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);
commit 1cbc8bfbaa77035f095b096973344ea6faf08f96
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Sep 19 16:16:46 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Sep 30 09:44:17 2019 +0200
jsdialogs: export vertical property for Boxes
Change-Id: I377638b0e9c5575e41ea3f3714541cc94f61a92b
Reviewed-on: https://gerrit.libreoffice.org/79690
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 0c4cb53bc523..9c8ad386340f 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -91,6 +91,7 @@ public:
m_bHomogeneous = bHomogeneous;
}
virtual bool set_property(const OString &rKey, const OUString &rValue) override;
+ virtual boost::property_tree::ptree DumpAsPropertyTree() override;
protected:
virtual sal_uInt16 getDefaultAccessibleRole() const override;
void accumulateMaxes(const Size &rChildSize, Size &rSize) const;
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 1b387ea9d69b..664928791988 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -500,6 +500,13 @@ bool VclBox::set_property(const OString &rKey, const OUString &rValue)
return true;
}
+boost::property_tree::ptree VclBox::DumpAsPropertyTree()
+{
+ boost::property_tree::ptree aTree(VclContainer::DumpAsPropertyTree());
+ aTree.put("vertical", m_bVerticalContainer);
+ return aTree;
+}
+
sal_uInt16 VclBox::getDefaultAccessibleRole() const
{
#if defined(_WIN32)
More information about the Libreoffice-commits
mailing list