summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx9
-rw-r--r--sw/source/filter/html/wrthtml.cxx6
2 files changed, 12 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.
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index a2b8a8d811bc..5a01534ff141 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -452,6 +452,9 @@ ErrCode SwHTMLWriter::WriteStream()
OutNewLine();
HTMLOutFuncs::Out_AsciiTag( Strm(), GetNamespace() + OOO_STRING_SVTOOLS_HTML_html, false );
}
+ else if (mbReqIF)
+ // ReqIF: end xhtml.BlkStruct.class.
+ HTMLOutFuncs::Out_AsciiTag(Strm(), GetNamespace() + OOO_STRING_SVTOOLS_HTML_division, false);
// delete the table with floating frames
OSL_ENSURE( !m_pHTMLPosFlyFrames, "Were not all frames output?" );
@@ -1076,6 +1079,9 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
Strm().WriteChar( '>' );
}
+ else if (mbReqIF)
+ // ReqIF: start xhtml.BlkStruct.class.
+ HTMLOutFuncs::Out_AsciiTag(Strm(), GetNamespace() + OOO_STRING_SVTOOLS_HTML_division);
return pPageDesc;
}