summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx6
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx5
2 files changed, 6 insertions, 5 deletions
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 2f9ff7dbbf07..c30def092451 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -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());
}
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index ba9a62260543..985f8fd11977 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -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() )