summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-01-10 13:39:02 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-11 09:04:48 +0100
commitdfc97dd381ef516ca4a7e99b29f9da1033a380f4 (patch)
tree1c1750d7cefc04e8f7e53a1c597cd6cd061f9140 /sd/qa
parent1e3442983b44ad6042cb687dbb77bf174796a255 (diff)
oox smartart, org chart: handle multiple paragraphs on data node
This problem was similar to the one fixed in cfa76f538a44d4396574ece59e8a3953c22c6eb7 (oox smartart, accent process: handle multiple runs from a data point, 2018-11-21), but this there we handled multiple runs and this handles multiple paragraphs. It seems some smartart types allow multiple paragraphs in a diagram node, others only allow multiple runs. Org chart is in the former category. Change-Id: I281f01fdfa809d0a232d5da7fdaa23de7adcd627 Reviewed-on: https://gerrit.libreoffice.org/66066 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/data/pptx/smartart-org-chart.pptxbin53384 -> 53038 bytes
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx5
2 files changed, 4 insertions, 1 deletions
diff --git a/sd/qa/unit/data/pptx/smartart-org-chart.pptx b/sd/qa/unit/data/pptx/smartart-org-chart.pptx
index 259a9f5a1d13..df6e0521fdca 100644
--- a/sd/qa/unit/data/pptx/smartart-org-chart.pptx
+++ b/sd/qa/unit/data/pptx/smartart-org-chart.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 45cc9b6e5523..5895289ad0ce 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -698,7 +698,10 @@ void SdImportTestSmartArt::testOrgChart()
uno::Reference<text::XText> xManager(
getChildShape(getChildShape(getChildShape(xGroup, 0), 0), 0), uno::UNO_QUERY);
CPPUNIT_ASSERT(xManager.is());
- CPPUNIT_ASSERT_EQUAL(OUString("Manager"), xManager->getString());
+ // Without the accompanying fix in place, this test would have failed: this
+ // was just "Manager", and the second paragraph was lost.
+ OUString aExpected("Manager\nSecond para");
+ CPPUNIT_ASSERT_EQUAL(aExpected, xManager->getString());
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xManager, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();