diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-31 19:17:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-02 09:37:08 +0200 |
commit | 7541fac2c0d5341f4d362779594ae236f05ff9a6 (patch) | |
tree | 73aefef941dd91b562b84689d50625858da2d15e /vcl/source/control | |
parent | 8ce0c756e64242431361059566d41495e3550d99 (diff) |
tdf#136331 implement applying atk properties to tab pages
Change-Id: I2ee57dbdb3d743fe1dd3d505a3aa2f479ffa62b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101765
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index b5275f6cb539..c3c894cb451d 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -53,6 +53,8 @@ public: OUString maText; OUString maFormatText; OUString maHelpText; + OUString maAccessibleName; + OUString maAccessibleDescription; OString maTabName; tools::Rectangle maRect; sal_uInt16 mnLine; @@ -1948,6 +1950,38 @@ const OUString& TabControl::GetHelpText( sal_uInt16 nPageId ) const return pItem->maHelpText; } +void TabControl::SetAccessibleName(sal_uInt16 nPageId, const OUString& rName) +{ + ImplTabItem* pItem = ImplGetItem( nPageId ); + assert( pItem ); + pItem->maAccessibleName = rName; +} + +OUString TabControl::GetAccessibleName( sal_uInt16 nPageId ) const +{ + ImplTabItem* pItem = ImplGetItem( nPageId ); + assert( pItem ); + if (!pItem->maAccessibleName.isEmpty()) + return pItem->maAccessibleName; + return OutputDevice::GetNonMnemonicString(pItem->maText); +} + +void TabControl::SetAccessibleDescription(sal_uInt16 nPageId, const OUString& rDesc) +{ + ImplTabItem* pItem = ImplGetItem( nPageId ); + assert( pItem ); + pItem->maAccessibleDescription = rDesc; +} + +OUString TabControl::GetAccessibleDescription( sal_uInt16 nPageId ) const +{ + ImplTabItem* pItem = ImplGetItem( nPageId ); + assert( pItem ); + if (!pItem->maAccessibleDescription.isEmpty()) + return pItem->maAccessibleDescription; + return pItem->maHelpText; +} + void TabControl::SetPageName( sal_uInt16 nPageId, const OString& rName ) const { ImplTabItem* pItem = ImplGetItem( nPageId ); |