From 6da534c3bd944509d0666e8c6a94c3c707fbc006 Mon Sep 17 00:00:00 2001 From: Vasily Melenchuk Date: Thu, 1 Nov 2018 17:37:21 +0100 Subject: tdf#121205: Convert to newline chars in chart title Reviewed-on: https://gerrit.libreoffice.org/62752 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 57d4cd80dcaf01fe4897d79d89e906d355410243) Reviewed-on: https://gerrit.libreoffice.org/62990 Reviewed-by: Thorsten Behrens (cherry picked from commit a1ea94fde40b82d0ec7ec842bf44cdeeea676aca) Change-Id: I43d14025c48878c5bc035d492623f4fc52426e5e --- chart2/qa/extras/chart2import.cxx | 16 ++++++++++++++++ chart2/qa/extras/data/pptx/tdf121205.pptx | Bin 0 -> 42922 bytes 2 files changed, 16 insertions(+) create mode 100644 chart2/qa/extras/data/pptx/tdf121205.pptx (limited to 'chart2') diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 1f73eea90977..428f3f801a53 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -109,6 +109,7 @@ public: void testTdf115107(); // import complex data point labels void testTdf115107_2(); // import complex data point labels in cobo charts with multiple data series + void testTdf121205(); CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); @@ -172,6 +173,7 @@ public: CPPUNIT_TEST(testTdf115107); CPPUNIT_TEST(testTdf115107_2); + CPPUNIT_TEST(testTdf121205); CPPUNIT_TEST_SUITE_END(); @@ -1567,6 +1569,20 @@ void Chart2ImportTest::testTdf115107_2() CPPUNIT_ASSERT_EQUAL(OUString("Line"), aFields[2]->getString()); } +void Chart2ImportTest::testTdf121205() +{ + load("/chart2/qa/extras/data/pptx/", "tdf121205.pptx"); + Reference xChartDoc(getChartDocFromDrawImpress(0, 0), uno::UNO_QUERY); + + uno::Reference xTitled(xChartDoc, uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_MESSAGE("chart doc does not have title", xTitled.is()); + OUString aTitle = getTitleString(xTitled); + + // We expect title splitted in 3 lines + CPPUNIT_ASSERT_EQUAL(OUString("Firstline\nSecondline\nThirdline"), aTitle); +} + + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/pptx/tdf121205.pptx b/chart2/qa/extras/data/pptx/tdf121205.pptx new file mode 100644 index 000000000000..e60849ec02e0 Binary files /dev/null and b/chart2/qa/extras/data/pptx/tdf121205.pptx differ -- cgit