summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx16
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx33
2 files changed, 48 insertions, 1 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index fca647b6b6d0..8cff2ea21660 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -644,11 +644,25 @@ protected:
// too many validation errors right now
validate(maTempFile.GetFileName(), test::OOXML);
}
- else if(aFilterName == "writer8")
+ else if(aFilterName == "writer8"
+ || aFilterName == "OpenDocument Text Flat XML")
{
// still a few validation errors
validate(maTempFile.GetFileName(), test::ODF);
}
+ else if(aFilterName == "MS Word 97")
+ {
+ validate(maTempFile.GetFileName(), test::MSBINARY);
+ }
+ else
+ {
+ OString aMessage("validation requested, but don't know how to validate ");
+ aMessage += filename;
+ aMessage += " (";
+ aMessage += OUStringToOString(aFilterName, RTL_TEXTENCODING_UTF8);
+ aMessage += ")";
+ CPPUNIT_FAIL(aMessage.getStr());
+ }
}
discardDumpedLayout();
if (mustCalcLayoutOf(filename))
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 15dd31a632c7..6ff9590b191a 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -46,6 +46,39 @@ public:
// If the testcase is stored in some other format, it's pointless to test.
return OString(filename).endsWith(".doc");
}
+
+ /**
+ * Validation handling
+ */
+ bool mustValidate(const char* filename) const override
+ {
+ const std::vector<const char*> aBlacklist =
+ {
+ // the following doc exports currently don't pass binary validation
+ "tdf56321_flipImage_both.doc",
+ "cjklist30.doc",
+ "cjklist31.doc",
+ "cjklist34.doc",
+ "cjklist35.doc",
+ "fdo77454.doc",
+ "new-page-styles.doc",
+ "tdf36117_verticalAdjustment.doc",
+ "bnc636128.doc",
+ "tdf92281.doc",
+ "fdo59530.doc",
+ "fdo56513.doc",
+ "tscp.doc",
+ "zoom.doc",
+ "comments-nested.doc",
+ "commented-table.doc",
+ "zoomtype.doc",
+ "n325936.doc",
+ "first-header-footer.doc"
+ };
+
+ // Don't bother with non-.doc files; weed out blacklisted .doc files
+ return (OString(filename).endsWith(".doc") && std::find(aBlacklist.begin(), aBlacklist.end(), filename) == aBlacklist.end());
+ }
protected:
bool CjkNumberedListTestHelper(sal_Int16 &nValue)
{