summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/htmlexport/data/reqif-table2.odtbin0 -> 8489 bytes
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx21
2 files changed, 18 insertions, 3 deletions
diff --git a/sw/qa/extras/htmlexport/data/reqif-table2.odt b/sw/qa/extras/htmlexport/data/reqif-table2.odt
new file mode 100644
index 000000000000..772dde0dd6a9
--- /dev/null
+++ b/sw/qa/extras/htmlexport/data/reqif-table2.odt
Binary files differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index bafe6798c8c4..a582ac00b41a 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -56,9 +56,12 @@ private:
setFilterOptions("XHTML");
else if (getTestName().indexOf("ReqIf") != -1)
{
- setImportFilterOptions("xhtmlns=reqif-xhtml");
- // Bypass filter detect.
- setImportFilterName("HTML (StarWriter)");
+ if (OString(filename).endsWith(".xhtml"))
+ {
+ setImportFilterOptions("xhtmlns=reqif-xhtml");
+ // Bypass filter detect.
+ setImportFilterName("HTML (StarWriter)");
+ }
// Export options (implies XHTML).
setFilterOptions("xhtmlns=reqif-xhtml");
}
@@ -475,6 +478,18 @@ DECLARE_HTMLEXPORT_TEST(testReqIfTable, "reqif-table.xhtml")
assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "bgcolor");
}
+DECLARE_HTMLEXPORT_TEST(testReqIfTable2, "reqif-table2.odt")
+{
+ 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, <reqif-xhtml:td width="..."> was written.
+ CPPUNIT_ASSERT(aStream.indexOf("<reqif-xhtml:td>") != -1);
+}
+
DECLARE_HTMLEXPORT_TEST(testReqIfList, "reqif-list.xhtml")
{
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);