summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-20 16:29:14 +0200
committerMichael Stahl <mstahl@redhat.com>2013-06-20 17:01:32 +0200
commit35b45e6915eecfea0e21525249eabe3afd39d09e (patch)
tree9cfbb1dfd6b0b267b257a197dc8d6b40048ee034 /accessibility
parent32e2c6456fb3bf3bf75f9b11c90193c537b4ef26 (diff)
VCLXAccessibleTabPageWindow: unhandled IndexOutOfBoundsException
... due to GetPagePos returning -1, work around that (can be easily triggered in template manager). Change-Id: Ic1334b224730d79e533539a24f115dc9aa2e9570
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/standard/vclxaccessibletabpagewindow.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index 386583204f10..f63e266da231 100644
--- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ -114,7 +114,15 @@ Reference< XAccessible > VCLXAccessibleTabPageWindow::getAccessibleParent( ) th
{
Reference< XAccessibleContext > xCont( xAcc->getAccessibleContext() );
if ( xCont.is() )
- xParent = xCont->getAccessibleChild( m_pTabControl->GetPagePos( m_nPageId ) );
+ {
+ sal_uInt16 const nPagePos(m_pTabControl->GetPagePos(m_nPageId));
+ SAL_WARN_IF(TAB_PAGE_NOTFOUND == nPagePos, "accessibility",
+ "getAccessibleParent(): no tab page");
+ if (TAB_PAGE_NOTFOUND != nPagePos)
+ {
+ xParent = xCont->getAccessibleChild(nPagePos);
+ }
+ }
}
}