[Libreoffice-commits] core.git: chart2/qa oox/source

Tünde Tóth (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 20 14:03:34 UTC 2020


 chart2/qa/extras/chart2export.cxx                   |   14 ++++++++++++++
 chart2/qa/extras/data/xlsx/auto_marker_excel10.xlsx |binary
 oox/source/export/chartexport.cxx                   |    2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit bae73c0726e7fdf7f427a8254c9d6d4b4c510daf
Author:     Tünde Tóth <tundeth at gmail.com>
AuthorDate: Tue Feb 11 15:16:34 2020 +0100
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Thu Feb 20 15:02:54 2020 +0100

    tdf#126076 XLSX export: fix automatic line chart markers
    
    The default automatic line chart markers in XLSX spreadsheets
    created with Microsoft Excel 2010 became squares after export.
    
    Change-Id: I58a3e10212608a356eef8fbd1e100eda4dbebaca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88461
    Tested-by: László Németh <nemeth at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>

diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 88c7d154d170..469e25618b5f 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -156,6 +156,7 @@ public:
     void testTdf123206_customLabelText();
     void testDeletedLegendEntries();
     void testTdf130225();
+    void testTdf126076();
 
     CPPUNIT_TEST_SUITE(Chart2ExportTest);
     CPPUNIT_TEST(testErrorBarXLSX);
@@ -275,6 +276,7 @@ public:
     CPPUNIT_TEST(testTdf123206_customLabelText);
     CPPUNIT_TEST(testDeletedLegendEntries);
     CPPUNIT_TEST(testTdf130225);
+    CPPUNIT_TEST(testTdf126076);
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -2516,6 +2518,18 @@ void Chart2ExportTest::testTdf130225()
     CPPUNIT_ASSERT_EQUAL(sal_Int32(1), deletedLegendEntriesSeq[0]);
 }
 
+void Chart2ExportTest::testTdf126076()
+{
+    load("/chart2/qa/extras/data/xlsx/", "auto_marker_excel10.xlsx");
+    xmlDocPtr pXmlDoc = parseExport("xl/charts/chart","Calc Office Open XML");
+    CPPUNIT_ASSERT(pXmlDoc);
+
+    // This was 12: all series exported with square markers
+    assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker/c:symbol[@val='square']", 0);
+    // instead of skipping markers
+    assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:marker", 0);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/auto_marker_excel10.xlsx b/chart2/qa/extras/data/xlsx/auto_marker_excel10.xlsx
new file mode 100644
index 000000000000..c15756257251
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/auto_marker_excel10.xlsx differ
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index fbeb2a892672..c4a3827ea4fc 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3810,7 +3810,7 @@ void ChartExport::exportMarker(const Reference< XPropertySet >& xPropSet)
     if( GetProperty( xPropSet, "Symbol" ) )
         mAny >>= aSymbol;
 
-    if(aSymbol.Style != chart2::SymbolStyle_STANDARD && aSymbol.Style != chart2::SymbolStyle_AUTO && aSymbol.Style != chart2::SymbolStyle_NONE)
+    if(aSymbol.Style != chart2::SymbolStyle_STANDARD && aSymbol.Style != chart2::SymbolStyle_NONE)
         return;
 
     FSHelperPtr pFS = GetFS();


More information about the Libreoffice-commits mailing list