include/vcl/button.hxx | 6 ++++++ vcl/source/control/button.cxx | 14 ++++++++++++++ 2 files changed, 20 insertions(+)
New commits: commit 251a7ab4128506a919327ee9c5a1408048cc1120 Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Tue Sep 17 12:42:24 2019 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Sep 30 09:43:57 2019 +0200 lok jsdialogs: Add handling of checked state for checkbox and radiobutton. Change-Id: Id64833a08c62388220921208cba33a60c178e9ac Reviewed-on: https://gerrit.libreoffice.org/79689 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 7673ad301405..468b5121affb 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -394,6 +394,9 @@ public: void group(RadioButton &rOther); virtual void ShowFocus(const tools::Rectangle& rRect) override; + /// Button hes additional stuff that we need to dump too. + boost::property_tree::ptree DumpAsPropertyTree() override; + virtual FactoryFunction GetUITestFactory() const override; }; @@ -482,6 +485,9 @@ public: virtual bool set_property(const OString &rKey, const OUString &rValue) override; virtual void ShowFocus(const tools::Rectangle& rRect) override; + /// Button hes additional stuff that we need to dump too. + boost::property_tree::ptree DumpAsPropertyTree() override; + virtual FactoryFunction GetUITestFactory() const override; }; diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index c90a280639f6..35e267a6030c 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -2938,6 +2938,13 @@ void RadioButton::ShowFocus(const tools::Rectangle& rRect) Button::ShowFocus(rRect); } +boost::property_tree::ptree RadioButton::DumpAsPropertyTree() +{ + boost::property_tree::ptree aTree(Button::DumpAsPropertyTree()); + aTree.put("checked", IsChecked()); + return aTree; +} + FactoryFunction RadioButton::GetUITestFactory() const { return RadioButtonUIObject::create; @@ -3755,6 +3762,13 @@ void CheckBox::ShowFocus(const tools::Rectangle& rRect) Button::ShowFocus(rRect); } +boost::property_tree::ptree CheckBox::DumpAsPropertyTree() +{ + boost::property_tree::ptree aTree(Button::DumpAsPropertyTree()); + aTree.put("checked", IsChecked()); + return aTree; +} + FactoryFunction CheckBox::GetUITestFactory() const { return CheckBoxUIObject::create; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits