summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-03-20 14:58:19 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-03-20 18:35:43 +0100
commitf74d9ba2190426b974ca3d56da58919ac233a5d3 (patch)
tree72471e46e638d7c5eda712d585025ed1d59fe772 /sw/qa/extras
parente3bd5ebf678ef7e5ba588d47eed2f027e84cb3cd (diff)
sw XHTML import: write <div> wrapper in ReqIF mode
ReqIF says the XHTML fragment must be of type xhtml.BlkStruct.class, which is either a <p> or a <div> element (a single one). Just write this wrapper unconditionally, as we ignore it on import anyway, and it could be skipped only in the single-paragraph-doc case. Change-Id: I3051008866c4a28ce54413c73071bd4a5ced8b87 Reviewed-on: https://gerrit.libreoffice.org/51646 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index fcb073cbcd8b..6a7b5e7774e4 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -341,7 +341,8 @@ DECLARE_HTMLEXPORT_TEST(testReqIfParagraph, "reqif-p.xhtml")
sal_uInt64 nLength = pStream->Tell();
pStream->Seek(0);
- OString aExpected("<reqif-xhtml:p>aaa<reqif-xhtml:br/>\nbbb</reqif-xhtml:p>" SAL_NEWLINE_STRING);
+ OString aExpected("<reqif-xhtml:div><reqif-xhtml:p>aaa<reqif-xhtml:br/>\nbbb"
+ "</reqif-xhtml:p>" SAL_NEWLINE_STRING);
// This was '<table' instead.
aExpected += "<reqif-xhtml:table";
@@ -462,8 +463,10 @@ DECLARE_HTMLEXPORT_TEST(testReqIfTable, "reqif-table.xhtml")
htmlDocPtr pDoc = parseHtml(maTempFile);
CPPUNIT_ASSERT(pDoc);
- assertXPath(pDoc, "/html/body/table/tr/th", 1);
- OUString aStyle = getXPath(pDoc, "/html/body/table/tr/th", "style");
+ // <div> was missing, so the XHTML fragment wasn't a valid
+ // xhtml.BlkStruct.class type anymore.
+ assertXPath(pDoc, "/html/body/div/table/tr/th", 1);
+ OUString aStyle = getXPath(pDoc, "/html/body/div/table/tr/th", "style");
CPPUNIT_ASSERT(aStyle.indexOf("background") != -1);
// This failed, there were 2 style attributes, so as a best effort the
// parser took the value of the first.