diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-08-07 19:31:20 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-08-07 19:32:35 -0400 |
commit | 5c5f083186a787bbfbcf125f856f96efcd2e025c (patch) | |
tree | d4359029ffa0b2fe8a240bcee1c1b02e6985ab12 /chart2/qa | |
parent | 7b8073906adca8dae24c04a23708a3f3d582218f (diff) |
Another test for radar chart data label export.
This one doesn't support label placement property either.
Change-Id: If1f17a135eabd810033644e27db6b1e5c049daff
Diffstat (limited to 'chart2/qa')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 17 | ||||
-rwxr-xr-x | chart2/qa/extras/data/docx/radar-chart-labels.docx | bin | 0 -> 24223 bytes |
2 files changed, 17 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index a76b43da788c..280d2fc88e5b 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -72,6 +72,7 @@ public: void testDataLabelBordersDOCX(); void testDataLabel3DChartDOCX(); void testDataLabelBarChartDOCX(); + void testDataLabelRadarChartDOCX(); void testDataLabelDoughnutChartDOCX(); void testDataLabelAreaChartDOCX(); void testDataLabelDefaultLineChartDOCX(); @@ -112,6 +113,7 @@ public: CPPUNIT_TEST(testDataLabelBordersDOCX); CPPUNIT_TEST(testDataLabel3DChartDOCX); CPPUNIT_TEST(testDataLabelBarChartDOCX); + CPPUNIT_TEST(testDataLabelRadarChartDOCX); CPPUNIT_TEST(testDataLabelDoughnutChartDOCX); CPPUNIT_TEST(testDataLabelAreaChartDOCX); CPPUNIT_TEST(testDataLabelDefaultLineChartDOCX); @@ -843,6 +845,21 @@ void Chart2ExportTest::testDataLabelBarChartDOCX() assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:dLbls/c:dLblPos", "val", "inBase"); } +void Chart2ExportTest::testDataLabelRadarChartDOCX() +{ + load("/chart2/qa/extras/data/docx/", "radar-chart-labels.docx"); + + Reference<chart2::XChartDocument> xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xChartDoc.is()); + + xmlDocPtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + + // We must not export label position attributes for radar charts. + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLblPos", 0); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:radarChart/c:ser/c:dLbls/c:dLbl/c:dLblPos", 0); +} + void Chart2ExportTest::testDataLabelDoughnutChartDOCX() { load("/chart2/qa/extras/data/docx/", "doughnut-chart-labels.docx"); diff --git a/chart2/qa/extras/data/docx/radar-chart-labels.docx b/chart2/qa/extras/data/docx/radar-chart-labels.docx Binary files differnew file mode 100755 index 000000000000..2cb876dd263f --- /dev/null +++ b/chart2/qa/extras/data/docx/radar-chart-labels.docx |