summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-02-19 17:58:42 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-02-19 19:36:31 +0100
commitecb733da58b74714eb66d2063a2835ce5c471870 (patch)
treefc251161ced6f76acda7be863bcd6eef7ecc6d6a /sd/qa
parent92849660e21d5a13fb671339e52cbc30335ab842 (diff)
oox smartart, cycle matrix: handle destination order in connections
It is possible to have connections from multiple data nodes to the same presentation node with a presOf type. We use to order these based on as they appear in the data XML, but we need to order them according to the destOrd attribute. Introduce an std::map for that, so get ordering automatically as we iterate. Turn the std::pair into a struct to make the code a bit more readable. Change-Id: I3d2bb047ed3f171a194851f89151bd94071a8176 Reviewed-on: https://gerrit.libreoffice.org/68027 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/data/pptx/smartart-cycle-matrix.pptxbin61703 -> 56920 bytes
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx4
2 files changed, 3 insertions, 1 deletions
diff --git a/sd/qa/unit/data/pptx/smartart-cycle-matrix.pptx b/sd/qa/unit/data/pptx/smartart-cycle-matrix.pptx
index d154e7f64bc0..76b771644cbb 100644
--- a/sd/qa/unit/data/pptx/smartart-cycle-matrix.pptx
+++ b/sd/qa/unit/data/pptx/smartart-cycle-matrix.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 29b8ae2d7469..2138b2ccf33b 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -853,7 +853,9 @@ void SdImportTestSmartArt::testCycleMatrix()
uno::Reference<text::XText> xC2(getChildShape(getChildShape(getChildShape(xGroup, 0), 2), 1),
uno::UNO_QUERY);
CPPUNIT_ASSERT(xC2.is());
- CPPUNIT_ASSERT_EQUAL(OUString("C2"), xC2->getString());
+ // Without the accompanying fix in place, this test would have failed, i.e. the order of the
+ // lines in the shape were wrong: C2-1\nC2-4\nC2-3\nC2-2.
+ CPPUNIT_ASSERT_EQUAL(OUString("C2-1\nC2-2\nC2-3\nC2-4"), xC2->getString());
uno::Reference<drawing::XShape> xC2Shape(xC2, uno::UNO_QUERY);
CPPUNIT_ASSERT(xC2Shape.is());