summaryrefslogtreecommitdiff
path: root/oox/source/ppt
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ppt')
-rwxr-xr-x[-rw-r--r--]oox/source/ppt/makefile.mk0
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx2
-rw-r--r--oox/source/ppt/slidepersist.cxx25
3 files changed, 8 insertions, 19 deletions
diff --git a/oox/source/ppt/makefile.mk b/oox/source/ppt/makefile.mk
index 8d902ed51337..8d902ed51337 100644..100755
--- a/oox/source/ppt/makefile.mk
+++ b/oox/source/ppt/makefile.mk
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 1d25abe5c941..66b2a9323d31 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -147,7 +147,7 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s
{
FillPropertiesPtr pFillPropertiesPtr( new FillProperties(
*mpSlidePersistPtr->getTheme()->getFillStyle( xAttribs->getOptionalValue( XML_idx ).toInt32() ) ) );
- xRet.set( new ColorContext( *this, mpSlidePersistPtr->getBackgroundColorRef() ) );
+ xRet.set( new ColorContext( *this, mpSlidePersistPtr->getBackgroundColor() ) );
mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
}
break;
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 7f8fba345bd6..622dd5dfc929 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -25,11 +25,12 @@
*
************************************************************************/
-#include "oox/helper/propertyset.hxx"
#include "oox/ppt/timenode.hxx"
#include "oox/ppt/pptshape.hxx"
#include "oox/ppt/slidepersist.hxx"
#include "oox/drawingml/fillproperties.hxx"
+#include "oox/drawingml/shapepropertymap.hxx"
+#include "oox/helper/propertyset.hxx"
#include "oox/vml/vmldrawing.hxx"
#include "oox/core/xmlfilterbase.hxx"
@@ -169,24 +170,12 @@ void SlidePersist::createBackground( const XmlFilterBase& rFilterBase )
{
if ( mpBackgroundPropertiesPtr )
{
- try
- {
- sal_Int32 nPhClr = API_RGB_TRANSPARENT;
- if ( maBackgroundColorRef.isUsed() )
- nPhClr = maBackgroundColorRef.getColor( rFilterBase.getGraphicHelper() );
+ sal_Int32 nPhClr = maBackgroundColor.isUsed() ?
+ maBackgroundColor.getColor( rFilterBase.getGraphicHelper() ) : API_RGB_TRANSPARENT;
- PropertyMap aPropMap;
- static const rtl::OUString sBackground( RTL_CONSTASCII_USTRINGPARAM( "Background" ) );
- uno::Reference< beans::XPropertySet > xPagePropSet( mxPage, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xPropertySet( aPropMap.makePropertySet() );
- PropertySet aPropSet( xPropertySet );
- mpBackgroundPropertiesPtr->pushToPropSet( aPropSet, rFilterBase.getModelObjectHelper(),
- rFilterBase.getGraphicHelper(), oox::drawingml::FillProperties::DEFAULT_IDS, 0, nPhClr );
- xPagePropSet->setPropertyValue( sBackground, Any( xPropertySet ) );
- }
- catch( Exception )
- {
- }
+ ::oox::drawingml::ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper() );
+ mpBackgroundPropertiesPtr->pushToPropMap( aPropMap, rFilterBase.getGraphicHelper(), 0, nPhClr );
+ PropertySet( mxPage ).setProperty( PROP_Background, aPropMap.makePropertySet() );
}
}