Kaydet (Commit) b288fdf8 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw XHTML export: handle alt text for OLE objects

The XHTML export is now on par with the import wrt OLE objects.

Change-Id: I736c1f03b0e3d8b84b8ebe08eb1b1cfa247cefbd
Reviewed-on: https://gerrit.libreoffice.org/50966Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst b810c84c
......@@ -390,11 +390,7 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOleImg, "reqif-ole-img.xhtml")
// This was empty when either import or export handling was missing.
CPPUNIT_ASSERT_EQUAL(OUString("text/rtf"), getProperty<OUString>(xStream, "MediaType"));
if (mbExported)
// The below is not yet working for export.
return;
// Check alternate text (it was empty).
// Check alternate text (it was empty, for export the 'alt' attribute was used).
CPPUNIT_ASSERT_EQUAL(OUString("OLE Object"), getProperty<OUString>(xObject, "Title").trim());
}
......
......@@ -1427,6 +1427,11 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat,
aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_usemap, "#" + aIMapName);
}
if ((nFrameOpts & HtmlFrmOpts::Replacement) && !rAlternateText.isEmpty())
// XHTML object replacement image's alternate text doesn't use the
// "alt" attribute.
aHtml.characters(rAlternateText.toUtf8());
aHtml.flushStack();
if( !rHTMLWrt.m_aINetFormats.empty() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment