summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-03-14 12:00:19 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-03-14 13:19:31 +0100
commit0efb6a1a3525a402ab28083181fc39b75f7ef556 (patch)
treef0ac5820d7d9adc34c459844a925e1f806b06488 /sw
parent4fa902d1c16ddafbe1e3dbf396c96487fdef3ddc (diff)
sw XHTML export: fix handling of character styles
Namespace prefix was missing here. Change-Id: Id746d47713b22e2efd5d679c2325b32a0bee8a09 Reviewed-on: https://gerrit.libreoffice.org/51270 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/htmlexport/data/reqif-p.xhtml1
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx3
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
3 files changed, 5 insertions, 1 deletions
diff --git a/sw/qa/extras/htmlexport/data/reqif-p.xhtml b/sw/qa/extras/htmlexport/data/reqif-p.xhtml
index e5484ee79483..315a4db80918 100644
--- a/sw/qa/extras/htmlexport/data/reqif-p.xhtml
+++ b/sw/qa/extras/htmlexport/data/reqif-p.xhtml
@@ -2,3 +2,4 @@
<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>
<reqif-xhtml:span style="text-decoration: underline">u</reqif-xhtml:span>
+<reqif-xhtml:strong>s</reqif-xhtml:strong>
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index b2a4348d3890..b23f196a5251 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -357,6 +357,9 @@ DECLARE_HTMLEXPORT_TEST(testReqIfParagraph, "reqif-p.xhtml")
// This was "<u>" instead of CSS.
CPPUNIT_ASSERT(aStream.indexOf("<reqif-xhtml:span style=\"text-decoration: underline\"") != -1);
+
+ // This was <strong>, namespace prefix was missing.
+ CPPUNIT_ASSERT(aStream.indexOf("<reqif-xhtml:strong>") != -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 835fb25d6a99..b148cf181237 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -3049,7 +3049,7 @@ static Writer& OutHTML_SwTextCharFormat( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.m_bTagOn )
{
- OString sOut = "<";
+ OString sOut = "<" + rHTMLWrt.GetNamespace();
if( !pFormatInfo->aToken.isEmpty() )
sOut += pFormatInfo->aToken;
else