accessibility/source/standard/vclxaccessibletabpagewindow.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit d4f3a3dc266ec299153058fa002857e4c242763b
Author: Michael Stahl <mst...@redhat.com>
Date:   Thu Jun 20 16:29:14 2013 +0200

    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/4400
    Reviewed-by: David Tardon <dtar...@redhat.com>
    Tested-by: David Tardon <dtar...@redhat.com>

diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx 
b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index 03aac5a..28383f3 100644
--- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ -112,7 +112,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);
+                }
+            }
         }
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to