sc/source/ui/vba/vbarange.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit bb9c240046955c432d963610d5dd99edcc6b43e6 Author: Justin Luth <justin_l...@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 <c...@libreoffice.org> Reviewed-by: Justin Luth <justin_l...@sil.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 4dc3e7d5e9044be66177e467d739bd8be7556783) Reviewed-on: https://gerrit.libreoffice.org/38063 diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index bb4164303798..151403fa1f31 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -5311,7 +5311,8 @@ ScVbaRange::setStyle( const uno::Any& _style ) 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 > _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits