diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2019-08-13 22:53:40 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-08-14 09:06:10 +0200 |
commit | e8c7f4cd5bd95b8112c1795ed11b7ac7caed00a2 (patch) | |
tree | d6026a472f3dcacd5d34061676e4e5b999686d5c /chart2 | |
parent | a1e65b1a4bb73dc5c2c72a70518abf521d42b4df (diff) |
tdf#124243 fix import of deleted X axis of 3D charts
3D charts imported from ODF and DOCX showed the deleted X axis.
Change-Id: I3316d08af3acd122e5f75fbf0031dda6a337edbd
Reviewed-on: https://gerrit.libreoffice.org/77432
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 19 | ||||
-rw-r--r-- | chart2/qa/extras/data/docx/tdf124243.docx | bin | 0 -> 25872 bytes |
2 files changed, 19 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 90a1bd8485cf..116a0a93519f 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -128,6 +128,7 @@ public: void testTdf121205(); void testTdf114179(); + void testTdf124243(); void testDeletedDataLabel(); void testDataPointInheritedColorDOCX(); void testExternalStrRefsXLSX(); @@ -215,6 +216,7 @@ public: CPPUNIT_TEST(testTdf121205); CPPUNIT_TEST(testTdf114179); + CPPUNIT_TEST(testTdf124243); CPPUNIT_TEST(testDeletedDataLabel); CPPUNIT_TEST(testDataPointInheritedColorDOCX); CPPUNIT_TEST(testExternalStrRefsXLSX); @@ -1908,6 +1910,23 @@ void Chart2ImportTest::testTdf114179() CPPUNIT_ASSERT( aSize.Height > 0); } +void Chart2ImportTest::testTdf124243() +{ + load("/chart2/qa/extras/data/docx/", "tdf124243.docx"); + uno::Reference< chart2::XChartDocument > xChartDoc(getChartDocFromWriter(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + + Reference<chart2::XAxis> xAxis = getAxisFromDoc(xChartDoc, 0, 0, 0); + CPPUNIT_ASSERT(xAxis.is()); + + Reference<beans::XPropertySet> xPS(xAxis, uno::UNO_QUERY_THROW); + bool bShow = true; + // test X Axis is not visible. + bool bSuccess = xPS->getPropertyValue("Show") >>= bShow; + CPPUNIT_ASSERT(bSuccess); + CPPUNIT_ASSERT(!bShow); +} + namespace { void checkDataLabelProperties(const Reference<chart2::XDataSeries>& xDataSeries, sal_Int32 nDataPointIndex, bool bValueVisible) diff --git a/chart2/qa/extras/data/docx/tdf124243.docx b/chart2/qa/extras/data/docx/tdf124243.docx Binary files differnew file mode 100644 index 000000000000..e58ef6a02e45 --- /dev/null +++ b/chart2/qa/extras/data/docx/tdf124243.docx |