diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-07-03 20:29:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-08 10:10:11 +0200 |
commit | 8d8e6c84e512c1a8b33aac75965b84481d1a1d13 (patch) | |
tree | 9ed209d057081d4283eb44b51c0d9af18f976eab /accessibility/source/extended/accessibletabbarpagelist.cxx | |
parent | 911ac42485b690df5cbbff6e3c04b111c1723aca (diff) |
[API CHANGE] Drop css::accessibility::XAccessibleStateSet
which is internal API, unused (as far as I can tell) by external
users.
This state is purely a bitset
(as implemented by utl::AccessibleStateSetHelper)
so we can just return it as a 64-bit value.
This shaves significant time off the performance profiles
of code that loads very complex shapes, because this state
is frequently used, and we no longer need to allocate a return
value on the heap for every call.
Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility/source/extended/accessibletabbarpagelist.cxx')
-rw-r--r-- | accessibility/source/extended/accessibletabbarpagelist.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index a65750fbd4b3..6070db1eb95b 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -26,7 +26,6 @@ #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <cppuhelper/supportsservice.hxx> #include <o3tl/safeint.hxx> -#include <unotools/accessiblestatesethelper.hxx> #include <unotools/accessiblerelationsethelper.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> @@ -295,21 +294,21 @@ namespace accessibility } - void AccessibleTabBarPageList::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) + void AccessibleTabBarPageList::FillAccessibleStateSet( sal_Int64& rStateSet ) { if ( !m_pTabBar ) return; if ( m_pTabBar->IsEnabled() ) { - rStateSet.AddState( AccessibleStateType::ENABLED ); - rStateSet.AddState( AccessibleStateType::SENSITIVE ); + rStateSet |= AccessibleStateType::ENABLED; + rStateSet |= AccessibleStateType::SENSITIVE; } - rStateSet.AddState( AccessibleStateType::VISIBLE ); + rStateSet |= AccessibleStateType::VISIBLE; if ( m_pTabBar->IsVisible() ) - rStateSet.AddState( AccessibleStateType::SHOWING ); + rStateSet |= AccessibleStateType::SHOWING; } @@ -470,22 +469,22 @@ namespace accessibility } - Reference< XAccessibleStateSet > AccessibleTabBarPageList::getAccessibleStateSet( ) + sal_Int64 AccessibleTabBarPageList::getAccessibleStateSet( ) { OExternalLockGuard aGuard( this ); - rtl::Reference<utl::AccessibleStateSetHelper> pStateSetHelper = new utl::AccessibleStateSetHelper; + sal_Int64 nStateSet = 0; if ( !rBHelper.bDisposed && !rBHelper.bInDispose ) { - FillAccessibleStateSet( *pStateSetHelper ); + FillAccessibleStateSet( nStateSet ); } else { - pStateSetHelper->AddState( AccessibleStateType::DEFUNC ); + nStateSet |= AccessibleStateType::DEFUNC; } - return pStateSetHelper; + return nStateSet; } |