chart2/qa/extras/chart2import.cxx         |   19 +++++++++++++++++++
 chart2/qa/extras/data/docx/tdf124243.docx |binary
 xmloff/source/chart/SchXMLAxisContext.cxx |    4 +---
 3 files changed, 20 insertions(+), 3 deletions(-)

New commits:
commit e8c7f4cd5bd95b8112c1795ed11b7ac7caed00a2
Author:     Balazs Varga <balazs.varga...@gmail.com>
AuthorDate: Tue Aug 13 22:53:40 2019 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Wed Aug 14 09:06:10 2019 +0200

    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 <nem...@numbertext.org>
    Tested-by: László Németh <nem...@numbertext.org>

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
new file mode 100644
index 000000000000..e58ef6a02e45
Binary files /dev/null and b/chart2/qa/extras/data/docx/tdf124243.docx differ
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx 
b/xmloff/source/chart/SchXMLAxisContext.cxx
index f55877609937..881fa4d274fb 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -391,9 +391,7 @@ void SchXMLAxisContext::CreateAxis()
             break;
         case SCH_XML_AXIS_Z:
             if( m_aCurrentAxis.nAxisIndex == 0 )
-                aPropName = "HasXAxis";
-            else
-                aPropName = "HasSecondaryXAxis";
+                aPropName = "HasZAxis";
             break;
         case SCH_XML_AXIS_UNDEF:
             SAL_INFO("xmloff.chart", "Invalid axis" );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to