diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-03-06 10:29:03 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-04-09 11:12:22 +0200 |
commit | 40d83914d43f60a196dfabddea0b52e2046b333a (patch) | |
tree | 86165bf504f42aba1195249c48f0a109722e23b3 /chart2/qa/extras | |
parent | 31de39108ce19c002ab4ef6ab369dd5bfa668634 (diff) |
tdf#127792 implement UNO chart attribute MajorOrigin
based on the specification in OFFICE-3936 for ODF 1.4:
https://issues.oasis-open.org/browse/OFFICE-3936
Note: import of the embedded chart of the DOCX unit test
document uses also ODF format in the background, testing
also the extension of the native file format.
Follow-up of commit 830e539547c463b932ce643517f880789185032d
(tdf#127393 OOXML chart import: fix X axis position setting
"CrossBetween"). See also commits with "ShiftedCategoryPosition"
in their descriptions.
Change-Id: I9cd278ac0172c0fab7c51d585a65c34a0ad60b82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90081
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/qa/extras')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 23 | ||||
-rw-r--r-- | chart2/qa/extras/data/docx/MSO_axis_position.docx | bin | 0 -> 41444 bytes |
2 files changed, 20 insertions, 3 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 589225e8cd2e..8e2e1a84bcf9 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -133,7 +133,7 @@ public: void testCrossBetweenODS(); void testAxisTitleRotationXLSX(); void testAxisTitlePositionDOCX(); - void testAxisCrossBetweenXSLX(); + void testAxisCrossBetweenDOCX(); void testPieChartDataPointExplosionXLSX(); void testCustomDataLabel(); void testCustomPositionofDataLabel(); @@ -161,6 +161,7 @@ public: void testTdf130225(); void testTdf126076(); void testTdf75330(); + void testTdf127792(); CPPUNIT_TEST_SUITE(Chart2ExportTest); CPPUNIT_TEST(testErrorBarXLSX); @@ -257,7 +258,7 @@ public: CPPUNIT_TEST(testCrossBetweenODS); CPPUNIT_TEST(testAxisTitleRotationXLSX); CPPUNIT_TEST(testAxisTitlePositionDOCX); - CPPUNIT_TEST(testAxisCrossBetweenXSLX); + CPPUNIT_TEST(testAxisCrossBetweenDOCX); CPPUNIT_TEST(testPieChartDataPointExplosionXLSX); CPPUNIT_TEST(testCustomDataLabel); CPPUNIT_TEST(testCustomPositionofDataLabel); @@ -285,6 +286,7 @@ public: CPPUNIT_TEST(testTdf130225); CPPUNIT_TEST(testTdf126076); CPPUNIT_TEST(testTdf75330); + CPPUNIT_TEST(testTdf127792); CPPUNIT_TEST_SUITE_END(); @@ -2105,7 +2107,7 @@ void Chart2ExportTest::testAxisTitlePositionDOCX() CPPUNIT_ASSERT_DOUBLES_EQUAL(0.384070199122511, nY, 1e-2); } -void Chart2ExportTest::testAxisCrossBetweenXSLX() +void Chart2ExportTest::testAxisCrossBetweenDOCX() { load("/chart2/qa/extras/data/odt/", "axis-position.odt"); xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); @@ -2634,6 +2636,21 @@ void Chart2ExportTest::testTdf75330() } } +void Chart2ExportTest::testTdf127792() +{ + load("/chart2/qa/extras/data/docx/", "MSO_axis_position.docx"); + { + xmlDocPtr pXmlDoc = parseExport("word/charts/chart1", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "between"); + } + { + xmlDocPtr pXmlDoc = parseExport("word/charts/chart2", "Office Open XML Text"); + CPPUNIT_ASSERT(pXmlDoc); + assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:valAx/c:crossBetween", "val", "midCat"); + } +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/docx/MSO_axis_position.docx b/chart2/qa/extras/data/docx/MSO_axis_position.docx Binary files differnew file mode 100644 index 000000000000..a9955b7b1ad7 --- /dev/null +++ b/chart2/qa/extras/data/docx/MSO_axis_position.docx |