summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-20 16:29:14 +0200
committerDavid Tardon <dtardon@redhat.com>2013-06-24 13:01:40 +0000
commitc95f654ed26a8b640fd678b9bd1514384ad27c80 (patch)
treeb161b4ecc33d6b74e24bbd838f5266fc845eed81 /accessibility
parent748a011c3c1bdcc7b2f45ed64342c3e299ca61a9 (diff)
VCLXAccessibleTabPageWindow: unhandled IndexOutOfBoundsException
... due to GetPagePos returning -1, work around that (can be easily triggered in template manager). Change-Id: Ic1334b224730d79e533539a24f115dc9aa2e9570 (cherry picked from commit 35b45e6915eecfea0e21525249eabe3afd39d09e) Reviewed-on: https://gerrit.libreoffice.org/4398 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
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);
+ }
+ }
}
}