diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-11-30 14:36:14 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-12-01 08:23:50 +0100 |
commit | f20ba8466b0df5c80f7663eb1d639f31973dbece (patch) | |
tree | 083cda740bb53af02f22789a6a1f7de392bce1c3 /xmloff | |
parent | 3c7b177978f260b84f49032034502a12be7bdebc (diff) |
tdf#113696 Add mimetype also to fallback graphic
Change-Id: I6eb7bb66aa688b5668d0eacd2ec7131bec2b6955
Reviewed-on: https://gerrit.libreoffice.org/45585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 3a60df4f3b68..887f5ecfd372 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2393,6 +2393,14 @@ void XMLShapeExport::ImpExportGraphicObjectShape( mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); } + + uno::Reference<io::XInputStream> xInputStream( + mrExport.GetEmbeddedGraphicObjectStream(aReplacementUrl)); + OUString aMimeType( + comphelper::GraphicMimeTypeHelper::GetMimeTypeForImageStream(xInputStream)); + if (!aMimeType.isEmpty()) + GetExport().AddAttribute(XML_NAMESPACE_LO_EXT, "mime-type", aMimeType); + SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_IMAGE, true, true); // optional office:binary-data |