diff options
author | David Tardon <dtardon@redhat.com> | 2015-12-17 15:43:24 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-12-17 23:03:16 +0100 |
commit | 36b087f8b04ea46428a2c20e26d4230e59cdfd4d (patch) | |
tree | 8d53163151ba87e190ec21d87c213fd493a95c6c /writerperfect | |
parent | 3fd652b3de435e85d91154352f9a2029fd47b2d4 (diff) |
do not require newest libwps for build
Change-Id: Iba0090da0591b6f9a6d74bb18ebaabef53448063
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/qa/unit/WpftImportTestBase.hxx | 3 | ||||
-rw-r--r-- | writerperfect/qa/unit/WpftWriterFilterTest.cxx | 4 | ||||
-rw-r--r-- | writerperfect/source/writer/MSWorksImportFilter.cxx | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/writerperfect/qa/unit/WpftImportTestBase.hxx b/writerperfect/qa/unit/WpftImportTestBase.hxx index e5451036a500..514561f43d66 100644 --- a/writerperfect/qa/unit/WpftImportTestBase.hxx +++ b/writerperfect/qa/unit/WpftImportTestBase.hxx @@ -35,6 +35,9 @@ #define REQUIRE_MWAW_VERSION(major, minor, micro) \ REQUIRE_VERSION(MWAW_VERSION_MAJOR, MWAW_VERSION_MINOR, MWAW_VERSION_MICRO, major, minor, micro) +#define REQUIRE_WPS_VERSION(major, minor, micro) \ + REQUIRE_VERSION(WPS_VERSION_MAJOR, WPS_VERSION_MINOR, WPS_VERSION_MICRO, major, minor, micro) + namespace com { namespace sun diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx b/writerperfect/qa/unit/WpftWriterFilterTest.cxx index 7b4fd74e6924..4de3ea641e40 100644 --- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx +++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx @@ -41,6 +41,10 @@ void WpftWriterFilterTest::test() {"RagTime_3.2.hqx", REQUIRE_MWAW_VERSION(0, 3, 2)}, {"RagTime_5.5.rag", REQUIRE_MWAW_VERSION(0, 3, 6)}, }; + const writerperfect::test::WpftOptionalMap_t aWpsOptional + { + {"Write_3.1.wri", REQUIRE_WPS_VERSION(0, 4, 2)}, + }; doTest("com.sun.star.comp.Writer.AbiWordImportFilter", "/writerperfect/qa/unit/data/writer/libabw/"); doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/writer/libe-book/"); diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx index 42bd1cd118ab..f787d5258e11 100644 --- a/writerperfect/source/writer/MSWorksImportFilter.cxx +++ b/writerperfect/source/writer/MSWorksImportFilter.cxx @@ -55,7 +55,7 @@ bool MSWorksImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, else if (pDlg->hasUserCalledCancel()) return false; } - else if ((kind == libwps::WPS_TEXT) && (creator == libwps::WPS_MSWRITE) && (confidence == libwps::WPS_CONFIDENCE_EXCELLENT) && needEncoding) + else if ((kind == libwps::WPS_TEXT) && (creator == libwps::WPS_RESERVED_0) && (confidence == libwps::WPS_CONFIDENCE_EXCELLENT) && needEncoding) { const ScopedVclPtrInstance<writerperfect::WPFTEncodingDialog> pDlg( "Import MsWrite files(libwps)", "CP1252"); |