summaryrefslogtreecommitdiff
path: root/accessibility/source/standard/vclxaccessiblebutton.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblebutton.cxx')
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index df67584bdccc..c95004327f86 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -187,7 +187,7 @@ sal_Bool VCLXAccessibleButton::doAccessibleAction ( sal_Int32 nIndex )
{
OExternalLockGuard aGuard( this );
- if ( nIndex != 0 )
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
VclPtr< PushButton > pButton = GetAs< PushButton >();
@@ -202,7 +202,7 @@ OUString VCLXAccessibleButton::getAccessibleActionDescription ( sal_Int32 nIndex
{
OExternalLockGuard aGuard( this );
- if ( nIndex != 0 )
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
return OUString(RID_STR_ACC_ACTION_CLICK);
@@ -213,7 +213,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleButton::getAccessibleActionKeyB
{
OExternalLockGuard aGuard( this );
- if ( nIndex != 0 )
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper();