[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

Michael Stahl mstahl at redhat.com
Mon Jun 24 06:01:33 PDT 2013


 svx/source/fmcomp/fmgridcl.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 748a011c3c1bdcc7b2f45ed64342c3e299ca61a9
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
    (cherry picked from commit 32e2c6456fb3bf3bf75f9b11c90193c537b4ef26)
    Reviewed-on: https://gerrit.libreoffice.org/4397
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index a864db3..374af64 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