summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2012-02-16 20:59:57 +0530
committerMuthu Subramanian <sumuthu@suse.com>2012-02-16 21:02:14 +0530
commit5c714632583036f72377aa0fa6ed1137e53582dc (patch)
tree78c1b186b74921fd03118b34380abd6507928543 /oox
parenta86d8c5a43d94ae86d76edb2b452fbc9028f1c3c (diff)
n744503: Importing useBgFill colors for shapes.
Diffstat (limited to 'oox')
-rw-r--r--oox/source/ppt/pptshapegroupcontext.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
index cf982cf1b50d..0529ec6c9c62 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -41,6 +41,7 @@
#include "oox/drawingml/customshapegeometry.hxx"
#include "oox/drawingml/textbodycontext.hxx"
#include "oox/drawingml/connectorshapecontext.hxx"
+#include "oox/drawingml/fillproperties.hxx"
#include "extdrawingfragmenthandler.hxx"
using rtl::OUString;
@@ -108,7 +109,19 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s
xRet.set( new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GroupShape" ) ) ) );
break;
case PPT_TOKEN( sp ): // Shape
- xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.CustomShape" ) ) ) );
+ {
+ AttributeList aAttribs( xAttribs );
+ oox::drawingml::ShapePtr pShape = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.CustomShape" ) );
+ if( aAttribs.getBool( XML_useBgFill, false ) )
+ {
+ ::oox::drawingml::FillProperties &aFill = pShape->getFillProperties();
+ aFill.moFillType = XML_solidFill;
+ // This is supposed to fill with slide (background) color, but
+ // TODO: We are using white here, because thats the closest we can assume (?)
+ aFill.maFillColor.setSrgbClr( API_RGB_WHITE );
+ }
+ xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, pShape ) );
+ }
break;
case PPT_TOKEN( pic ): // CT_Picture
xRet.set( new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) ) );