summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-11-30 14:36:14 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-12-04 09:20:14 +0100
commit8dae93c0b8a075dee1319efff4e81d90f3f13b2b (patch)
tree7ea82ea7db68c65ef4463bee21db064d4c60c843 /xmloff
parent58822e6f1686eac7a8a7c028ea8f233493594437 (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> Reviewed-on: https://gerrit.libreoffice.org/45678 Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/shapeexport.cxx8
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