[Libreoffice-commits] core.git: sw/qa sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Mar 9 13:13:48 UTC 2018
sw/qa/extras/htmlexport/data/reqif-p.xhtml | 1 +
sw/qa/extras/htmlexport/htmlexport.cxx | 8 ++++++++
sw/source/filter/html/htmlatr.cxx | 2 +-
3 files changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 3af025f0fe0daa1de24eb3ac80797cd618d06ec3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Mar 9 12:32:39 2018 +0100
sw XHTML export: fix OutHTML_INetFormat()
<a> missed the namespace prefix, </a> did not.
Change-Id: I8f50249170c6323d35bbeb856e10a2c93038cdbf
Reviewed-on: https://gerrit.libreoffice.org/50993
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/qa/extras/htmlexport/data/reqif-p.xhtml b/sw/qa/extras/htmlexport/data/reqif-p.xhtml
index 2f069d78e0eb..3db2325467a2 100644
--- a/sw/qa/extras/htmlexport/data/reqif-p.xhtml
+++ b/sw/qa/extras/htmlexport/data/reqif-p.xhtml
@@ -1,2 +1,3 @@
<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>
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index c30def092451..f65b0014e799 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -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")
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 96b624a541f8..ac323a5ebc75 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -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;
{
More information about the Libreoffice-commits
mailing list