diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-08-07 00:42:57 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-08-07 01:48:42 +0200 |
commit | 88179e3de8865ea07d5017ca0723afd10ad44ba7 (patch) | |
tree | aaa9a13e388deb74a8d9c30deb6f52d9169d2dea /accessibility/source/standard/vclxaccessiblemenuitem.cxx | |
parent | 00a87bab22eff26df423001897afc79009593d42 (diff) |
Revert "accessibility: remove useless calls to getAccessibleActionCount."
This reverts commit e2c14a6caabbb6413ae7b1e631a0a89f7b2ba4c7.
Change-Id: I6dc99c8ad9c6f15d6b1273338d96bc7909253ad9
Reviewed-on: https://gerrit.libreoffice.org/40815
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblemenuitem.cxx')
-rw-r--r-- | accessibility/source/standard/vclxaccessiblemenuitem.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index 259501bfe4dd..60de73778696 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 ) + if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); Click(); @@ -418,7 +418,7 @@ OUString VCLXAccessibleMenuItem::getAccessibleActionDescription ( sal_Int32 nInd { OExternalLockGuard aGuard( this ); - if ( nIndex != 0 ) + if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); return OUString(RID_STR_ACC_ACTION_SELECT); @@ -429,7 +429,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe { OExternalLockGuard aGuard( this ); - if ( nIndex != 0 ) + if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) throw IndexOutOfBoundsException(); OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper(); |