From 518234a83e357d6d60bcff4b5408adb12168fad6 Mon Sep 17 00:00:00 2001 From: Gülşah Köse Date: Thu, 28 Feb 2019 12:40:50 +0300 Subject: tdf#115549 Check xPropset is exist. Checks xPropset is exist for chart handling on LibreOffice Online. Change-Id: I57947fd23e089ace4df011873613c2f886770b30 Reviewed-on: https://gerrit.libreoffice.org/68495 Reviewed-by: Andras Timar Tested-by: Andras Timar --- filter/source/svg/svgexport.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index ea9e6964590f..87fbbdee425d 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -2029,16 +2029,19 @@ bool SVGFilter::implCreateObjects() // - tiled bitmap: an image element is exported for each tile, // this is really too expensive! Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY ); - Reference< XPropertySet > xBackground; - xPropSet->getPropertyValue( "Background" ) >>= xBackground; - if( xBackground.is() ) + if( xPropSet.is() ) { - drawing::FillStyle aFillStyle; - bool assigned = ( xBackground->getPropertyValue( "FillStyle" ) >>= aFillStyle ); - if( assigned && aFillStyle != drawing::FillStyle_NONE - && aFillStyle != drawing::FillStyle_BITMAP ) + Reference< XPropertySet > xBackground; + xPropSet->getPropertyValue( "Background" ) >>= xBackground; + if( xBackground.is() ) { - implCreateObjectsFromBackground( xDrawPage ); + drawing::FillStyle aFillStyle; + bool assigned = ( xBackground->getPropertyValue( "FillStyle" ) >>= aFillStyle ); + if( assigned && aFillStyle != drawing::FillStyle_NONE + && aFillStyle != drawing::FillStyle_BITMAP ) + { + implCreateObjectsFromBackground( xDrawPage ); + } } } if( xDrawPage.is() ) -- cgit v1.2.3