oox/source/ppt/pptshapegroupcontext.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
New commits: commit 5c714632583036f72377aa0fa6ed1137e53582dc Author: Muthu Subramanian <sumu...@suse.com> Date: Thu Feb 16 20:59:57 2012 +0530 n744503: Importing useBgFill colors for shapes. diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx index cf982cf..0529ec6 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" ) ) ) ); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits