summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-05-20 21:10:41 +0200
committerLászló Németh <nemeth@numbertext.org>2020-05-25 14:40:14 +0200
commit74d020fb1344dd904681b612739727351f183b78 (patch)
tree12f03628ee075ee159bd960828672e39fe1fb0af /chart2
parent03f43a7e82c86205552c9a05449b966b799410d5 (diff)
tdf#133190 tdf#133191 Chart OOXML export: fix text wrap and rotation
of data point labels. Change-Id: Ic61d9ee149e838c000b5dc9ac0411bbe0f07219a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94598 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/qa/extras/chart2export.cxx25
-rw-r--r--chart2/qa/extras/data/xlsx/tdf133190_tdf133191.xlsxbin0 -> 12142 bytes
2 files changed, 25 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 08086d8ae2ab..429ea41c5a5a 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -168,6 +168,8 @@ public:
void testTdf131979();
void testTdf132076();
void testTdf125812();
+ void testTdf133190();
+ void testTdf133191();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(testErrorBarXLSX);
@@ -299,6 +301,8 @@ public:
CPPUNIT_TEST(testTdf131979);
CPPUNIT_TEST(testTdf132076);
CPPUNIT_TEST(testTdf125812);
+ CPPUNIT_TEST(testTdf133190);
+ CPPUNIT_TEST(testTdf133191);
CPPUNIT_TEST_SUITE_END();
@@ -2766,6 +2770,27 @@ void Chart2ExportTest::testTdf125812()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill/a:path/a:fillToRect", "b", "51000");
}
+void Chart2ExportTest::testTdf133190()
+{
+ load("/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Test word wrap of data point label
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[1]/c:txPr/a:bodyPr", "wrap", "none");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[2]/c:txPr/a:bodyPr", "wrap", "square");
+}
+
+void Chart2ExportTest::testTdf133191()
+{
+ load("/chart2/qa/extras/data/xlsx/", "tdf133190_tdf133191.xlsx");
+ xmlDocUniquePtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // Test rotation of data point label
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:pieChart/c:ser/c:dLbls/c:dLbl[3]/c:txPr/a:bodyPr", "rot", "-4500000");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/tdf133190_tdf133191.xlsx b/chart2/qa/extras/data/xlsx/tdf133190_tdf133191.xlsx
new file mode 100644
index 000000000000..f8cad0e8cfec
--- /dev/null
+++ b/chart2/qa/extras/data/xlsx/tdf133190_tdf133191.xlsx
Binary files differ