diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index dd762a9bc77a..e768bebf362d 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -1047,16 +1047,19 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode rShape->setTextBody(pTextBody); } - TextParagraph& rPara=pTextBody->addParagraph(); - if( aVecIter->second != -1 ) - rPara.getProperties().setLevel(aVecIter->second); - - std::shared_ptr<TextParagraph> pSourceParagraph - = aDataNode2->second->mpShape->getTextBody()->getParagraphs().front(); - for (const auto& pRun : pSourceParagraph->getRuns()) - rPara.addRun(pRun); - rPara.getProperties().apply( - aDataNode2->second->mpShape->getTextBody()->getParagraphs().front()->getProperties()); + const TextParagraphVector& rSourceParagraphs + = aDataNode2->second->mpShape->getTextBody()->getParagraphs(); + for (const auto& pSourceParagraph : rSourceParagraphs) + { + TextParagraph& rPara = pTextBody->addParagraph(); + if (aVecIter->second != -1) + rPara.getProperties().setLevel(aVecIter->second); + + for (const auto& pRun : pSourceParagraph->getRuns()) + rPara.addRun(pRun); + const TextBodyPtr& rBody = aDataNode2->second->mpShape->getTextBody(); + rPara.getProperties().apply(rBody->getParagraphs().front()->getProperties()); + } } ++aVecIter; |