summaryrefslogtreecommitdiff
path: root/sw/qa/extras/htmlexport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-03-19 16:39:59 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-03-19 20:55:08 +0100
commitbd063a890e486989b59963e59dd67e8a692f27ba (patch)
tree75bbe8b4bcee233d31fecf36b277ecfbd1dd6ad9 /sw/qa/extras/htmlexport
parent67a023ef9b251c1e6e2a46521a51ad829c417451 (diff)
sw XHTML export: fix missing type attribute for fallback image
This was working in OutHTML_FrameFormatGrfNode(), but not in OutHTML_FrameFormatOLENodeGrf(). Change-Id: I4f8e280713cad2a00cad5da65a09afc5a36d40d0 Reviewed-on: https://gerrit.libreoffice.org/51571 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/htmlexport')
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index b23f196a5251..515f7c768273 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -406,6 +406,18 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOleImg, "reqif-ole-img.xhtml")
// Check alternate text (it was empty, for export the 'alt' attribute was used).
CPPUNIT_ASSERT_EQUAL(OUString("OLE Object"), getProperty<OUString>(xObject, "Title").trim());
+
+ if (!mbExported)
+ return;
+
+ // "type" attribute was missing for the inner <object> element.
+ SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
+ CPPUNIT_ASSERT(pStream);
+ pStream->Seek(STREAM_SEEK_TO_END);
+ sal_uInt64 nLength = pStream->Tell();
+ pStream->Seek(0);
+ OString aStream(read_uInt8s_ToOString(*pStream, nLength));
+ CPPUNIT_ASSERT(aStream.indexOf("type=\"image/png\"") != -1);
}
DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfPngImg, "reqif-png-img.xhtml")