From 55961c8721fd0730aea3d8943e6a31abb859b00e Mon Sep 17 00:00:00 2001 From: Fridrich Strba <fridrich.strba@bluewin.ch> Date: Thu, 22 Oct 2015 08:25:57 +0000 Subject: [PATCH] Port to libwps-0.4.x git-svn-id: svn+ssh://svn.abisource.com/svnroot/abiword/trunk@35116 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6 --- plugins/wordperfect/plugin.m4 | 2 +- plugins/wordperfect/xp/ie_imp_WordPerfect.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/wordperfect/plugin.m4 b/plugins/wordperfect/plugin.m4 index 0aadbaf83..bc32d483f 100644 --- a/plugins/wordperfect/plugin.m4 +++ b/plugins/wordperfect/plugin.m4 @@ -1,6 +1,6 @@ wordperfect_pkgs="libwpd-0.10 $gsf_req" -wordperfect_wps_pkgs='libwps-0.3' +wordperfect_wps_pkgs='libwps-0.4' wordperfect_deps="no" WORDPERFECT_CFLAGS= diff --git a/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp b/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp index 5130bc44a..2ddaa953e 100644 --- a/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp +++ b/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp @@ -1349,7 +1349,7 @@ protected: virtual UT_Error _loadFile(GsfInput * input) { AbiWordperfectInputStream gsfInput(input); - libwps::WPSResult error = libwps::WPSDocument::parse(&gsfInput, static_cast<librevenge::RVNGTextInterface *>(this)); + libwps::WPSResult error = libwps::WPSDocument::parse(&gsfInput, static_cast<librevenge::RVNGTextInterface *>(this), NULL, NULL); if (error != libwps::WPS_OK) { @@ -1388,8 +1388,10 @@ UT_Confidence_t IE_Imp_MSWorks_Sniffer::recognizeContents (GsfInput * input) { AbiWordperfectInputStream gsfInput(input); + libwps::WPSCreator creator; libwps::WPSKind kind; - libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind); + bool needEncoding; + libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind, creator, needEncoding); if (kind != libwps::WPS_TEXT) confidence = libwps::WPS_CONFIDENCE_NONE; -- 2.21.0