[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sc/source

Justin Luth justin_luth at sil.org
Fri May 26 19:04:56 UTC 2017


 sc/source/ui/vba/vbarange.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f82a36749a9df51d2344e4acb88f0e53b39f8e72
Author: Justin Luth <justin_luth at sil.org>
Date:   Wed May 24 12:48:12 2017 +0300

    tdf#108049 VBA exception avoided in ScVbaRange::setStyle
    
    Change-Id: I5fc928373d70829b6e68d9000140a30f04179536
    Reviewed-on: https://gerrit.libreoffice.org/37981
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 4dc3e7d5e9044be66177e467d739bd8be7556783)
    Reviewed-on: https://gerrit.libreoffice.org/38063
    (cherry picked from commit bb9c240046955c432d963610d5dd99edcc6b43e6)
    Reviewed-on: https://gerrit.libreoffice.org/38083
    Tested-by: Justin Luth <justin_luth at sil.org>

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index af3a4e6c48e1..955d35a2c4e8 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -5270,7 +5270,8 @@ ScVbaRange::setStyle( const uno::Any& _style ) throw (uno::RuntimeException, std
     uno::Reference< beans::XPropertySet > xProps( mxRange, uno::UNO_QUERY_THROW );
     uno::Reference< excel::XStyle > xStyle;
     _style >>= xStyle;
-    xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) );
+    if ( xProps.is() && xStyle.is() )
+        xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) );
 }
 
 uno::Reference< excel::XRange >


More information about the Libreoffice-commits mailing list