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 9ca974ddb5ba89b09c1c2cfd7efced5895fbead5
Author:     Daniel Arato (NISZ) <arato.dan...@nisz.hu>
AuthorDate: Mon Aug 24 17:29:08 2020 +0200
Commit:     Gabor Kelemen <kelemen.gab...@nisz.hu>
CommitDate: Wed Oct 14 23:21:14 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 <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>
    (cherry picked from commit 0c5ac9d1cb39eac838a612092a8934a6ca12326f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104328
    Tested-by: Gabor Kelemen <kelemen.gab...@nisz.hu>
    Reviewed-by: Gabor Kelemen <kelemen.gab...@nisz.hu>

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index 268e30d46d19..73f335574513 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -147,6 +147,7 @@ public:
     void testTdf119029();
     void testTdf108022();
     void testTdf121744();
+    void testTdf121189();
     void testTdf122031();
     void testTdf115012();
     void testTdf134118();
@@ -267,6 +268,7 @@ public:
     CPPUNIT_TEST(testTdf119029);
     CPPUNIT_TEST(testTdf108022);
     CPPUNIT_TEST(testTdf121744);
+    CPPUNIT_TEST(testTdf121189);
     CPPUNIT_TEST(testTdf122031);
     CPPUNIT_TEST(testTdf115012);
     CPPUNIT_TEST(testTdf134118);
@@ -2391,6 +2393,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 9f69e316cbec..4aa4522bd596 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1550,6 +1550,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 },
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to