diff options
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/layoutatomvisitors.cxx | 3 | ||||
-rw-r--r-- | oox/source/drawingml/shape.cxx | 6 |
3 files changed, 11 insertions, 0 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 1d6259ef698a..4cf36186322c 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -1258,6 +1258,8 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode " processing shape type " << rShape->getCustomShapeProperties()->getShapePresetType() << " for layout node named \"" << msName << "\""); + if (pPresNode->mpShape) + rShape->getFillProperties().assignUsed(pPresNode->mpShape->getFillProperties()); } // TODO(Q1): apply styling & coloring - take presentation diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx index a73b6566bafe..ff37f816d789 100644 --- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx +++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx @@ -272,6 +272,9 @@ void ShapeTemplateVisitor::visit(ShapeAtom& rAtom) // TODO(F3): cloned shape shares all properties by reference, // don't change them! mpShape.reset(new Shape(pCurrShape)); + // Fill properties have to be changed as sometimes only the presentation node contains the blip + // fill, unshare those. + mpShape->cloneFillProperties(); } void ShapeLayoutingVisitor::defaultVisit(LayoutAtom const & rAtom) diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index b01aa8ac51ce..ac137e6f7d2f 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1796,6 +1796,12 @@ uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfTypeFro return xRelListTemp; } +void Shape::cloneFillProperties() +{ + auto pFillProperties = std::make_shared<FillProperties>(); + pFillProperties->assignUsed(*mpFillPropertiesPtr); + mpFillPropertiesPtr = pFillProperties; +} } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |