[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source

Caolán McNamara caolanm at redhat.com
Wed Aug 13 04:58:54 PDT 2014


 sw/source/core/unocore/unotext.cxx |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

New commits:
commit f75e494ad9b9a3ef6257e8eda452ab2cb9c7d6ad
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 12 12:06:49 2014 +0100

    Resolves: fdo#81046 don't crash on compilers that enforce exception specs
    
    bit of a hammer here, the offending property is "IsSplitAllowed" if someone
    wants to attempt a more subtle fix
    
    Change-Id: I37ed623a9947473fcb5c9e2b987d7a3dd9147ffa
    (cherry picked from commit b59931d8a62f761022929f58f27d7ba22536b570)
    Reviewed-on: https://gerrit.libreoffice.org/10885
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 93952c8..cd31f50 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2136,12 +2136,20 @@ lcl_ApplyCellProperties(
                 xCellCurs->gotoEnd( sal_True );
                 const uno::Reference< beans::XPropertyState >
                     xCellTextPropState(xCellCurs, uno::UNO_QUERY);
-                const beans::PropertyState state = xCellTextPropState->getPropertyState(rName);
-                if (state == beans::PropertyState_DEFAULT_VALUE)
+                try
                 {
-                    const uno::Reference< beans::XPropertySet >
-                        xCellTextProps(xCellCurs, uno::UNO_QUERY);
-                    xCellTextProps->setPropertyValue(rName, rValue);
+                    const beans::PropertyState state = xCellTextPropState->getPropertyState(rName);
+                    if (state == beans::PropertyState_DEFAULT_VALUE)
+                    {
+                        const uno::Reference< beans::XPropertySet >
+                            xCellTextProps(xCellCurs, uno::UNO_QUERY);
+                        xCellTextProps->setPropertyValue(rName, rValue);
+                    }
+                }
+                catch (const uno::Exception& e)
+                {
+                    SAL_WARN( "sw.uno", "Exception when getting PropertyState: "
+                        + rName + ". Message: " + e.Message );
                 }
             }
         }


More information about the Libreoffice-commits mailing list