summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/diagram/layoutnodecontext.cxx
diff options
context:
space:
mode:
authorGrzegorz Araminowicz <grzegorz.araminowicz@collabora.com>2019-06-11 08:31:18 +0200
committerGrzegorz Araminowicz <grzegorz.araminowicz@collabora.com>2019-06-18 16:10:50 +0200
commit76478f9938a5f6d96ac65b3b633280024b60baed (patch)
treec9bb6beb396a19cd2e3005cc97b946be724e9e2b /oox/source/drawingml/diagram/layoutnodecontext.cxx
parent27e3ed0d25735603d2c82744e3a8f5f3e0a8d043 (diff)
SmartArt: support ForEach references
ForEach 'ref' parameter causes specified ForEach node to be used instead. Used to create recursive structures like organisation charts. Change-Id: Iee61b2e103759355b59beb8d3f33eb3cce47c590 Reviewed-on: https://gerrit.libreoffice.org/74271 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
Diffstat (limited to 'oox/source/drawingml/diagram/layoutnodecontext.cxx')
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index e984862c44b4..8e3e3c2f6eb4 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -141,8 +141,11 @@ public:
ForEachContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, const ForEachAtomPtr& pAtom )
: LayoutNodeContext( rParent, rAttribs, pAtom )
{
- rAttribs.getString( XML_ref );
+ pAtom->setRef(rAttribs.getString(XML_ref).get());
pAtom->iterator().loadFromXAttr( rAttribs.getFastAttributeList() );
+
+ LayoutAtomMap& rLayoutAtomMap = pAtom->getLayoutNode().getDiagram().getLayout()->getLayoutAtomMap();
+ rLayoutAtomMap[pAtom->getName()] = pAtom;
}
};