[Libreoffice-commits] core.git: 2 commits - accessibility/source svx/source

Michael Stahl mstahl at redhat.com
Thu Jun 20 08:11:24 PDT 2013


 accessibility/source/standard/vclxaccessibletabpagewindow.cxx |   10 +++++++++-
 svx/source/fmcomp/fmgridcl.cxx                                |    9 ++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 35b45e6915eecfea0e21525249eabe3afd39d09e
Author: Michael Stahl <mstahl at 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

diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index 3865832..f63e266 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);
+                }
+            }
         }
     }
 
commit 32e2c6456fb3bf3bf75f9b11c90193c537b4ef26
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jun 20 15:02:37 2013 +0200

    FmGridControl:  handle non-existing properties
    
    Fix crash with unhandled exception requesting "Description".
    
    Change-Id: I6b6cb61273fb042532ab63620729f4129239fe81

diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index ed3b2aa..4ea2577 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1908,7 +1908,14 @@ namespace
                 Reference<XPropertySet> xProp;
                 xIndex->getByIndex( _nPosition ) >>= xProp;
                 if ( xProp.is() )
-                    xProp->getPropertyValue( _sPropName ) >>= sRetText;
+                {
+                    try {
+                        xProp->getPropertyValue( _sPropName ) >>= sRetText;
+                    } catch (UnknownPropertyException const& e) {
+                        SAL_WARN("svx.form",
+                                "exception caught: " << e.Message);
+                    }
+                }
             }
         }
         return sRetText;


More information about the Libreoffice-commits mailing list