VCLXAccessibleTabPageWindow: unhandled IndexOutOfBoundsException

... due to GetPagePos returning -1, work around that (can be easily
triggered in template manager).

Change-Id: Ic1334b224730d79e533539a24f115dc9aa2e9570
This commit is contained in:
Michael Stahl
2013-06-20 16:29:14 +02:00
parent 32e2c6456f
commit 35b45e6915

View File

@@ -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);
}
}
}
}