[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - chart2/qa oox/source

Daniel Arato (NISZ) (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 1 11:27:12 UTC 2020


 chart2/qa/extras/chart2export.cxx       |   14 ++++++++++++++
 chart2/qa/extras/data/odp/tdf121189.odp |binary
 oox/source/export/shapes.cxx            |    1 +
 3 files changed, 15 insertions(+)

New commits:
commit f366b87d71d774c3a6983224903933bb32b43ff0
Author:     Daniel Arato (NISZ) <arato.daniel at nisz.hu>
AuthorDate: Mon Aug 24 17:29:08 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 1 13:26:40 2020 +0200

    tdf#121189 PPTX export: fix missing chart
    
    Based on Regina Henschel's technical analysis and code pointer.
    
    Change-Id: Ifdea48c09d23dce495fa6bc90a9e1648dbb5ccb3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101283
    Tested-by: László Németh <nemeth at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 0c5ac9d1cb39eac838a612092a8934a6ca12326f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101674
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index 81b79439a9ff..2459a2b3089b 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -155,6 +155,7 @@ public:
     void testTdf119029();
     void testTdf108022();
     void testTdf121744();
+    void testTdf121189();
     void testTdf122031();
     void testTdf115012();
     void testTdf123206_customLabelText();
@@ -289,6 +290,7 @@ public:
     CPPUNIT_TEST(testTdf119029);
     CPPUNIT_TEST(testTdf108022);
     CPPUNIT_TEST(testTdf121744);
+    CPPUNIT_TEST(testTdf121189);
     CPPUNIT_TEST(testTdf122031);
     CPPUNIT_TEST(testTdf115012);
     CPPUNIT_TEST(testTdf123206_customLabelText);
@@ -2540,6 +2542,18 @@ void Chart2ExportTest::testTdf121744()
     assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:axId[2]", "val", YValueId );
 }
 
+void Chart2ExportTest::testTdf121189()
+{
+    load("/chart2/qa/extras/data/odp/", "tdf121189.odp");
+    reload("Impress Office Open XML");
+
+    uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, uno::UNO_QUERY_THROW);
+    uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xPage->getCount());
+    uno::Reference<drawing::XShape> xShape(xPage->getByIndex(0), uno::UNO_QUERY_THROW);
+    CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.OLE2Shape"), xShape->getShapeType());
+}
+
 void Chart2ExportTest::testTdf122031()
 {
     //Checks pie chart data label format.
diff --git a/chart2/qa/extras/data/odp/tdf121189.odp b/chart2/qa/extras/data/odp/tdf121189.odp
new file mode 100644
index 000000000000..6f99e0054936
Binary files /dev/null and b/chart2/qa/extras/data/odp/tdf121189.odp differ
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 9a6a72b08b0f..1b17f888c493 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1519,6 +1519,7 @@ static const NameToConvertMapType& lcl_GetConverters()
 
         { "com.sun.star.presentation.GraphicObjectShape"   , &ShapeExport::WriteGraphicObjectShape },
         { "com.sun.star.presentation.MediaShape"           , &ShapeExport::WriteGraphicObjectShape },
+        { "com.sun.star.presentation.ChartShape"           , &ShapeExport::WriteOLE2Shape },
         { "com.sun.star.presentation.OLE2Shape"            , &ShapeExport::WriteOLE2Shape },
         { "com.sun.star.presentation.TableShape"           , &ShapeExport::WriteTableShape },
         { "com.sun.star.presentation.TextShape"            , &ShapeExport::WriteTextShape },


More information about the Libreoffice-commits mailing list