summaryrefslogtreecommitdiff
path: root/oox/source/ppt/slidepersist.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ppt/slidepersist.cxx')
-rw-r--r--oox/source/ppt/slidepersist.cxx25
1 files changed, 7 insertions, 18 deletions
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() );
}
}