diff options
Diffstat (limited to 'oox/source/drawingml/diagram/diagram.cxx')
-rw-r--r-- | oox/source/drawingml/diagram/diagram.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index d1de1c72f94d..8efefe139dbf 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -29,6 +29,7 @@ #include <drawingml/textrun.hxx> #include <drawingml/diagram/diagram.hxx> #include <drawingml/fillproperties.hxx> +#include <drawingml/customshapeproperties.hxx> #include <oox/ppt/pptshapegroupcontext.hxx> #include <oox/ppt/pptshape.hxx> #include <oox/token/namespaces.hxx> @@ -317,6 +318,16 @@ void Diagram::addTo( const ShapePtr & pParentShape ) ShapeLayoutingVisitor aLayoutingVisitor; mpLayout->getNode()->accept(aLayoutingVisitor); } + + ShapePtr pBackground(new Shape("com.sun.star.drawing.CustomShape")); + pBackground->setSubType(XML_rect); + pBackground->getCustomShapeProperties()->setShapePresetType(XML_rect); + pBackground->setSize(pParentShape->getSize()); + pBackground->getFillProperties() = *mpData->getFillProperties(); + pBackground->setLocked(true); + auto& aChildren = pParentShape->getChildren(); + aChildren.insert(aChildren.begin(), pBackground); + pParentShape->setDiagramDoms( getDomsAsPropertyValues() ); } |