diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-09-22 17:06:38 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-10-01 10:22:44 +0200 |
commit | 7388db1b63fb19224f80cd7930268ec924f2c93f (patch) | |
tree | c2157ca7523bc863397f39a97ffb349dc9adf4dc /vcl | |
parent | 7362568a87256c367f79fd17de68cb447e79f265 (diff) |
jsdialogs: export more properties
Change-Id: Iaabe560867025c30c1478d4b33357231e67b0b57
Reviewed-on: https://gerrit.libreoffice.org/79799
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/button.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 11 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 4 |
3 files changed, 21 insertions, 1 deletions
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); |