include/vcl/layout.hxx | 1 + include/vcl/weld.hxx | 1 + vcl/source/app/salvtables.cxx | 2 ++ vcl/source/window/layout.cxx | 5 +++++ vcl/unx/gtk3/gtk3gtkinst.cxx | 5 +++++ 5 files changed, 14 insertions(+)
New commits: commit 47204af3a25621aec89449f180ee7224c1f247ce Author: Caolán McNamara <[email protected]> AuthorDate: Wed Nov 11 09:40:15 2020 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 11 15:18:00 2020 +0100 support getting Expander's label Change-Id: Ibd3fe335e645895eedb6330cfc98590ad3c31fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105578 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index d2c5893ed516..663dea045784 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -484,6 +484,7 @@ public: bool get_expanded() const; void set_expanded(bool bExpanded); void set_label(const OUString& rLabel); + OUString get_label() const; vcl::Window *get_label_widget(); const vcl::Window *get_label_widget() const; virtual void StateChanged(StateChangedType nType) override; diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index ff949eb6dae8..51f2f9d44506 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -2027,6 +2027,7 @@ protected: public: virtual void set_label(const OUString& rText) = 0; + virtual OUString get_label() const = 0; virtual bool get_expanded() const = 0; virtual void set_expanded(bool bExpand) = 0; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 938b2cdd95de..1327e9d6e4f3 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5797,6 +5797,8 @@ public: virtual void set_label(const OUString& rText) override { m_xExpander->set_label(rText); } + virtual OUString get_label() const override { return m_xExpander->get_label(); } + virtual bool get_expanded() const override { return m_xExpander->get_expanded(); } virtual void set_expanded(bool bExpand) override { m_xExpander->set_expanded(bExpand); } diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index d4b89b7c51a0..6aa30005942e 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1650,6 +1650,11 @@ void VclExpander::set_label(const OUString& rLabel) m_pDisclosureButton->SetText(rLabel); } +OUString VclExpander::get_label() const +{ + return m_pDisclosureButton->GetText(); +} + void VclExpander::dispose() { m_pDisclosureButton.disposeAndClear(); diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 5a96a97adf6b..23bd3f34d205 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -16200,6 +16200,11 @@ public: ::set_label(GTK_LABEL(gtk_expander_get_label_widget(m_pExpander)), rText); } + virtual OUString get_label() const override + { + return ::get_label(GTK_LABEL(gtk_expander_get_label_widget(m_pExpander))); + } + virtual bool get_expanded() const override { return gtk_expander_get_expanded(m_pExpander); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
