tdf#60316: chart2_export: Add unittest

Change-Id: Ia12f925807a93a32072322982d789ffa8e24e138
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98478
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index f70898a..628bdb9 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -160,6 +160,7 @@ public:
    void testTdf123206_customLabelText();
    void testCustomLabelText();
    void testDeletedLegendEntries();
    void testTdf60316();
    void testTdf130225();
    void testTdf59857();
    void testTdf126076();
@@ -295,6 +296,7 @@ public:
    CPPUNIT_TEST(testTdf123206_customLabelText);
    CPPUNIT_TEST(testCustomLabelText);
    CPPUNIT_TEST(testDeletedLegendEntries);
    CPPUNIT_TEST(testTdf60316);
    CPPUNIT_TEST(testTdf130225);
    CPPUNIT_TEST(testTdf59857);
    CPPUNIT_TEST(testTdf126076);
@@ -2635,6 +2637,17 @@ void Chart2ExportTest::testDeletedLegendEntries()
    }
}

void Chart2ExportTest::testTdf60316()
{
    load("/chart2/qa/extras/data/pptx/", "tdf60316.pptx");
    xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart", "Impress MS PowerPoint 2007 XML");
    CPPUNIT_ASSERT(pXmlDoc);

    // Without the fix in place, the shape would have had a solidFill background
    assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:noFill", 1);
    assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:solidFill", 0);
}

void Chart2ExportTest::testTdf130225()
{
    load("/chart2/qa/extras/data/docx/", "piechart_deleted_legend_entry.docx");
diff --git a/chart2/qa/extras/data/pptx/tdf60316.pptx b/chart2/qa/extras/data/pptx/tdf60316.pptx
new file mode 100755
index 0000000..d1da03e
--- /dev/null
+++ b/chart2/qa/extras/data/pptx/tdf60316.pptx
Binary files differ