diff options
author | Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com> | 2019-04-09 13:25:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-04-10 09:04:09 +0200 |
commit | 31454f6de1246dd465c3de2b52396a827e84ea4b (patch) | |
tree | 0fa0020c576bd7c53fa2557c5f548753ac463f7d /oox | |
parent | 87ed39e4de4a2dccbc40fdfb7edfd87d2d524d3d (diff) |
SmartArt: omit last atom in forEach loop only when necessary
now all transition arrows are created in cycle diagrams
Change-Id: I69e932f0060786b702dbecae72245bb624fa602b
Reviewed-on: https://gerrit.libreoffice.org/70457
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 4 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/layoutatomvisitors.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 336760575339..9b7d5323e518 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -221,7 +221,7 @@ namespace oox { namespace drawingml { IteratorAttr::IteratorAttr( ) : mnAxis( 0 ) , mnCnt( -1 ) - , mbHideLastTrans( false ) + , mbHideLastTrans( true ) , mnPtType( 0 ) , mnSt( 0 ) , mnStep( 1 ) @@ -233,7 +233,7 @@ void IteratorAttr::loadFromXAttr( const Reference< XFastAttributeList >& xAttr ) AttributeList attr( xAttr ); mnAxis = xAttr->getOptionalValueToken( XML_axis, 0 ); mnCnt = attr.getInteger( XML_cnt, -1 ); - mbHideLastTrans = attr.getBool( XML_hideLastTrans, false ); + mbHideLastTrans = attr.getBool( XML_hideLastTrans, true ); mnPtType = xAttr->getOptionalValueToken( XML_ptType, 0 ); mnSt = attr.getInteger( XML_st, 0 ); mnStep = attr.getInteger( XML_step, 1 ); diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx index a45317f9ffe4..b93c06c6a636 100644 --- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx +++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx @@ -48,10 +48,10 @@ void ShapeCreationVisitor::visit(AlgAtom& rAtom) void ShapeCreationVisitor::visit(ForEachAtom& rAtom) { - if (rAtom.iterator().mnAxis == XML_followSib) + if (rAtom.iterator().mbHideLastTrans && rAtom.iterator().mnAxis == XML_followSib) { - // If the axis is the follow sibling, then the last atom should not be - // visited. + // If last transition is hidden and the axis is the follow sibling, + // then the last atom should not be visited. if (mnCurrIdx + mnCurrStep >= mnCurrCnt) return; } |