From b9086ccff6325bdfaf0cf03715fd8be7e2628169 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 7 Mar 2018 14:38:02 +0100 Subject: sw XHTML import: handle alt text of OLE objects That ended up in the body text instead previously, which is unexpected. Change-Id: Ia40d83b3243c313462dce2617404a0670a7debb2 Reviewed-on: https://gerrit.libreoffice.org/50897 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml | 2 +- sw/qa/extras/htmlimport/htmlimport.cxx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'sw/qa/extras/htmlimport') diff --git a/sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml b/sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml index 05abc7721d24..b552783068ae 100644 --- a/sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml +++ b/sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml @@ -1,6 +1,6 @@ - + OLE Object diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index 23017e40a79b..079cc803b569 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -338,6 +338,9 @@ DECLARE_HTMLIMPORT_TEST(testReqIfOleImg, "reqif-ole-img.xhtml") = xStorage->openStreamElement(aStreamName, embed::ElementModes::READ); // This was empty. CPPUNIT_ASSERT_EQUAL(OUString("text/rtf"), getProperty(xStream, "MediaType")); + + // Check alternate text (it was empty). + CPPUNIT_ASSERT_EQUAL(OUString("OLE Object"), getProperty(xObject, "Title").trim()); } CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit