include/vcl/button.hxx | 6 ++++++ vcl/source/control/button.cxx | 14 ++++++++++++++ 2 files changed, 20 insertions(+)
New commits: commit 1cc241cfb43d82f7f816042079b8baec318bfcb7 Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Tue Sep 17 12:42:24 2019 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Oct 1 15:40:40 2019 +0200 lok jsdialogs: Add handling of checked state for checkbox and radiobutton. Change-Id: Id64833a08c62388220921208cba33a60c178e9ac Reviewed-on: https://gerrit.libreoffice.org/79797 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 eaa074332cba..0f55d7e2ccb9 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -377,6 +377,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; }; @@ -465,6 +468,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 5fbf156417b9..3d948a69c925 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -2899,6 +2899,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; @@ -3718,6 +3725,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