diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-13 09:24:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-13 22:08:04 +0100 |
commit | 64c93c950e191d8c6ee7cf138ff60d085c9486de (patch) | |
tree | 1c2c63866d94e484ed7206cf652660f6ed49b234 | |
parent | 471f2bf1ee9256f5b8196b6cc713666729654e59 (diff) |
add set_accessible_description
Change-Id: I18aebc4a127ff92f5d2606490e4f120d4b98b4ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105796
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/vcl/weld.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/salvtables.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 8 |
4 files changed, 16 insertions, 0 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 51f2f9d44506..7387db806350 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -165,6 +165,7 @@ public: int& height) const = 0; virtual void set_accessible_name(const OUString& rName) = 0; + virtual void set_accessible_description(const OUString& rDescription) = 0; virtual OUString get_accessible_name() const = 0; virtual OUString get_accessible_description() const = 0; diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 7717502833e8..7eff04d56c7e 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -275,6 +275,8 @@ public: virtual void set_accessible_name(const OUString& rName) override; + virtual void set_accessible_description(const OUString& rDescription) override; + virtual OUString get_accessible_name() const override; virtual OUString get_accessible_description() const override; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 1327e9d6e4f3..585dd36325a3 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -362,6 +362,11 @@ void SalInstanceWidget::set_accessible_name(const OUString& rName) m_xWidget->SetAccessibleName(rName); } +void SalInstanceWidget::set_accessible_description(const OUString& rDescription) +{ + m_xWidget->SetAccessibleDescription(rDescription); +} + OUString SalInstanceWidget::get_accessible_name() const { return m_xWidget->GetAccessibleName(); } OUString SalInstanceWidget::get_accessible_description() const diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 3105a4e3056b..a74533faa787 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -2731,6 +2731,14 @@ public: atk_object_set_name(pAtkObject, OUStringToOString(rName, RTL_TEXTENCODING_UTF8).getStr()); } + virtual void set_accessible_description(const OUString& rDescription) override + { + AtkObject* pAtkObject = gtk_widget_get_accessible(m_pWidget); + if (!pAtkObject) + return; + atk_object_set_description(pAtkObject, OUStringToOString(rDescription, RTL_TEXTENCODING_UTF8).getStr()); + } + virtual OUString get_accessible_name() const override { AtkObject* pAtkObject = gtk_widget_get_accessible(m_pWidget); |