[Libreoffice-commits] core.git: sw/qa sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Mar 9 08:12:36 UTC 2018
sw/qa/extras/htmlexport/htmlexport.cxx | 6 +-----
sw/source/filter/html/htmlflywriter.cxx | 5 +++++
2 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit b288fdf89386446854debea35f8b8d013fec671d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Mar 8 17:25:10 2018 +0100
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/50966
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
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() )
More information about the Libreoffice-commits
mailing list