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

sw XHTML export: fix OutHTML_INetFormat()

<a> missed the namespace prefix, </a> did not.

Change-Id: I8f50249170c6323d35bbeb856e10a2c93038cdbf
Reviewed-on: https://gerrit.libreoffice.org/50993Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 48bca65f
<reqif-xhtml:p>aaa<reqif-xhtml:br/>bbb</reqif-xhtml:p>
<reqif-xhtml:table><reqif-xhtml:tr><reqif-xhtml:td>in table</reqif-xhtml:tr></reqif-xhtml:tr></reqif-xhtml:table>
<reqif-xhtml:a href="http://libreoffice.org/">http://libreoffice.org</reqif-xhtml:a>
......@@ -337,15 +337,23 @@ DECLARE_HTMLEXPORT_TEST(testReqIfParagraph, "reqif-p.xhtml")
{
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
CPPUNIT_ASSERT(pStream);
pStream->Seek(STREAM_SEEK_TO_END);
sal_uInt64 nLength = pStream->Tell();
pStream->Seek(0);
OString aExpected("<reqif-xhtml:p>aaa<reqif-xhtml:br/>\nbbb</reqif-xhtml:p>" SAL_NEWLINE_STRING);
// This was '<table' instead.
aExpected += "<reqif-xhtml:table";
OString aStream(read_uInt8s_ToOString(*pStream, nLength));
pStream->Seek(0);
OString aActual(read_uInt8s_ToOString(*pStream, aExpected.getLength()));
// This was a HTML header, like '<!DOCTYPE html ...'.
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
// This was "<a", was not found.
CPPUNIT_ASSERT(aStream.indexOf("<reqif-xhtml:a") != -1);
}
DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOleData, "reqif-ole-data.xhtml")
......
......@@ -2876,7 +2876,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
return rWrt;
}
OString sOut = "<" OOO_STRING_SVTOOLS_HTML_anchor;
OString sOut("<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor);
bool bScriptDependent = false;
{
......
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