124c28d
From e81fe84405bc635dfa93e54fb8a3c8e6065dbf10 Mon Sep 17 00:00:00 2001
124c28d
From: David Tardon <dtardon@redhat.com>
124c28d
Date: Sat, 6 Jun 2015 18:27:24 +0200
124c28d
Subject: [PATCH] adapt to libwps 0.4
124c28d
124c28d
---
124c28d
 cmake/modules/FindLibWps.cmake           | 6 +++---
124c28d
 filters/words/works/import/WPSImport.cpp | 4 +++-
124c28d
 2 files changed, 6 insertions(+), 4 deletions(-)
124c28d
124c28d
diff --git a/cmake/modules/FindLibWps.cmake b/cmake/modules/FindLibWps.cmake
124c28d
index f8c8225..58ef2b5 100644
124c28d
--- a/cmake/modules/FindLibWps.cmake
124c28d
+++ b/cmake/modules/FindLibWps.cmake
124c28d
@@ -10,16 +10,16 @@
124c28d
 
124c28d
 include(LibFindMacros)
124c28d
 libfind_package(LIBWPS LibWpd)
124c28d
-libfind_pkg_check_modules(LIBWPS_PKGCONF libwps-0.3)
124c28d
+libfind_pkg_check_modules(LIBWPS_PKGCONF libwps-0.4)
124c28d
 
124c28d
 find_path(LIBWPS_INCLUDE_DIR
124c28d
     NAMES libwps/libwps.h
124c28d
     HINTS ${LIBWPS_PKGCONF_INCLUDE_DIRS} ${LIBWPS_PKGCONF_INCLUDEDIR}
124c28d
-    PATH_SUFFIXES libwps-0.3
124c28d
+    PATH_SUFFIXES libwps-0.4
124c28d
 )
124c28d
 
124c28d
 find_library(LIBWPS_LIBRARY
124c28d
-    NAMES wps wps-0.3
124c28d
+    NAMES wps wps-0.4
124c28d
     HINTS ${LIBWPS_PKGCONF_LIBRARY_DIRS} ${LIBWPS_PKGCONF_LIBDIR}
124c28d
 )
124c28d
 
124c28d
diff --git a/filters/words/works/import/WPSImport.cpp b/filters/words/works/import/WPSImport.cpp
124c28d
index eea2cc9..94b859d 100644
124c28d
--- a/filters/words/works/import/WPSImport.cpp
124c28d
+++ b/filters/words/works/import/WPSImport.cpp
124c28d
@@ -91,7 +91,9 @@ public:
124c28d
     bool isSupportedFormat(librevenge::RVNGInputStream &input)
124c28d
     {
124c28d
         WPSKind kind = WPS_TEXT;
124c28d
-        WPSConfidence confidence = WPSDocument::isFileFormatSupported(&input, kind);
124c28d
+        WPSCreator creator = WPS_MSWORKS;
124c28d
+        bool needsEncoding = false;
124c28d
+        WPSConfidence confidence = WPSDocument::isFileFormatSupported(&input, kind, creator, needsEncoding);
124c28d
         if (confidence == WPS_CONFIDENCE_NONE || kind != WPS_TEXT)
124c28d
             return false;
124c28d
         return true;
124c28d
-- 
124c28d
2.4.2
124c28d