summaryrefslogtreecommitdiff
path: root/accessibility/source/standard/vclxaccessiblescrollbar.cxx
diff options
context:
space:
mode:
authorArnaud Versini <Arnaud.Versini@libreoffice.org>2017-07-23 16:25:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-05 21:27:14 +0200
commite2c14a6caabbb6413ae7b1e631a0a89f7b2ba4c7 (patch)
treef6b8eb38495489cc91e03068f337087cf53473a7 /accessibility/source/standard/vclxaccessiblescrollbar.cxx
parent42b894f80a6d0c39bb0f7092eb204a15c22c4f38 (diff)
accessibility: remove useless calls to getAccessibleActionCount.
This also removes a lot of useless recursive locks. Change-Id: Ie7f337683146bb5738f11b8f9194e73437312f03 Reviewed-on: https://gerrit.libreoffice.org/40325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblescrollbar.cxx')
-rw-r--r--accessibility/source/standard/vclxaccessiblescrollbar.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/accessibility/source/standard/vclxaccessiblescrollbar.cxx b/accessibility/source/standard/vclxaccessiblescrollbar.cxx
index bb83d7ac832d..242f09f69a27 100644
--- a/accessibility/source/standard/vclxaccessiblescrollbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblescrollbar.cxx
@@ -117,12 +117,13 @@ Sequence< OUString > VCLXAccessibleScrollBar::getSupportedServiceNames()
// XAccessibleAction
+static constexpr sal_Int32 ACCESSIBLE_ACTION_COUNT=4;
sal_Int32 VCLXAccessibleScrollBar::getAccessibleActionCount( )
{
OExternalLockGuard aGuard( this );
- return 4;
+ return ACCESSIBLE_ACTION_COUNT;
}
@@ -130,7 +131,7 @@ sal_Bool VCLXAccessibleScrollBar::doAccessibleAction ( sal_Int32 nIndex )
{
OExternalLockGuard aGuard( this );
- if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ if ( nIndex < 0 || nIndex >= ACCESSIBLE_ACTION_COUNT )
throw IndexOutOfBoundsException();
bool bReturn = false;
@@ -158,7 +159,7 @@ OUString VCLXAccessibleScrollBar::getAccessibleActionDescription ( sal_Int32 nIn
{
OExternalLockGuard aGuard( this );
- if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ if ( nIndex < 0 || nIndex >= ACCESSIBLE_ACTION_COUNT )
throw IndexOutOfBoundsException();
OUString sDescription;
@@ -180,7 +181,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleScrollBar::getAccessibleActionK
{
OExternalLockGuard aGuard( this );
- if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ if ( nIndex < 0 || nIndex >= ACCESSIBLE_ACTION_COUNT )
throw IndexOutOfBoundsException();
return Reference< XAccessibleKeyBinding >();