summaryrefslogtreecommitdiff
path: root/accessibility/source/standard/vclxaccessiblemenuitem.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/vclxaccessiblemenuitem.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/vclxaccessiblemenuitem.cxx')
-rw-r--r--accessibility/source/standard/vclxaccessiblemenuitem.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
index 60de73778696..259501bfe4dd 100644
--- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
@@ -405,7 +405,7 @@ sal_Bool VCLXAccessibleMenuItem::doAccessibleAction ( sal_Int32 nIndex )
{
OExternalLockGuard aGuard( this );
- if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ if ( nIndex != 0 )
throw IndexOutOfBoundsException();
Click();
@@ -418,7 +418,7 @@ OUString VCLXAccessibleMenuItem::getAccessibleActionDescription ( sal_Int32 nInd
{
OExternalLockGuard aGuard( this );
- if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ if ( nIndex != 0 )
throw IndexOutOfBoundsException();
return OUString(RID_STR_ACC_ACTION_SELECT);
@@ -429,7 +429,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe
{
OExternalLockGuard aGuard( this );
- if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ if ( nIndex != 0 )
throw IndexOutOfBoundsException();
OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper();