diff options
author | Muthu Subramanian <sumuthu@suse.com> | 2012-02-16 20:59:57 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@suse.com> | 2012-02-16 21:02:14 +0530 |
commit | 5c714632583036f72377aa0fa6ed1137e53582dc (patch) | |
tree | 78c1b186b74921fd03118b34380abd6507928543 /oox | |
parent | Remove lodownloadtest.py trailing white spaces (diff) | |
download | core-5c714632583036f72377aa0fa6ed1137e53582dc.tar.gz core-5c714632583036f72377aa0fa6ed1137e53582dc.zip |
n744503: Importing useBgFill colors for shapes.
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ppt/pptshapegroupcontext.cxx | 15 |
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" ) ) ) ); |