summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-08-04 10:58:00 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-08-05 11:26:42 +0200
commit06afd008a453b261b120062589b0b961acdaadd3 (patch)
treeecfd69f0d24d3e06d0a684dbf60d235bf98e6953 /sd
parent1a16bb0de0d40084fdbcb5d7a875037b34e336e4 (diff)
oox smartart: add support for <dgm:layoutNode ... chOrder="t">
This changes the order of children, which matters when they have no explicit ZOrder. With this, the text shapes on the arrow shape are on top of the arrow, not behind it. The trick is that nominally chOrder can be "t"(op) or "b"(ottom), defaulting to bottom, but there is a difference between an explicit "b" and not setting it. When not setting it, the layout node is expected to inherit it from its parent layout node, recursively. This would probably make sense for other algorithms as well, but set it only for the linear algorithm for now, as that's where we have a bug document showing the PowerPoint behavior. (cherry picked from commit 3c185bf386b4c9609ab32d19bf95b83fe0eeeea3) Change-Id: I433f92c620149ef5590aebc8cbf43110e1d2fb85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100107 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index c8825f15fcc4..28dafbc1d9af 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -1516,8 +1516,9 @@ void SdImportTestSmartArt::testLinearRule()
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-linear-rule.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
- // Last child, then again last child.
- uno::Reference<drawing::XShape> xShape = getChildShape(getChildShape(xGroup, 1), 3);
+ // Last child, then first child inside that.
+ // It is first as backgroundArrow is last, but chOrder="t" is set to reverse the order.
+ uno::Reference<drawing::XShape> xShape = getChildShape(getChildShape(xGroup, 1), 0);
// Without the accompanying fix in place, this test would have failed with:
// - Expected greater than: 17500 (19867)