summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlflywriter.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-03-08 14:58:01 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-03-08 18:36:01 +0100
commitad628045f62b0656c58d2e195e33186c055c2196 (patch)
tree2da2b3600f4aad376fbb9fcbed6b02ca86321f14 /sw/source/filter/html/htmlflywriter.cxx
parentc774ad610eb828742a3eea050e5a7571ba3b00be (diff)
sw XHTML export: handle media type for OLE objects
Both native data and replacement graphic. Change-Id: I2f89493e56e9d22a54aa3e4175d8b750c33d98f0 Reviewed-on: https://gerrit.libreoffice.org/50964 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/filter/html/htmlflywriter.cxx')
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index de06ac48a199..ba9a62260543 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1385,6 +1385,18 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
aHtml.attribute(aAttribute, sBuffer.makeStringAndClear().getStr());
}
+ if (nFrameOpts & HtmlFrmOpts::Replacement)
+ {
+ // Handle XHTML type attribute for OLE replacement images.
+ uno::Reference<beans::XPropertySet> xGraphic(rGraphic.GetXGraphic(), uno::UNO_QUERY);
+ if (xGraphic.is())
+ {
+ OUString aMimeType;
+ xGraphic->getPropertyValue("MimeType") >>= aMimeType;
+ aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_type, aMimeType.toUtf8());
+ }
+ }
+
// Events
if (SfxItemState::SET == rItemSet.GetItemState(RES_FRMMACRO, true, &pItem))
{