From 554158f7d33742284905ed4953dd09041ea04a5d Mon Sep 17 00:00:00 2001 From: Matus Uzak Date: Sat, 9 Apr 2016 00:43:56 +0200 Subject: tdf#99030: PPTX import: Fixed lost slide background color Regression from commit f3d1ac7 Change-Id: I5cb9fe1bb6c753c34b49e72194a9fbe4c10c1654 Reviewed-on: https://gerrit.libreoffice.org/23930 Tested-by: Jenkins Reviewed-by: Katarina Behrens --- oox/source/ppt/slidefragmenthandler.cxx | 3 ++- oox/source/ppt/slidepersist.cxx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx index 63274c10c236..fc8ff5d1e46d 100644 --- a/oox/source/ppt/slidefragmenthandler.cxx +++ b/oox/source/ppt/slidefragmenthandler.cxx @@ -170,7 +170,8 @@ SlideFragmentHandler::~SlideFragmentHandler() pFillProperties = mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) ); FillPropertiesPtr pFillPropertiesPtr( pFillProperties ? new FillProperties( *pFillProperties ) : new FillProperties() ); mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr ); - return this; + ContextHandlerRef ret = new ColorContext( *this, mpSlidePersistPtr->getBackgroundColor() ); + return ret; } break; diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 9064a67aecf7..574892aca6f7 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -167,7 +167,8 @@ void SlidePersist::createBackground( const XmlFilterBase& rFilterBase ) { if ( mpBackgroundPropertiesPtr ) { - sal_Int32 nPhClr = mpBackgroundPropertiesPtr->getBestSolidColor().getColor( rFilterBase.getGraphicHelper() ); + sal_Int32 nPhClr = maBackgroundColor.isUsed() ? + maBackgroundColor.getColor( rFilterBase.getGraphicHelper() ) : API_RGB_TRANSPARENT; ::oox::drawingml::ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper() ); mpBackgroundPropertiesPtr->pushToPropMap( aPropMap, rFilterBase.getGraphicHelper(), 0, nPhClr ); -- cgit v1.2.3