[Libreoffice-commits] core.git: sw/qa sw/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Apr 11 13:39:37 UTC 2018


 sw/qa/extras/htmlexport/data/reqif-list.xhtml |   11 +++++++++++
 sw/qa/extras/htmlexport/htmlexport.cxx        |   12 ++++++++++++
 sw/source/filter/html/htmlnumwriter.cxx       |    1 +
 3 files changed, 24 insertions(+)

New commits:
commit adc10e62ddc4a65f6b1fecbcfc7c6560489e3aaa
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Apr 11 11:51:12 2018 +0200

    sw XHTML export: fix missing namespace prefix of lists
    
    Unordered lists, but fixes ordered lists as a side effect, too.
    
    Change-Id: I1752522e906975b112e6938ffc5456e53a165996
    Reviewed-on: https://gerrit.libreoffice.org/52724
    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-list.xhtml b/sw/qa/extras/htmlexport/data/reqif-list.xhtml
new file mode 100644
index 000000000000..5433ee10a6ea
--- /dev/null
+++ b/sw/qa/extras/htmlexport/data/reqif-list.xhtml
@@ -0,0 +1,11 @@
+<reqif-xhtml:div>Heading<reqif-xhtml:br/>
+	<reqif-xhtml:ul>
+		<reqif-xhtml:li>
+			<reqif-xhtml:strong>First</reqif-xhtml:strong></reqif-xhtml:li>
+		<reqif-xhtml:li>
+			<reqif-xhtml:strong>Second</reqif-xhtml:strong></reqif-xhtml:li>
+		<reqif-xhtml:li>
+			<reqif-xhtml:strong>Third</reqif-xhtml:strong>
+		</reqif-xhtml:li>
+	</reqif-xhtml:ul>
+</reqif-xhtml:div>
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 7f10e4befa90..6eb45ff90882 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -478,6 +478,18 @@ DECLARE_HTMLEXPORT_TEST(testReqIfTable, "reqif-table.xhtml")
     assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "bgcolor");
 }
 
+DECLARE_HTMLEXPORT_TEST(testReqIfList, "reqif-list.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 aStream(read_uInt8s_ToOString(*pStream, nLength));
+    // This failed, <ul> was written.
+    CPPUNIT_ASSERT(aStream.indexOf("<reqif-xhtml:ul>") != -1);
+}
+
 DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOle2, "reqif-ole2.xhtml")
 {
     uno::Reference<text::XTextEmbeddedObjectsSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx
index 81ed85ae016c..7d5c23b95379 100644
--- a/sw/source/filter/html/htmlnumwriter.cxx
+++ b/sw/source/filter/html/htmlnumwriter.cxx
@@ -182,6 +182,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
 
         rWrt.m_aBulletGrfs[i].clear();
         OString sOut = "<";
+        sOut += rWrt.GetNamespace();
         const SwNumFormat& rNumFormat = rInfo.GetNumRule()->Get( i );
         sal_Int16 eType = rNumFormat.GetNumberingType();
         if( SVX_NUM_CHAR_SPECIAL == eType )


More information about the Libreoffice-commits mailing list