tdf#53970 PPTX: fix export of embedded media files
Embedded media files lost in documents created
with Impress after PPTX export.
Change-Id: I453b58f9cfa6a33653e9216fb82b66970a9ec31b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132095
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 912f392..ff092b4 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1428,6 +1428,11 @@ void DrawingML::WriteMediaNonVisualProperties(const css::uno::Reference<css::dra
aMimeType = "audio/mp4";
eMediaType = Relationship::AUDIO;
}
else if (aExtension.equalsIgnoreAsciiCase(".mp3"))
{
aMimeType = "audio/mp3";
eMediaType = Relationship::AUDIO;
}
}
OUString aVideoFileRelId;
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 0b6b220..ea0e21f 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1662,6 +1662,7 @@ static const NameToConvertMapType& lcl_GetConverters()
{ "com.sun.star.drawing.EllipseShape" , &ShapeExport::WriteEllipseShape },
{ "com.sun.star.drawing.GraphicObjectShape" , &ShapeExport::WriteGraphicObjectShape },
{ "com.sun.star.drawing.LineShape" , &ShapeExport::WriteLineShape },
{ "com.sun.star.drawing.MediaShape" , &ShapeExport::WriteGraphicObjectShape },
{ "com.sun.star.drawing.OpenBezierShape" , &ShapeExport::WriteOpenPolyPolygonShape },
{ "com.sun.star.drawing.PolyPolygonShape" , &ShapeExport::WriteClosedPolyPolygonShape },
{ "com.sun.star.drawing.PolyLineShape" , &ShapeExport::WriteOpenPolyPolygonShape },
diff --git a/sd/qa/unit/data/odp/tdf53970.odp b/sd/qa/unit/data/odp/tdf53970.odp
new file mode 100644
index 0000000..0d48cf5
--- /dev/null
+++ b/sd/qa/unit/data/odp/tdf53970.odp
Binary files differ