Skip to content

Commit

Permalink
tdf#115549 Check xPropset is exist.
Browse files Browse the repository at this point in the history
Checks xPropset is exist for chart handling on LibreOffice Online.

Change-Id: I57947fd23e089ace4df011873613c2f886770b30
Reviewed-on: https://gerrit.libreoffice.org/68495
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
  • Loading branch information
GulsahKose authored and timar committed Feb 28, 2019
1 parent 68c8b98 commit 518234a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions filter/source/svg/svgexport.cxx
Expand Up @@ -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() )
Expand Down

0 comments on commit 518234a

Please sign in to comment.