diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index b2cf10c3731d..83a07f341db4 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2138,12 +2138,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 ); } } } |