summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-02-07 16:26:31 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-02-07 18:21:39 +0100
commite3c6f249c10f7f1bcc528e643f5723288c514b29 (patch)
treecc637b0e38d84d475fab371bd4b408c3907fe650 /oox
parent85fc36b9e181c99c6033c99d70cb9066aac0687a (diff)
oox smartart, cycle matrix: fix counting presentation children
The markup is: <dgm:if name="Name6" axis="ch ch" ptType="node node" st="1 1" cnt="1 0" func="cnt" op="gte" val="1"> Where PowerPoint evaluated the condition to true, but Impress evaluated to false. This means that the undocumented relation between the child lists is "OR" (not "AND"). Also, our code assumed that "node" has to be a data node (not presentation node), but it seems the only way this condition can be true if presentation children is also counted. (The presentation node in question is not a presentation of anything.) Change-Id: I094b44351aeb8058cd50753f46fcdac7a88b35cd Reviewed-on: https://gerrit.libreoffice.org/67510 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index edc87ca7b0ce..2b17bee2a65d 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -370,6 +370,14 @@ sal_Int32 ConditionAtom::getNodeCount() const
if (aCxn.mnType == XML_parOf && aCxn.msSourceId == sNodeId)
nCount++;
}
+ else
+ {
+ // No presentation child is a presentation of a model node: just
+ // count presentation children.
+ for (const auto& aCxn : mrLayoutNode.getDiagram().getData()->getConnections())
+ if (aCxn.mnType == XML_presParOf && aCxn.msSourceId == pPoint->msModelId)
+ nCount++;
+ }
}
return nCount;
}