From 785ca3b4eb37789ab1014160664c6b03dd0f6103 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 27 May 2014 19:36:55 +0200 Subject: [PATCH] switch to librevenge-based import libs --- .gitignore | 13 + 0001-build-libodfgen-as-shared-lib.patch | 382 ++ 0002-bundle-librevenge.patch | 1139 ++++++ 0003-the-other-way-around.patch | 40 + ...x-deps-for-projects-using-librevenge.patch | 50 + ...REDLAND_CFLAGS-LIBS-to-ext.-projects.patch | 58 + 0006-rebase-all-import-libs.patch | 3173 +++++++++++++++++ ...libwpd-stream-does-not-exist-anymore.patch | 26 + 0008-export-SYSTEM_REVENGE.patch | 25 + 0009-drop-trailing-comma.patch | 26 + libreoffice.spec | 90 +- 11 files changed, 4985 insertions(+), 37 deletions(-) create mode 100644 0001-build-libodfgen-as-shared-lib.patch create mode 100644 0002-bundle-librevenge.patch create mode 100644 0003-the-other-way-around.patch create mode 100644 0004-fix-deps-for-projects-using-librevenge.patch create mode 100644 0005-always-provide-REDLAND_CFLAGS-LIBS-to-ext.-projects.patch create mode 100644 0006-rebase-all-import-libs.patch create mode 100644 0007-libwpd-stream-does-not-exist-anymore.patch create mode 100644 0008-export-SYSTEM_REVENGE.patch create mode 100644 0009-drop-trailing-comma.patch diff --git a/.gitignore b/.gitignore index 50012ab..e37ac76 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,16 @@ /libreoffice-4.3.0.0.beta1.tar.xz /libreoffice-help-4.3.0.0.beta1.tar.xz /libreoffice-translations-4.3.0.0.beta1.tar.xz +/libabw-0.1.0.tar.bz2 +/libcdr-0.1.0.tar.bz2 +/libe-book-0.1.0.tar.bz2 +/libetonyek-0.1.0.tar.bz2 +/libfreehand-0.1.0.tar.bz2 +/libmspub-0.1.0.tar.bz2 +/libmwaw-0.3.1.tar.bz2 +/libodfgen-0.1.0.tar.bz2 +/librevenge-0.0.0.tar.bz2 +/libvisio-0.1.0.tar.bz2 +/libwpd-0.10.0.tar.bz2 +/libwpg-0.3.0.tar.bz2 +/libwps-0.3.0.tar.bz2 diff --git a/0001-build-libodfgen-as-shared-lib.patch b/0001-build-libodfgen-as-shared-lib.patch new file mode 100644 index 0000000..fd56158 --- /dev/null +++ b/0001-build-libodfgen-as-shared-lib.patch @@ -0,0 +1,382 @@ +From 80a7fe5fa0644e48c2088f50ef7ed45878256d43 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sat, 24 May 2014 09:13:33 +0200 +Subject: [PATCH 1/9] build libodfgen as shared lib + +Change-Id: I3a2c9f56e87ee6395bd3505a8fe372632e242312 +--- + RepositoryExternal.mk | 30 ++++- + .../0001-properly-export-API-symbols.patch | 149 +++++++++++++++++++++ + external/libodfgen/ExternalPackage_libodfgen.mk | 22 +++ + external/libodfgen/ExternalProject_libodfgen.mk | 11 +- + external/libodfgen/Library_odfgen.mk | 50 +++++++ + external/libodfgen/Module_libodfgen.mk | 16 ++- + external/libodfgen/UnpackedTarball_libodfgen.mk | 6 + + 7 files changed, 276 insertions(+), 8 deletions(-) + create mode 100644 external/libodfgen/0001-properly-export-API-symbols.patch + create mode 100644 external/libodfgen/ExternalPackage_libodfgen.mk + create mode 100644 external/libodfgen/Library_odfgen.mk + +diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk +index 8b35b8c..52c4c6d 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -1720,18 +1720,44 @@ endef + + else # !SYSTEM_ODFGEN + ++ifeq ($(COM),MSC) ++ ++$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\ ++ odfgen \ ++)) ++ ++define gb_LinkTarget__use_odfgen ++$(call gb_LinkTarget_set_include,$(1),\ ++ -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \ ++ $$(INCLUDE) \ ++) ++$(call gb_LinkTarget_use_libraries,$(1),\ ++ odfgen \ ++) ++ ++endef ++ ++else # !MSC ++ ++$(eval $(call gb_Helper_register_packages_for_install,ooo, \ ++ libodfgen \ ++)) ++ + define gb_LinkTarget__use_odfgen ++$(call gb_LinkTarget_use_package,$(1),libodfgen) ++ + $(call gb_LinkTarget_set_include,$(1),\ + -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs/libodfgen-0.0$(gb_StaticLibrary_PLAINEXT) \ ++ -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.0 \ + ) +-$(call gb_LinkTarget_use_external_project,$(1),libodfgen) + + endef + ++endif ++ + endif # SYSTEM_ODFGEN + + +diff --git a/external/libodfgen/0001-properly-export-API-symbols.patch b/external/libodfgen/0001-properly-export-API-symbols.patch +new file mode 100644 +index 0000000..3f488eb +--- /dev/null ++++ b/external/libodfgen/0001-properly-export-API-symbols.patch +@@ -0,0 +1,149 @@ ++From 431087afd938b0d9cea2f5c4b88da0746e3758a8 Mon Sep 17 00:00:00 2001 ++From: David Tardon ++Date: Sat, 24 May 2014 20:19:17 +0200 ++Subject: [PATCH] properly export API symbols ++ ++--- ++ inc/libodfgen/Makefile.am | 1 + ++ inc/libodfgen/OdfDocumentHandler.hxx | 4 +++- ++ inc/libodfgen/OdgGenerator.hxx | 3 ++- ++ inc/libodfgen/OdpGenerator.hxx | 3 ++- ++ inc/libodfgen/OdsGenerator.hxx | 3 ++- ++ inc/libodfgen/OdtGenerator.hxx | 3 ++- ++ inc/libodfgen/libodfgen-api.hxx | 38 ++++++++++++++++++++++++++++++++++++ ++ src/Makefile.am | 5 +++-- ++ 8 files changed, 53 insertions(+), 7 deletions(-) ++ create mode 100644 inc/libodfgen/libodfgen-api.hxx ++ ++diff --git a/inc/libodfgen/OdfDocumentHandler.hxx b/inc/libodfgen/OdfDocumentHandler.hxx ++index 79c387b..19e04e3 100644 ++--- a/inc/libodfgen/OdfDocumentHandler.hxx +++++ b/inc/libodfgen/OdfDocumentHandler.hxx ++@@ -26,6 +26,8 @@ ++ #define _ODFDOCUMENTHANDLER_HXX_ ++ #include ++ +++#include "libodfgen-api.hxx" +++ ++ /** Type of ODF content a generator should produce. ++ * ++ * @sa OdgGenerator, OdpGenerator, OdtGenerator ++@@ -57,7 +59,7 @@ typedef bool (*OdfEmbeddedImage)(const WPXBinaryData &input, librev ++ * saved to a file, printed to the standard output, saved to a file ++ * inside a package, or whatever else. ++ */ ++-class OdfDocumentHandler +++class ODFGENAPI OdfDocumentHandler ++ { ++ public: ++ virtual ~OdfDocumentHandler() {} ++diff --git a/inc/libodfgen/OdgGenerator.hxx b/inc/libodfgen/OdgGenerator.hxx ++index f818e3e..24455d8 100644 ++--- a/inc/libodfgen/OdgGenerator.hxx +++++ b/inc/libodfgen/OdgGenerator.hxx ++@@ -27,6 +27,7 @@ ++ #include ++ #include ++ +++#include "libodfgen-api.hxx" ++ #include "OdfDocumentHandler.hxx" ++ ++ class OdgGeneratorPrivate; ++@@ -37,7 +38,7 @@ class OdgGeneratorPrivate; ++ * See @c libwpg library for documentation of the ++ * libwpg::WPGPaintInterface interface. ++ */ ++-class OdgGenerator : public libwpg::WPGPaintInterface +++class ODFGENAPI OdgGenerator : public libwpg::WPGPaintInterface ++ { ++ public: ++ OdgGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType); ++diff --git a/inc/libodfgen/OdpGenerator.hxx b/inc/libodfgen/OdpGenerator.hxx ++index 71f2562..c61f5ad 100644 ++--- a/inc/libodfgen/OdpGenerator.hxx +++++ b/inc/libodfgen/OdpGenerator.hxx ++@@ -27,6 +27,7 @@ ++ ++ #include ++ +++#include "libodfgen-api.hxx" ++ #include "OdfDocumentHandler.hxx" ++ ++ class OdpGeneratorPrivate; ++@@ -37,7 +38,7 @@ class OdpGeneratorPrivate; ++ * See @c libetonyek library for documentation of the ++ * libetonyek::KEYPresentationInterface interface. ++ */ ++-class OdpGenerator : public libetonyek::KEYPresentationInterface +++class ODFGENAPI OdpGenerator : public libetonyek::KEYPresentationInterface ++ { ++ public: ++ OdpGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType); ++diff --git a/inc/libodfgen/OdtGenerator.hxx b/inc/libodfgen/OdtGenerator.hxx ++index 9c3ff88..e11778c 100644 ++--- a/inc/libodfgen/OdtGenerator.hxx +++++ b/inc/libodfgen/OdtGenerator.hxx ++@@ -29,6 +29,7 @@ ++ ++ #include ++ +++#include "libodfgen-api.hxx" ++ #include "OdfDocumentHandler.hxx" ++ ++ /** Handler for embedded objects. ++@@ -39,7 +40,7 @@ class OdfGenerator; ++ * See @c libwpd library for documentation of the ::WPXDocumentInterface ++ * interface. ++ */ ++-class OdtGenerator : public WPXDocumentInterface +++class ODFGENAPI OdtGenerator : public WPXDocumentInterface ++ { ++ public: ++ OdtGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType); ++diff --git a/inc/libodfgen/libodfgen-api.hxx b/inc/libodfgen/libodfgen-api.hxx ++new file mode 100644 ++index 0000000..39ffd05 ++--- /dev/null +++++ b/inc/libodfgen/libodfgen-api.hxx ++@@ -0,0 +1,38 @@ +++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +++/* libodfgen +++ * Version: MPL 2.0 / LGPLv2.1+ +++ * +++ * This Source Code Form is subject to the terms of the Mozilla Public +++ * License, v. 2.0. If a copy of the MPL was not distributed with this +++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. +++ * +++ * Major Contributor(s): +++ * Copyright (C) 2013 Fridrich Strba +++ * Copyright (C) 2011 Eilidh McAdam +++ * +++ * For minor contributions see the git repository. +++ * +++ * Alternatively, the contents of this file may be used under the terms +++ * of the GNU Lesser General Public License Version 2.1 or later +++ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are +++ * applicable instead of those above. +++ * +++ * For further information visit http://libwpd.sourceforge.net +++ */ +++ +++#ifndef INCLUDED_LIBODFGEN_LIBODFGEN_API_HXX +++#define INCLUDED_LIBODFGEN_LIBODFGEN_API_HXX +++ +++#ifdef DLL_EXPORT +++#ifdef LIBODFGEN_BUILD +++#define ODFGENAPI __declspec(dllexport) +++#else +++#define ODFGENAPI __declspec(dllimport) +++#endif +++#else +++#define ODFGENAPI +++#endif +++ +++#endif // INCLUDED_LIBODFGEN_LIBODFGEN_API_HXX +++ +++/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ ++-- ++1.9.0 ++ +diff --git a/external/libodfgen/ExternalPackage_libodfgen.mk b/external/libodfgen/ExternalPackage_libodfgen.mk +new file mode 100644 +index 0000000..a0692ed +--- /dev/null ++++ b/external/libodfgen/ExternalPackage_libodfgen.mk +@@ -0,0 +1,22 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++# ++# This file is part of the LibreOffice project. ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++# ++ ++$(eval $(call gb_ExternalPackage_ExternalPackage,libodfgen,libodfgen)) ++ ++$(eval $(call gb_ExternalPackage_use_external_project,libodfgen,libodfgen)) ++ ++ifeq ($(OS),MACOSX) ++$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.0.0.dylib,src/.libs/libodfgen-0.0.dylib)) ++else ifeq ($(OS),WNT) ++$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.0.dll,src/.libs/libodfgen-0.0.dll)) ++else ifeq ($(filter IOS ANDROID,$(OS)),) ++$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.0.so.0,src/.libs/libodfgen-0.0.so.0.0.4)) ++endif ++ ++# vim: set noet sw=4 ts=4: +diff --git a/external/libodfgen/ExternalProject_libodfgen.mk b/external/libodfgen/ExternalProject_libodfgen.mk +index fc88a48..80cb2b0 100644 +--- a/external/libodfgen/ExternalProject_libodfgen.mk ++++ b/external/libodfgen/ExternalProject_libodfgen.mk +@@ -27,16 +27,17 @@ $(call gb_ExternalProject_get_state_target,libodfgen,build) : + export PKG_CONFIG="" \ + && ./configure \ + --with-pic \ +- --enable-static \ +- --disable-shared \ ++ --enable-shared \ ++ --disable-static \ + --disable-debug \ + --disable-werror \ + --disable-weffc \ ++ --without-docs \ ++ $(if $(VERBOSE)$(verbose),--enable-silent-rules) \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && (cd $(EXTERNAL_WORKDIR)/src && \ +- $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE)) \ ++ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libodfgen/Library_odfgen.mk b/external/libodfgen/Library_odfgen.mk +new file mode 100644 +index 0000000..ce18735 +--- /dev/null ++++ b/external/libodfgen/Library_odfgen.mk +@@ -0,0 +1,50 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++# ++# This file is part of the LibreOffice project. ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++# ++ ++$(eval $(call gb_Library_Library,odfgen)) ++ ++$(eval $(call gb_Library_use_unpacked,odfgen,libodfgen)) ++ ++$(eval $(call gb_Library_use_externals,odfgen,\ ++ boost_headers \ ++ etonyek \ ++ wpd \ ++ wpg \ ++)) ++ ++$(eval $(call gb_Library_set_warnings_not_errors,odfgen)) ++ ++$(eval $(call gb_Library_set_include,odfgen,\ ++ -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \ ++ $$(INCLUDE) \ ++)) ++ ++$(eval $(call gb_Library_add_defs,odfgen,\ ++ -DBOOST_ALL_NO_LIB \ ++ -DDLL_EXPORT \ ++ -DLIBODFGEN_BUILD \ ++ -DNDEBUG \ ++)) ++ ++$(eval $(call gb_Library_add_generated_exception_objects,odfgen,\ ++ UnpackedTarball/libodfgen/src/DocumentElement \ ++ UnpackedTarball/libodfgen/src/FontStyle \ ++ UnpackedTarball/libodfgen/src/GraphicFunctions \ ++ UnpackedTarball/libodfgen/src/InternalHandler \ ++ UnpackedTarball/libodfgen/src/ListStyle \ ++ UnpackedTarball/libodfgen/src/OdgGenerator \ ++ UnpackedTarball/libodfgen/src/OdpGenerator \ ++ UnpackedTarball/libodfgen/src/OdtGenerator \ ++ UnpackedTarball/libodfgen/src/PageSpan \ ++ UnpackedTarball/libodfgen/src/SectionStyle \ ++ UnpackedTarball/libodfgen/src/TableStyle \ ++ UnpackedTarball/libodfgen/src/TextRunStyle \ ++)) ++ ++# vim: set noet sw=4 ts=4: +diff --git a/external/libodfgen/Module_libodfgen.mk b/external/libodfgen/Module_libodfgen.mk +index d94d34f..c107274 100644 +--- a/external/libodfgen/Module_libodfgen.mk ++++ b/external/libodfgen/Module_libodfgen.mk +@@ -10,8 +10,22 @@ + $(eval $(call gb_Module_Module,libodfgen)) + + $(eval $(call gb_Module_add_targets,libodfgen,\ +- ExternalProject_libodfgen \ + UnpackedTarball_libodfgen \ + )) + ++ifeq ($(COM),MSC) ++ ++$(eval $(call gb_Module_add_targets,libodfgen,\ ++ Library_odfgen \ ++)) ++ ++else ++ ++$(eval $(call gb_Module_add_targets,libodfgen,\ ++ ExternalPackage_libodfgen \ ++ ExternalProject_libodfgen \ ++)) ++ ++endif ++ + # vim: set noet sw=4 ts=4: +diff --git a/external/libodfgen/UnpackedTarball_libodfgen.mk b/external/libodfgen/UnpackedTarball_libodfgen.mk +index 1a7f26c..fc8f6e2 100644 +--- a/external/libodfgen/UnpackedTarball_libodfgen.mk ++++ b/external/libodfgen/UnpackedTarball_libodfgen.mk +@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libodfgen)) + + $(eval $(call gb_UnpackedTarball_set_tarball,libodfgen,$(ODFGEN_TARBALL))) + ++$(eval $(call gb_UnpackedTarball_set_patchlevel,libodfgen,1)) ++ ++$(eval $(call gb_UnpackedTarball_add_patches,libodfgen,\ ++ external/libodfgen/0001-properly-export-API-symbols.patch \ ++)) ++ + # vim: set noet sw=4 ts=4: +-- +1.9.3 + diff --git a/0002-bundle-librevenge.patch b/0002-bundle-librevenge.patch new file mode 100644 index 0000000..fdebe45 --- /dev/null +++ b/0002-bundle-librevenge.patch @@ -0,0 +1,1139 @@ +From 0e6ee5eba2295cf2d9963496085c4892e94abc48 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sat, 24 May 2014 08:39:54 +0200 +Subject: [PATCH 2/9] bundle librevenge + +Change-Id: Ic36c1670866545db2cf2f29867de7e5b0ad2d57d +--- + Makefile.fetch | 1 + + RepositoryExternal.mk | 53 ++ + config_host.mk.in | 2 + + configure.ac | 5 + + download.lst | 2 + + external/Module_external.mk | 1 + + .../0001-properly-export-API-symbols.patch | 752 +++++++++++++++++++++ + external/librevenge/ExternalPackage_librevenge.mk | 22 + + external/librevenge/ExternalProject_librevenge.mk | 44 ++ + external/librevenge/Library_revenge.mk | 48 ++ + external/librevenge/Makefile | 7 + + external/librevenge/Module_librevenge.mk | 31 + + external/librevenge/README | 3 + + external/librevenge/UnpackedTarball_librevenge.mk | 20 + + 14 files changed, 991 insertions(+) + create mode 100644 external/librevenge/0001-properly-export-API-symbols.patch + create mode 100644 external/librevenge/ExternalPackage_librevenge.mk + create mode 100644 external/librevenge/ExternalProject_librevenge.mk + create mode 100644 external/librevenge/Library_revenge.mk + create mode 100644 external/librevenge/Makefile + create mode 100644 external/librevenge/Module_librevenge.mk + create mode 100644 external/librevenge/README + create mode 100644 external/librevenge/UnpackedTarball_librevenge.mk + +diff --git a/Makefile.fetch b/Makefile.fetch +index b9f500f..204c8f8 100644 +--- a/Makefile.fetch ++++ b/Makefile.fetch +@@ -195,6 +195,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR) + $(call fetch_Optional,REDLAND,RAPTOR_TARBALL) \ + $(call fetch_Optional,REDLAND,RASQAL_TARBALL) \ + $(call fetch_Optional,REDLAND,REDLAND_TARBALL) \ ++ $(call fetch_Optional,REVENGE,REVENGE_TARBALL) \ + $(call fetch_Optional,RHINO,RHINO_TARBALL) \ + $(call fetch_Optional,RHINO,SWING_TARBALL) \ + $(call fetch_Optional,SERF,SERF_TARBALL) \ +diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk +index 52c4c6d..13eb221 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -1761,6 +1761,59 @@ endif + endif # SYSTEM_ODFGEN + + ++ifneq ($(SYSTEM_REVENGE),) ++ ++define gb_LinkTarget__use_revenge ++$(call gb_LinkTarget_set_include,$(1),\ ++ $$(INCLUDE) \ ++ $(REVENGE_CFLAGS) \ ++) ++$(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS)) ++ ++endef ++ ++else # !SYSTEM_REVENGE ++ ++ifeq ($(COM),MSC) ++ ++$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\ ++ revenge \ ++)) ++ ++define gb_LinkTarget__use_revenge ++$(call gb_LinkTarget_set_include,$(1),\ ++ -I$(call gb_UnpackedTarball_get_dir,librevenge)/inc \ ++ $$(INCLUDE) \ ++) ++$(call gb_LinkTarget_use_libraries,$(1),\ ++ revenge \ ++) ++ ++endef ++ ++else # !MSC ++ ++$(eval $(call gb_Helper_register_packages_for_install,ooo, \ ++ librevenge \ ++)) ++ ++define gb_LinkTarget__use_revenge ++$(call gb_LinkTarget_use_package,$(1),librevenge) ++ ++$(call gb_LinkTarget_set_include,$(1),\ ++ -I$(call gb_UnpackedTarball_get_dir,librevenge)/inc \ ++ $$(INCLUDE) \ ++) ++$(call gb_LinkTarget_add_libs,$(1),\ ++ -L$(call gb_UnpackedTarball_get_dir,librevenge)/src/lib/.libs -lrevenge-0.0 \ ++) ++endef ++ ++endif # MSC ++ ++endif # SYSTEM_REVENGE ++ ++ + ifneq ($(SYSTEM_ABW),) + + define gb_LinkTarget__use_abw +diff --git a/config_host.mk.in b/config_host.mk.in +index b287539..27615e9 100644 +--- a/config_host.mk.in ++++ b/config_host.mk.in +@@ -464,6 +464,8 @@ export RASQAL_MAJOR=@RASQAL_MAJOR@ + export REDLAND_CFLAGS=$(gb_SPACE)@REDLAND_CFLAGS@ + export REDLAND_LIBS=$(gb_SPACE)@REDLAND_LIBS@ + export REDLAND_MAJOR=@REDLAND_MAJOR@ ++export REVENGE_CFLAGS=$(gb_SPACE)@REVENGE_CFLAGS@ ++export REVENGE_LIBS=$(gb_SPACE)@REVENGE_LIBS@ + export RHINO_JAR=@RHINO_JAR@ + export RPM=@RPM@ + export RTL_ARCH=@RTL_ARCH@ +diff --git a/configure.ac b/configure.ac +index d407a5e..ad27916 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7663,6 +7663,11 @@ fi + AC_SUBST([ENABLE_EOT]) + + dnl =================================================================== ++dnl Check for system librevenge ++dnl =================================================================== ++libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0]) ++ ++dnl =================================================================== + dnl Check for system libe-book + dnl =================================================================== + libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.0 >= 0.0.2],["-I${WORKDIR}/UnpackedTarball/libebook/inc"],["-L${WORKDIR}/UnpackedTarball/libebook/src/lib/.libs -le-book-0.0"]) +diff --git a/download.lst b/download.lst +index 0601ccd..19cfb4b 100644 +--- a/download.lst ++++ b/download.lst +@@ -121,6 +121,8 @@ export PYTHON_TARBALL := Python-3.3.5.tgz + export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz + export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz + export REDLAND_TARBALL := 32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz ++export REVENGE_MD5SUM := b483b99af21c92c763a1c6a28ebee958 ++export REVENGE_TARBALL := librevenge-0.0.0.tar.bz2 + export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip + export SERF_MD5SUM := 4f8e76c9c6567aee1d66aba49f76a58b + export SERF_TARBALL := serf-1.2.1.tar.bz2 +diff --git a/external/Module_external.mk b/external/Module_external.mk +index 4f9dde6..7049278 100644 +--- a/external/Module_external.mk ++++ b/external/Module_external.mk +@@ -84,6 +84,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ + $(call gb_Helper_optional,POSTGRESQL,postgresql) \ + $(call gb_Helper_optional,PYTHON,python3) \ + $(call gb_Helper_optional,REDLAND,redland) \ ++ $(call gb_Helper_optional,REVENGE,librevenge) \ + $(call gb_Helper_optional,RHINO,rhino) \ + $(call gb_Helper_optional,SERF,serf) \ + $(call gb_Helper_optional,UCPP,ucpp) \ +diff --git a/external/librevenge/0001-properly-export-API-symbols.patch b/external/librevenge/0001-properly-export-API-symbols.patch +new file mode 100644 +index 0000000..64513a0 +--- /dev/null ++++ b/external/librevenge/0001-properly-export-API-symbols.patch +@@ -0,0 +1,752 @@ ++From d0df6db52ae8db3b3e9549837e698a091474e727 Mon Sep 17 00:00:00 2001 ++From: David Tardon ++Date: Sun, 25 May 2014 08:52:57 +0200 ++Subject: [PATCH] properly export API symbols ++ ++--- ++ inc/librevenge-generators/Makefile.am | 1 + ++ .../RVNGCSVSpreadsheetGenerator.h | 4 ++- ++ inc/librevenge-generators/RVNGHTMLTextGenerator.h | 4 ++- ++ .../RVNGRawDrawingGenerator.h | 4 ++- ++ .../RVNGRawPresentationGenerator.h | 4 ++- ++ .../RVNGRawSpreadsheetGenerator.h | 4 ++- ++ inc/librevenge-generators/RVNGRawTextGenerator.h | 4 ++- ++ .../RVNGSVGPresentationGenerator.h | 4 ++- ++ .../RVNGTextDrawingGenerator.h | 4 ++- ++ .../RVNGTextPresentationGenerator.h | 9 +++++- ++ .../RVNGTextSpreadsheetGenerator.h | 4 ++- ++ inc/librevenge-generators/RVNGTextTextGenerator.h | 4 ++- ++ .../librevenge-generators-api.h | 36 ++++++++++++++++++++++ ++ inc/librevenge-stream/Makefile.am | 1 + ++ inc/librevenge-stream/RVNGDirectoryStream.h | 4 ++- ++ inc/librevenge-stream/RVNGStream.h | 4 ++- ++ inc/librevenge-stream/RVNGStreamImplementation.h | 6 ++-- ++ inc/librevenge-stream/librevenge-stream-api.h | 36 ++++++++++++++++++++++ ++ inc/librevenge/Makefile.am | 1 + ++ inc/librevenge/RVNGBinaryData.h | 5 ++- ++ inc/librevenge/RVNGDrawingInterface.h | 4 ++- ++ inc/librevenge/RVNGPresentationInterface.h | 4 ++- ++ inc/librevenge/RVNGProperty.h | 7 +++-- ++ inc/librevenge/RVNGPropertyList.h | 5 ++- ++ inc/librevenge/RVNGPropertyListVector.h | 4 ++- ++ inc/librevenge/RVNGSVGDrawingGenerator.h | 4 ++- ++ inc/librevenge/RVNGSpreadsheetInterface.h | 4 ++- ++ inc/librevenge/RVNGString.h | 4 ++- ++ inc/librevenge/RVNGStringVector.h | 4 ++- ++ inc/librevenge/RVNGTextInterface.h | 4 ++- ++ inc/librevenge/librevenge-api.h | 36 ++++++++++++++++++++++ ++ src/lib/Makefile.am | 6 ++++ ++ 32 files changed, 202 insertions(+), 27 deletions(-) ++ create mode 100644 inc/librevenge-generators/librevenge-generators-api.h ++ create mode 100644 inc/librevenge-stream/librevenge-stream-api.h ++ create mode 100644 inc/librevenge/librevenge-api.h ++ ++diff --git a/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h b/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h ++index 40cce77..084b55c 100644 ++--- a/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h +++++ b/inc/librevenge-generators/RVNGCSVSpreadsheetGenerator.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGCSVSPREADSHEETGENERATOR_H ++ #define RVNGCSVSPREADSHEETGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -32,7 +34,7 @@ struct RVNGCSVSpreadsheetGeneratorImpl; ++ * ++ * See \c ::librevenge::RVNGSpreadsheetInterface for documentation of the basic interface. ++ */ ++-class RVNGCSVSpreadsheetGenerator : public RVNGSpreadsheetInterface +++class REVENGE_GENERATORS_API RVNGCSVSpreadsheetGenerator : public RVNGSpreadsheetInterface ++ { ++ //! unimplemented copy constructor to prevent copy ++ RVNGCSVSpreadsheetGenerator(const RVNGCSVSpreadsheetGenerator &other); ++diff --git a/inc/librevenge-generators/RVNGHTMLTextGenerator.h b/inc/librevenge-generators/RVNGHTMLTextGenerator.h ++index 9bb9b77..6dacfb8 100644 ++--- a/inc/librevenge-generators/RVNGHTMLTextGenerator.h +++++ b/inc/librevenge-generators/RVNGHTMLTextGenerator.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGHTMLTEXTGENERATOR_H ++ #define RVNGHTMLTEXTGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -29,7 +31,7 @@ namespace librevenge ++ ++ struct RVNGHTMLTextGeneratorImpl; ++ ++-class RVNGHTMLTextGenerator : public RVNGTextInterface +++class REVENGE_GENERATORS_API RVNGHTMLTextGenerator : public RVNGTextInterface ++ { ++ public: ++ explicit RVNGHTMLTextGenerator(RVNGString &document); ++diff --git a/inc/librevenge-generators/RVNGRawDrawingGenerator.h b/inc/librevenge-generators/RVNGRawDrawingGenerator.h ++index 2b60cc3..a0a6475 100644 ++--- a/inc/librevenge-generators/RVNGRawDrawingGenerator.h +++++ b/inc/librevenge-generators/RVNGRawDrawingGenerator.h ++@@ -22,6 +22,8 @@ ++ #ifndef RVNGRAWDRAWINGGENERATOR_H ++ #define RVNGRAWDRAWINGGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -30,7 +32,7 @@ namespace librevenge ++ ++ struct RVNGRawDrawingGeneratorImpl; ++ ++-class RVNGRawDrawingGenerator : public RVNGDrawingInterface +++class REVENGE_GENERATORS_API RVNGRawDrawingGenerator : public RVNGDrawingInterface ++ { ++ // disable copying ++ RVNGRawDrawingGenerator(const RVNGRawDrawingGenerator &other); ++diff --git a/inc/librevenge-generators/RVNGRawPresentationGenerator.h b/inc/librevenge-generators/RVNGRawPresentationGenerator.h ++index 8a3f1c9..9438541 100644 ++--- a/inc/librevenge-generators/RVNGRawPresentationGenerator.h +++++ b/inc/librevenge-generators/RVNGRawPresentationGenerator.h ++@@ -15,6 +15,8 @@ ++ #ifndef RVNGRAWPRESENTATIONGENERATOR_H ++ #define RVNGRAWPRESENTATIONGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -23,7 +25,7 @@ namespace librevenge ++ ++ struct RVNGRawPresentationGeneratorImpl; ++ ++-class RVNGRawPresentationGenerator : public RVNGPresentationInterface +++class REVENGE_GENERATORS_API RVNGRawPresentationGenerator : public RVNGPresentationInterface ++ { ++ // disable copying ++ RVNGRawPresentationGenerator(const RVNGRawPresentationGenerator &other); ++diff --git a/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h b/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h ++index ff584c7..84be1c1 100644 ++--- a/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h +++++ b/inc/librevenge-generators/RVNGRawSpreadsheetGenerator.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGRAWSPREADSHEETGENERATOR_H ++ #define RVNGRAWSPREADSHEETGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -29,7 +31,7 @@ namespace librevenge ++ ++ struct RVNGRawSpreadsheetGeneratorImpl; ++ ++-class RVNGRawSpreadsheetGenerator : public RVNGSpreadsheetInterface +++class REVENGE_GENERATORS_API RVNGRawSpreadsheetGenerator : public RVNGSpreadsheetInterface ++ { ++ // disable copying ++ RVNGRawSpreadsheetGenerator(const RVNGRawSpreadsheetGenerator &other); ++diff --git a/inc/librevenge-generators/RVNGRawTextGenerator.h b/inc/librevenge-generators/RVNGRawTextGenerator.h ++index 2df33d4..7781b07 100644 ++--- a/inc/librevenge-generators/RVNGRawTextGenerator.h +++++ b/inc/librevenge-generators/RVNGRawTextGenerator.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGRAWTEXTGENERATOR_H ++ #define RVNGRAWTEXTGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -29,7 +31,7 @@ namespace librevenge ++ ++ struct RVNGRawTextGeneratorImpl; ++ ++-class RVNGRawTextGenerator : public RVNGTextInterface +++class REVENGE_GENERATORS_API RVNGRawTextGenerator : public RVNGTextInterface ++ { ++ // disable copying ++ RVNGRawTextGenerator(const RVNGRawTextGenerator &other); ++diff --git a/inc/librevenge-generators/RVNGSVGPresentationGenerator.h b/inc/librevenge-generators/RVNGSVGPresentationGenerator.h ++index 996ee35..2e18da1 100644 ++--- a/inc/librevenge-generators/RVNGSVGPresentationGenerator.h +++++ b/inc/librevenge-generators/RVNGSVGPresentationGenerator.h ++@@ -15,6 +15,8 @@ ++ #ifndef RVNGSVGPRESENTATIONGENERATOR_H ++ #define RVNGSVGPRESENTATIONGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -23,7 +25,7 @@ namespace librevenge ++ ++ struct RVNGSVGPresentationGeneratorImpl; ++ ++-class RVNGSVGPresentationGenerator : public RVNGPresentationInterface +++class REVENGE_GENERATORS_API RVNGSVGPresentationGenerator : public RVNGPresentationInterface ++ { ++ // disable copying ++ RVNGSVGPresentationGenerator(const RVNGSVGPresentationGenerator &other); ++diff --git a/inc/librevenge-generators/RVNGTextDrawingGenerator.h b/inc/librevenge-generators/RVNGTextDrawingGenerator.h ++index ba9a9cc..2b3160e 100644 ++--- a/inc/librevenge-generators/RVNGTextDrawingGenerator.h +++++ b/inc/librevenge-generators/RVNGTextDrawingGenerator.h ++@@ -15,6 +15,8 @@ ++ #ifndef RVNGTEXTDRAWINGGENERATOR_H ++ #define RVNGTEXTDRAWINGGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -23,7 +25,7 @@ namespace librevenge ++ ++ struct RVNGTextDrawingGeneratorImpl; ++ ++-class RVNGTextDrawingGenerator : public RVNGDrawingInterface +++class REVENGE_GENERATORS_API RVNGTextDrawingGenerator : public RVNGDrawingInterface ++ { ++ // disable copying ++ RVNGTextDrawingGenerator(const RVNGTextDrawingGenerator &other); ++diff --git a/inc/librevenge-generators/RVNGTextPresentationGenerator.h b/inc/librevenge-generators/RVNGTextPresentationGenerator.h ++index f89691e..9bef369 100644 ++--- a/inc/librevenge-generators/RVNGTextPresentationGenerator.h +++++ b/inc/librevenge-generators/RVNGTextPresentationGenerator.h ++@@ -12,6 +12,11 @@ ++ * applicable instead of those above. ++ */ ++ +++#ifndef RVNGTEXTPRESENTATIONGENERATOR_H +++#define RVNGTEXTPRESENTATIONGENERATOR_H +++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -20,7 +25,7 @@ namespace librevenge ++ ++ struct RVNGTextPresentationGeneratorImpl; ++ ++-class RVNGTextPresentationGenerator : public RVNGPresentationInterface +++class REVENGE_GENERATORS_API RVNGTextPresentationGenerator : public RVNGPresentationInterface ++ { ++ // disable copying ++ RVNGTextPresentationGenerator(const RVNGTextPresentationGenerator &other); ++@@ -124,4 +129,6 @@ private: ++ ++ } ++ +++#endif +++ ++ /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ ++diff --git a/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h b/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h ++index e140153..9ac9dc8 100644 ++--- a/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h +++++ b/inc/librevenge-generators/RVNGTextSpreadsheetGenerator.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGTEXTSPREADSHEETGENERATOR_H ++ #define RVNGTEXTSPREADSHEETGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -32,7 +34,7 @@ struct RVNGTextSpreadsheetGeneratorImpl; ++ * ++ * See \c ::librevenge::RVNGSpreadsheetInterface for documentation of the basic interface. ++ */ ++-class RVNGTextSpreadsheetGenerator : public RVNGSpreadsheetInterface +++class REVENGE_GENERATORS_API RVNGTextSpreadsheetGenerator : public RVNGSpreadsheetInterface ++ { ++ //! unimplemented copy constructor to prevent copy ++ RVNGTextSpreadsheetGenerator(const RVNGTextSpreadsheetGenerator &other); ++diff --git a/inc/librevenge-generators/RVNGTextTextGenerator.h b/inc/librevenge-generators/RVNGTextTextGenerator.h ++index 87828fd..ec657d5 100644 ++--- a/inc/librevenge-generators/RVNGTextTextGenerator.h +++++ b/inc/librevenge-generators/RVNGTextTextGenerator.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGTEXTTEXTGENERATOR_H ++ #define RVNGTEXTTEXTGENERATOR_H ++ +++#include "librevenge-generators-api.h" +++ ++ #include ++ #include ++ ++@@ -29,7 +31,7 @@ namespace librevenge ++ ++ struct RVNGTextTextGeneratorImpl; ++ ++-class RVNGTextTextGenerator : public RVNGTextInterface +++class REVENGE_GENERATORS_API RVNGTextTextGenerator : public RVNGTextInterface ++ { ++ // disable copying ++ RVNGTextTextGenerator(const RVNGTextTextGenerator &other); ++diff --git a/inc/librevenge-generators/librevenge-generators-api.h b/inc/librevenge-generators/librevenge-generators-api.h ++new file mode 100644 ++index 0000000..8d4a5ea ++--- /dev/null +++++ b/inc/librevenge-generators/librevenge-generators-api.h ++@@ -0,0 +1,36 @@ +++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +++/* librevenge +++ * Version: MPL 2.0 / LGPLv2.1+ +++ * +++ * This Source Code Form is subject to the terms of the Mozilla Public +++ * License, v. 2.0. If a copy of the MPL was not distributed with this +++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. +++ * +++ * Major Contributor(s): +++ * Copyright (C) 2002 William Lachance (wrlach@gmail.com) +++ * Copyright (C) 2002 Marc Maurer (uwog@uwog.net) +++ * +++ * For minor contributions see the git repository. +++ * +++ * Alternatively, the contents of this file may be used under the terms +++ * of the GNU Lesser General Public License Version 2.1 or later +++ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are +++ * applicable instead of those above. +++ */ +++ +++#ifndef INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H +++#define INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H +++ +++#ifdef DLL_EXPORT +++#ifdef LIBREVENGE_GENERATORS_BUILD +++#define REVENGE_GENERATORS_API __declspec(dllexport) +++#else +++#define REVENGE_GENERATORS_API __declspec(dllimport) +++#endif +++#else +++#define REVENGE_GENERATORS_API +++#endif +++ +++#endif /* INCLUDED_LIBREVENGE_GENERATORS_LIBREVENGE_GENERATORS_API_H */ +++ +++/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ ++diff --git a/inc/librevenge-stream/RVNGDirectoryStream.h b/inc/librevenge-stream/RVNGDirectoryStream.h ++index dee185e..46d2101 100644 ++--- a/inc/librevenge-stream/RVNGDirectoryStream.h +++++ b/inc/librevenge-stream/RVNGDirectoryStream.h ++@@ -22,6 +22,8 @@ ++ #ifndef RVNGDIRECTORYSTREAM_H_INCLUDED ++ #define RVNGDIRECTORYSTREAM_H_INCLUDED ++ +++#include "librevenge-stream-api.h" +++ ++ #include "RVNGStream.h" ++ ++ namespace librevenge ++@@ -29,7 +31,7 @@ namespace librevenge ++ ++ struct RVNGDirectoryStreamImpl; ++ ++-class RVNGDirectoryStream : public RVNGInputStream +++class REVENGE_STREAM_API RVNGDirectoryStream : public RVNGInputStream ++ { ++ // disable copying ++ RVNGDirectoryStream(const RVNGDirectoryStream &); ++diff --git a/inc/librevenge-stream/RVNGStream.h b/inc/librevenge-stream/RVNGStream.h ++index 6b1b38e..1b40bef 100644 ++--- a/inc/librevenge-stream/RVNGStream.h +++++ b/inc/librevenge-stream/RVNGStream.h ++@@ -20,6 +20,8 @@ ++ #ifndef RVNGSTREAM_H ++ #define RVNGSTREAM_H ++ +++#include "librevenge-stream-api.h" +++ ++ namespace librevenge ++ { ++ ++@@ -30,7 +32,7 @@ enum RVNG_SEEK_TYPE ++ RVNG_SEEK_END ++ }; ++ ++-class RVNGInputStream +++class REVENGE_STREAM_API RVNGInputStream ++ { ++ public: ++ RVNGInputStream() {} ++diff --git a/inc/librevenge-stream/RVNGStreamImplementation.h b/inc/librevenge-stream/RVNGStreamImplementation.h ++index 06ff938..f4c1a74 100644 ++--- a/inc/librevenge-stream/RVNGStreamImplementation.h +++++ b/inc/librevenge-stream/RVNGStreamImplementation.h ++@@ -20,6 +20,8 @@ ++ #ifndef RVNGSTREAMIMPLEMENTATION_H ++ #define RVNGSTREAMIMPLEMENTATION_H ++ +++#include "librevenge-stream-api.h" +++ ++ #include "RVNGStream.h" ++ ++ namespace librevenge ++@@ -27,7 +29,7 @@ namespace librevenge ++ ++ class RVNGFileStreamPrivate; ++ ++-class RVNGFileStream: public RVNGInputStream +++class REVENGE_STREAM_API RVNGFileStream: public RVNGInputStream ++ { ++ public: ++ explicit RVNGFileStream(const char *filename); ++@@ -53,7 +55,7 @@ private: ++ ++ class RVNGStringStreamPrivate; ++ ++-class RVNGStringStream: public RVNGInputStream +++class REVENGE_STREAM_API RVNGStringStream: public RVNGInputStream ++ { ++ public: ++ RVNGStringStream(const unsigned char *data, const unsigned int dataSize); ++diff --git a/inc/librevenge-stream/librevenge-stream-api.h b/inc/librevenge-stream/librevenge-stream-api.h ++new file mode 100644 ++index 0000000..5b544fc ++--- /dev/null +++++ b/inc/librevenge-stream/librevenge-stream-api.h ++@@ -0,0 +1,36 @@ +++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +++/* librevenge +++ * Version: MPL 2.0 / LGPLv2.1+ +++ * +++ * This Source Code Form is subject to the terms of the Mozilla Public +++ * License, v. 2.0. If a copy of the MPL was not distributed with this +++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. +++ * +++ * Major Contributor(s): +++ * Copyright (C) 2002 William Lachance (wrlach@gmail.com) +++ * Copyright (C) 2002 Marc Maurer (uwog@uwog.net) +++ * +++ * For minor contributions see the git repository. +++ * +++ * Alternatively, the contents of this file may be used under the terms +++ * of the GNU Lesser General Public License Version 2.1 or later +++ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are +++ * applicable instead of those above. +++ */ +++ +++#ifndef INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H +++#define INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H +++ +++#ifdef DLL_EXPORT +++#ifdef LIBREVENGE_STREAM_BUILD +++#define REVENGE_STREAM_API __declspec(dllexport) +++#else +++#define REVENGE_STREAM_API __declspec(dllimport) +++#endif +++#else +++#define REVENGE_STREAM_API +++#endif +++ +++#endif /* INCLUDED_LIBREVENGE_STREAM_LIBREVENGE_STREAM_API_H */ +++ +++/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ ++diff --git a/inc/librevenge/RVNGBinaryData.h b/inc/librevenge/RVNGBinaryData.h ++index c09b26a..825f4dc 100644 ++--- a/inc/librevenge/RVNGBinaryData.h +++++ b/inc/librevenge/RVNGBinaryData.h ++@@ -20,7 +20,10 @@ ++ #ifndef RVNGBINARYDATA_H ++ #define RVNGBINARYDATA_H ++ +++#include "librevenge-api.h" +++ ++ #include +++ ++ #include "RVNGString.h" ++ ++ namespace librevenge ++@@ -28,7 +31,7 @@ namespace librevenge ++ ++ struct RVNGBinaryDataImpl; ++ ++-class RVNGBinaryData +++class REVENGE_API RVNGBinaryData ++ { ++ public: ++ RVNGBinaryData(); ++diff --git a/inc/librevenge/RVNGDrawingInterface.h b/inc/librevenge/RVNGDrawingInterface.h ++index 0030e49..3b87cda 100644 ++--- a/inc/librevenge/RVNGDrawingInterface.h +++++ b/inc/librevenge/RVNGDrawingInterface.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGDRAWINGINTERFACE_H ++ #define RVNGDRAWINGINTERFACE_H ++ +++#include "librevenge-api.h" +++ ++ #include "RVNGPropertyList.h" ++ #include "RVNGPropertyListVector.h" ++ #include "RVNGBinaryData.h" ++@@ -28,7 +30,7 @@ ++ namespace librevenge ++ { ++ ++-class RVNGDrawingInterface +++class REVENGE_API RVNGDrawingInterface ++ { ++ public: ++ virtual ~RVNGDrawingInterface() {} ++diff --git a/inc/librevenge/RVNGPresentationInterface.h b/inc/librevenge/RVNGPresentationInterface.h ++index 2142082..32fec64 100644 ++--- a/inc/librevenge/RVNGPresentationInterface.h +++++ b/inc/librevenge/RVNGPresentationInterface.h ++@@ -15,6 +15,8 @@ ++ #ifndef RVNGPRESENTATIONINTERFACE_H ++ #define RVNGPRESENTATIONINTERFACE_H ++ +++#include "librevenge-api.h" +++ ++ #include "RVNGPropertyList.h" ++ #include "RVNGPropertyListVector.h" ++ ++@@ -23,7 +25,7 @@ namespace librevenge ++ ++ /** Interface for import of presentations. ++ */ ++-class RVNGPresentationInterface +++class REVENGE_API RVNGPresentationInterface ++ { ++ public: ++ virtual ~RVNGPresentationInterface() {} ++diff --git a/inc/librevenge/RVNGProperty.h b/inc/librevenge/RVNGProperty.h ++index 46c94fa..df56c2c 100644 ++--- a/inc/librevenge/RVNGProperty.h +++++ b/inc/librevenge/RVNGProperty.h ++@@ -19,6 +19,9 @@ ++ ++ #ifndef RVNGPROPERTY_H ++ #define RVNGPROPERTY_H +++ +++#include "librevenge-api.h" +++ ++ #include "RVNGString.h" ++ ++ namespace librevenge ++@@ -26,7 +29,7 @@ namespace librevenge ++ ++ enum RVNGUnit { RVNG_INCH, RVNG_PERCENT, RVNG_POINT, RVNG_TWIP, RVNG_GENERIC, RVNG_UNIT_ERROR }; ++ ++-class RVNGProperty +++class REVENGE_API RVNGProperty ++ { ++ public: ++ virtual ~RVNGProperty(); ++@@ -38,7 +41,7 @@ public: ++ virtual RVNGProperty *clone() const = 0; ++ }; ++ ++-class RVNGPropertyFactory +++class REVENGE_API RVNGPropertyFactory ++ { ++ public: ++ static RVNGProperty *newStringProp(const RVNGString &str); ++diff --git a/inc/librevenge/RVNGPropertyList.h b/inc/librevenge/RVNGPropertyList.h ++index 8d08bc9..c00af07 100644 ++--- a/inc/librevenge/RVNGPropertyList.h +++++ b/inc/librevenge/RVNGPropertyList.h ++@@ -20,6 +20,9 @@ ++ ++ #ifndef RVNGPROPERTYLIST_H ++ #define RVNGPROPERTYLIST_H +++ +++#include "librevenge-api.h" +++ ++ #include "RVNGProperty.h" ++ ++ namespace librevenge ++@@ -32,7 +35,7 @@ class RVNGPropertyListImpl; ++ class RVNGPropertyListIterImpl; ++ class RVNGPropertyListVector; ++ ++-class RVNGPropertyList +++class REVENGE_API RVNGPropertyList ++ { ++ public: ++ RVNGPropertyList(); ++diff --git a/inc/librevenge/RVNGPropertyListVector.h b/inc/librevenge/RVNGPropertyListVector.h ++index 33c4f22..850326e 100644 ++--- a/inc/librevenge/RVNGPropertyListVector.h +++++ b/inc/librevenge/RVNGPropertyListVector.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGPROPERTYLISTVECTOR_H ++ #define RVNGPROPERTYLISTVECTOR_H ++ +++#include "librevenge-api.h" +++ ++ #include "RVNGPropertyList.h" ++ ++ namespace librevenge ++@@ -29,7 +31,7 @@ namespace librevenge ++ class RVNGPropertyListVectorImpl; ++ class RVNGPropertyListVectorIterImpl; ++ ++-class RVNGPropertyListVector : public RVNGProperty +++class REVENGE_API RVNGPropertyListVector : public RVNGProperty ++ { ++ public: ++ RVNGPropertyListVector(const RVNGPropertyListVector &); ++diff --git a/inc/librevenge/RVNGSVGDrawingGenerator.h b/inc/librevenge/RVNGSVGDrawingGenerator.h ++index 4a90a99..9bfce26 100644 ++--- a/inc/librevenge/RVNGSVGDrawingGenerator.h +++++ b/inc/librevenge/RVNGSVGDrawingGenerator.h ++@@ -21,6 +21,8 @@ ++ #ifndef RVNGSVGDRAWINGGENERATOR_H ++ #define RVNGSVGDRAWINGGENERATOR_H ++ +++#include "librevenge-api.h" +++ ++ #include "RVNGDrawingInterface.h" ++ #include "RVNGStringVector.h" ++ ++@@ -29,7 +31,7 @@ namespace librevenge ++ ++ struct RVNGSVGDrawingGeneratorPrivate; ++ ++-class RVNGSVGDrawingGenerator : public RVNGDrawingInterface +++class REVENGE_API RVNGSVGDrawingGenerator : public RVNGDrawingInterface ++ { ++ public: ++ RVNGSVGDrawingGenerator(RVNGStringVector &vec, const RVNGString &nmspace); ++diff --git a/inc/librevenge/RVNGSpreadsheetInterface.h b/inc/librevenge/RVNGSpreadsheetInterface.h ++index 28093b1..c839eec 100644 ++--- a/inc/librevenge/RVNGSpreadsheetInterface.h +++++ b/inc/librevenge/RVNGSpreadsheetInterface.h ++@@ -22,6 +22,8 @@ ++ #ifndef RVNGSPREADSHEETINTERFACE_H ++ #define RVNGSPREADSHEETINTERFACE_H ++ +++#include "librevenge-api.h" +++ ++ #include "RVNGString.h" ++ #include "RVNGPropertyList.h" ++ #include "RVNGPropertyListVector.h" ++@@ -46,7 +48,7 @@ definitions listed here. ++ if neededlibrevenge:name the numbering style name ++ */ ++ ++-class RVNGSpreadsheetInterface +++class REVENGE_API RVNGSpreadsheetInterface ++ { ++ public: ++ ++diff --git a/inc/librevenge/RVNGString.h b/inc/librevenge/RVNGString.h ++index 79f7494..cbea3bc 100644 ++--- a/inc/librevenge/RVNGString.h +++++ b/inc/librevenge/RVNGString.h ++@@ -21,12 +21,14 @@ ++ #ifndef RVNGSTRING_H ++ #define RVNGSTRING_H ++ +++#include "librevenge-api.h" +++ ++ namespace librevenge ++ { ++ ++ class RVNGStringImpl; ++ ++-class RVNGString +++class REVENGE_API RVNGString ++ { ++ public: ++ RVNGString(); ++diff --git a/inc/librevenge/RVNGStringVector.h b/inc/librevenge/RVNGStringVector.h ++index 4a83609..912159a 100644 ++--- a/inc/librevenge/RVNGStringVector.h +++++ b/inc/librevenge/RVNGStringVector.h ++@@ -20,6 +20,8 @@ ++ #ifndef RVNGSTRINGVECTOR_H ++ #define RVNGSTRINGVECTOR_H ++ +++#include "librevenge-api.h" +++ ++ #include "RVNGString.h" ++ ++ namespace librevenge ++@@ -27,7 +29,7 @@ namespace librevenge ++ ++ class RVNGStringVectorImpl; ++ ++-class RVNGStringVector +++class REVENGE_API RVNGStringVector ++ { ++ public: ++ RVNGStringVector(); ++diff --git a/inc/librevenge/RVNGTextInterface.h b/inc/librevenge/RVNGTextInterface.h ++index 8c1c6d4..843b13e 100644 ++--- a/inc/librevenge/RVNGTextInterface.h +++++ b/inc/librevenge/RVNGTextInterface.h ++@@ -22,6 +22,8 @@ ++ #ifndef RVNGTEXTINTERFACE_H ++ #define RVNGTEXTINTERFACE_H ++ +++#include "librevenge-api.h" +++ ++ #include "RVNGPropertyList.h" ++ #include "RVNGPropertyListVector.h" ++ ++@@ -36,7 +38,7 @@ definitions listed here. ++ ++ class RVNGInputStream; ++ ++-class RVNGTextInterface +++class REVENGE_API RVNGTextInterface ++ { ++ public: ++ virtual ~RVNGTextInterface() {} ++diff --git a/inc/librevenge/librevenge-api.h b/inc/librevenge/librevenge-api.h ++new file mode 100644 ++index 0000000..708c8a1 ++--- /dev/null +++++ b/inc/librevenge/librevenge-api.h ++@@ -0,0 +1,36 @@ +++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +++/* librevenge +++ * Version: MPL 2.0 / LGPLv2.1+ +++ * +++ * This Source Code Form is subject to the terms of the Mozilla Public +++ * License, v. 2.0. If a copy of the MPL was not distributed with this +++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. +++ * +++ * Major Contributor(s): +++ * Copyright (C) 2002 William Lachance (wrlach@gmail.com) +++ * Copyright (C) 2002 Marc Maurer (uwog@uwog.net) +++ * +++ * For minor contributions see the git repository. +++ * +++ * Alternatively, the contents of this file may be used under the terms +++ * of the GNU Lesser General Public License Version 2.1 or later +++ * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are +++ * applicable instead of those above. +++ */ +++ +++#ifndef INCLUDED_LIBREVENGE_LIBREVENGE_API_H +++#define INCLUDED_LIBREVENGE_LIBREVENGE_API_H +++ +++#ifdef DLL_EXPORT +++#ifdef LIBREVENGE_BUILD +++#define REVENGE_API __declspec(dllexport) +++#else +++#define REVENGE_API __declspec(dllimport) +++#endif +++#else +++#define REVENGE_API +++#endif +++ +++#endif /* INCLUDED_LIBREVENGE_LIBREVENGE_API_H */ +++ +++/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ ++-- ++1.9.0 ++ +diff --git a/external/librevenge/ExternalPackage_librevenge.mk b/external/librevenge/ExternalPackage_librevenge.mk +new file mode 100644 +index 0000000..d65fdca +--- /dev/null ++++ b/external/librevenge/ExternalPackage_librevenge.mk +@@ -0,0 +1,22 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++# ++# This file is part of the LibreOffice project. ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++# ++ ++$(eval $(call gb_ExternalPackage_ExternalPackage,librevenge,librevenge)) ++ ++$(eval $(call gb_ExternalPackage_use_external_project,librevenge,librevenge)) ++ ++ifeq ($(OS),MACOSX) ++$(eval $(call gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.0.dylib,src/lib/.libs/librevenge-0.0.dylib)) ++else ifeq ($(OS),WNT) ++$(eval $(call gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.dll,src/lib/.libs/librevenge-0.0.dll)) ++else ifeq ($(filter IOS ANDROID,$(OS)),) ++$(eval $(call gb_ExternalPackage_add_file,librevenge,$(LIBO_LIB_FOLDER)/librevenge-0.0.so.0,src/lib/.libs/librevenge-0.0.so.0.0.0)) ++endif ++ ++# vim: set noet sw=4 ts=4: +diff --git a/external/librevenge/ExternalProject_librevenge.mk b/external/librevenge/ExternalProject_librevenge.mk +new file mode 100644 +index 0000000..e9a826c +--- /dev/null ++++ b/external/librevenge/ExternalProject_librevenge.mk +@@ -0,0 +1,44 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++# ++# This file is part of the LibreOffice project. ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++# ++ ++$(eval $(call gb_ExternalProject_ExternalProject,librevenge)) ++ ++$(eval $(call gb_ExternalProject_use_autoconf,librevenge,build)) ++ ++$(eval $(call gb_ExternalProject_register_targets,librevenge,\ ++ build \ ++)) ++ ++# TODO: test for zlib is unconditional in configure by mistake. Remove on the next release. ++$(eval $(call gb_ExternalProject_use_externals,librevenge,\ ++ boost_headers \ ++ zlib \ ++)) ++ ++$(call gb_ExternalProject_get_state_target,librevenge,build) : ++ $(call gb_ExternalProject_run,build,\ ++ export PKG_CONFIG="" \ ++ && ./configure \ ++ --with-pic \ ++ --enable-shared \ ++ --disable-static \ ++ --disable-debug \ ++ --disable-werror \ ++ --disable-weffc \ ++ --disable-streams \ ++ --disable-generators \ ++ --without-docs \ ++ $(if $(VERBOSE)$(verbose),--enable-silent-rules) \ ++ CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ ++ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ ++ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ ++ && $(MAKE) \ ++ ) ++ ++# vim: set noet sw=4 ts=4: +diff --git a/external/librevenge/Library_revenge.mk b/external/librevenge/Library_revenge.mk +new file mode 100644 +index 0000000..1976781 +--- /dev/null ++++ b/external/librevenge/Library_revenge.mk +@@ -0,0 +1,48 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++# ++# This file is part of the LibreOffice project. ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++# ++ ++$(eval $(call gb_Library_Library,revenge)) ++ ++$(eval $(call gb_Library_use_unpacked,revenge,librevenge)) ++ ++$(eval $(call gb_Library_use_externals,revenge,\ ++ boost_headers \ ++)) ++ ++$(eval $(call gb_Library_set_warnings_not_errors,revenge)) ++ ++$(eval $(call gb_Library_set_include,revenge,\ ++ -I$(call gb_UnpackedTarball_get_dir,librevenge)/inc \ ++ $$(INCLUDE) \ ++)) ++ ++# -DLIBREVENGE_STREAM_BUILD is present so that linker does not complain ++# about unresolved external symbol RVNGStream::~RVNGStream ++$(eval $(call gb_Library_add_defs,revenge,\ ++ -DBOOST_ALL_NO_LIB \ ++ -DDLL_EXPORT \ ++ -DLIBREVENGE_BUILD \ ++ -DLIBREVENGE_STREAM_BUILD \ ++ -DNDEBUG \ ++)) ++ ++$(eval $(call gb_Library_set_generated_cxx_suffix,revenge,cpp)) ++ ++$(eval $(call gb_Library_add_generated_exception_objects,revenge,\ ++ UnpackedTarball/librevenge/src/lib/RVNGBinaryData \ ++ UnpackedTarball/librevenge/src/lib/RVNGMemoryStream \ ++ UnpackedTarball/librevenge/src/lib/RVNGProperty \ ++ UnpackedTarball/librevenge/src/lib/RVNGPropertyList \ ++ UnpackedTarball/librevenge/src/lib/RVNGPropertyListVector \ ++ UnpackedTarball/librevenge/src/lib/RVNGString \ ++ UnpackedTarball/librevenge/src/lib/RVNGStringVector \ ++ UnpackedTarball/librevenge/src/lib/RVNGSVGDrawingGenerator \ ++)) ++ ++# vim: set noet sw=4 ts=4: +diff --git a/external/librevenge/Makefile b/external/librevenge/Makefile +new file mode 100644 +index 0000000..e4968cf +--- /dev/null ++++ b/external/librevenge/Makefile +@@ -0,0 +1,7 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++ ++module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) ++ ++include $(module_directory)/../../solenv/gbuild/partial_build.mk ++ ++# vim: set noet sw=4 ts=4: +diff --git a/external/librevenge/Module_librevenge.mk b/external/librevenge/Module_librevenge.mk +new file mode 100644 +index 0000000..cd11805 +--- /dev/null ++++ b/external/librevenge/Module_librevenge.mk +@@ -0,0 +1,31 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++# ++# This file is part of the LibreOffice project. ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++# ++ ++$(eval $(call gb_Module_Module,librevenge)) ++ ++$(eval $(call gb_Module_add_targets,librevenge,\ ++ UnpackedTarball_librevenge \ ++)) ++ ++ifeq ($(COM),MSC) ++ ++$(eval $(call gb_Module_add_targets,librevenge,\ ++ Library_revenge \ ++)) ++ ++else ++ ++$(eval $(call gb_Module_add_targets,librevenge,\ ++ ExternalPackage_librevenge \ ++ ExternalProject_librevenge \ ++)) ++ ++endif ++ ++# vim: set noet sw=4 ts=4: +diff --git a/external/librevenge/README b/external/librevenge/README +new file mode 100644 +index 0000000..23007ff +--- /dev/null ++++ b/external/librevenge/README +@@ -0,0 +1,3 @@ ++From [http://sourceforge.net/p/libwpd/wiki/librevenge/]. A base library ++for writing document import filters. It has interfaces for text documents, ++vector graphics, spreadsheets and presentations. +diff --git a/external/librevenge/UnpackedTarball_librevenge.mk b/external/librevenge/UnpackedTarball_librevenge.mk +new file mode 100644 +index 0000000..8311eab +--- /dev/null ++++ b/external/librevenge/UnpackedTarball_librevenge.mk +@@ -0,0 +1,20 @@ ++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- ++# ++# This file is part of the LibreOffice project. ++# ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++# ++ ++$(eval $(call gb_UnpackedTarball_UnpackedTarball,librevenge)) ++ ++$(eval $(call gb_UnpackedTarball_set_tarball,librevenge,$(REVENGE_TARBALL))) ++ ++$(eval $(call gb_UnpackedTarball_set_patchlevel,librevenge,1)) ++ ++$(eval $(call gb_UnpackedTarball_add_patches,librevenge,\ ++ external/librevenge/0001-properly-export-API-symbols.patch \ ++)) ++ ++# vim: set noet sw=4 ts=4: +-- +1.9.3 + diff --git a/0003-the-other-way-around.patch b/0003-the-other-way-around.patch new file mode 100644 index 0000000..384a278 --- /dev/null +++ b/0003-the-other-way-around.patch @@ -0,0 +1,40 @@ +From f841951b0244d2c8c1430fae03de005a84fe565d Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sun, 25 May 2014 13:39:03 +0200 +Subject: [PATCH 3/9] the other way around... + +Change-Id: I6aeaa95079e37e710e5b8b1b8ce24464e11f45bb +--- + external/libodfgen/ExternalProject_libodfgen.mk | 2 +- + external/librevenge/ExternalProject_librevenge.mk | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/external/libodfgen/ExternalProject_libodfgen.mk b/external/libodfgen/ExternalProject_libodfgen.mk +index 80cb2b0..ab430df 100644 +--- a/external/libodfgen/ExternalProject_libodfgen.mk ++++ b/external/libodfgen/ExternalProject_libodfgen.mk +@@ -33,7 +33,7 @@ $(call gb_ExternalProject_get_state_target,libodfgen,build) : + --disable-werror \ + --disable-weffc \ + --without-docs \ +- $(if $(VERBOSE)$(verbose),--enable-silent-rules) \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ +diff --git a/external/librevenge/ExternalProject_librevenge.mk b/external/librevenge/ExternalProject_librevenge.mk +index e9a826c..1783993 100644 +--- a/external/librevenge/ExternalProject_librevenge.mk ++++ b/external/librevenge/ExternalProject_librevenge.mk +@@ -34,7 +34,7 @@ $(call gb_ExternalProject_get_state_target,librevenge,build) : + --disable-streams \ + --disable-generators \ + --without-docs \ +- $(if $(VERBOSE)$(verbose),--enable-silent-rules) \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ +-- +1.9.3 + diff --git a/0004-fix-deps-for-projects-using-librevenge.patch b/0004-fix-deps-for-projects-using-librevenge.patch new file mode 100644 index 0000000..8a8f1de --- /dev/null +++ b/0004-fix-deps-for-projects-using-librevenge.patch @@ -0,0 +1,50 @@ +From 6f0f3ab008092c7a84fa1712b3c4ea736b0d2159 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sun, 25 May 2014 13:06:57 +0200 +Subject: [PATCH 4/9] fix deps for projects using librevenge + +Change-Id: Icc6e2465d96cc95b229a1f7abc6d51362ae3d016 +--- + RepositoryExternal.mk | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk +index 13eb221..920436a 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -1772,6 +1772,8 @@ $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS)) + + endef + ++gb_ExternalProject__use_revenge := ++ + else # !SYSTEM_REVENGE + + ifeq ($(COM),MSC) +@@ -1791,6 +1793,11 @@ $(call gb_LinkTarget_use_libraries,$(1),\ + + endef + ++define gb_ExternalProject__use_revenge ++$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge) ++ ++endef ++ + else # !MSC + + $(eval $(call gb_Helper_register_packages_for_install,ooo, \ +@@ -1809,6 +1816,11 @@ $(call gb_LinkTarget_add_libs,$(1),\ + ) + endef + ++define gb_ExternalProject__use_revenge ++$(call gb_ExternalProject_use_package,$(1),librevenge) ++ ++endef ++ + endif # MSC + + endif # SYSTEM_REVENGE +-- +1.9.3 + diff --git a/0005-always-provide-REDLAND_CFLAGS-LIBS-to-ext.-projects.patch b/0005-always-provide-REDLAND_CFLAGS-LIBS-to-ext.-projects.patch new file mode 100644 index 0000000..ee63416 --- /dev/null +++ b/0005-always-provide-REDLAND_CFLAGS-LIBS-to-ext.-projects.patch @@ -0,0 +1,58 @@ +From 12d52250462435b19d1873af7bd064d3e64b1c4c Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sun, 25 May 2014 13:19:31 +0200 +Subject: [PATCH 5/9] always provide REDLAND_CFLAGS/LIBS to ext. projects + +Change-Id: Iad1004503e91fbaf6251edc50b20d89ddbb15efa +--- + RepositoryExternal.mk | 6 +++--- + configure.ac | 6 +++++- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk +index 920436a..2ecd404 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -1784,7 +1784,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\ + + define gb_LinkTarget__use_revenge + $(call gb_LinkTarget_set_include,$(1),\ +- -I$(call gb_UnpackedTarball_get_dir,librevenge)/inc \ ++ $(REVENGE_CFLAGS) \ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_use_libraries,$(1),\ +@@ -1808,11 +1808,11 @@ define gb_LinkTarget__use_revenge + $(call gb_LinkTarget_use_package,$(1),librevenge) + + $(call gb_LinkTarget_set_include,$(1),\ +- -I$(call gb_UnpackedTarball_get_dir,librevenge)/inc \ ++ $(REVENGE_CFLAGS) \ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- -L$(call gb_UnpackedTarball_get_dir,librevenge)/src/lib/.libs -lrevenge-0.0 \ ++ $(REVENGE_LIBS) \ + ) + endef + +diff --git a/configure.ac b/configure.ac +index ad27916..5adefd8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7665,7 +7665,11 @@ AC_SUBST([ENABLE_EOT]) + dnl =================================================================== + dnl Check for system librevenge + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0]) ++AS_IF([test "$COM" = "MSC"], ++ [librevenge_libdir="${WORKDIR}/LinkTarget/Library"], ++ [librevenge_libdir="${WORKDIR}/UnpackedTarball/lirevenge/src/lib/.libs"] ++) ++libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0],["-I${WORKDIR}/UnpackedTarball/librevenge/inc"],["-L${librevenge_libdir} -lrevenge-0.0"]), + + dnl =================================================================== + dnl Check for system libe-book +-- +1.9.3 + diff --git a/0006-rebase-all-import-libs.patch b/0006-rebase-all-import-libs.patch new file mode 100644 index 0000000..6f1c3d9 --- /dev/null +++ b/0006-rebase-all-import-libs.patch @@ -0,0 +1,3173 @@ +From fdbb5ad736cc0e7c0a00678ac487911ffc0b4e48 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sat, 24 May 2014 14:21:21 +0200 +Subject: [PATCH 6/9] rebase all import libs + +Change-Id: I9e1fc613816c943f4fb1033185e34e3acf317f1d +--- + RepositoryExternal.mk | 30 +-- + configure.ac | 26 +- + download.lst | 45 ++-- + external/libabw/ExternalProject_libabw.mk | 7 +- + external/libcdr/ExternalProject_libcdr.mk | 9 +- + ...0001-blind-attempt-to-workaround-MSVC-bug.patch | 87 ++++++ + external/libebook/ExternalProject_libebook.mk | 10 +- + external/libebook/UnpackedTarball_libebook.mk | 4 + + external/libetonyek/ExternalProject_libetonyek.mk | 5 +- + .../libfreehand/ExternalProject_libfreehand.mk | 9 +- + external/libmspub/ExternalProject_libmspub.mk | 9 +- + ...nge-stream-is-optional-don-t-depend-on-it.patch | 293 +++++++++++++++++++++ + external/libmwaw/0001-std-isfinite-is-C-11.patch | 43 --- + external/libmwaw/0001-use-correct-type.patch | 52 ---- + ...03-apparently-contains-22-patterns-not-28.patch | 29 -- + ...nge-stream-is-optional-don-t-depend-on-it.patch | 54 ++++ + external/libmwaw/ExternalProject_libmwaw.mk | 7 +- + external/libmwaw/UnpackedTarball_libmwaw.mk | 5 +- + .../0001-properly-export-API-symbols.patch | 67 +++-- + external/libodfgen/ExternalPackage_libodfgen.mk | 6 +- + external/libodfgen/ExternalProject_libodfgen.mk | 4 +- + external/libodfgen/Library_odfgen.mk | 10 +- + ...-iterator-classes-need-to-be-exported-too.patch | 53 ++++ + external/librevenge/UnpackedTarball_librevenge.mk | 1 + + ...-70480-do-not-crash-reading-malformed-zip.patch | 26 -- + external/libvisio/ExternalProject_libvisio.mk | 9 +- + external/libvisio/UnpackedTarball_libvisio.mk | 6 - + external/libwpd/ExternalProject_libwpd.mk | 15 +- + external/libwpg/ExternalProject_libwpg.mk | 7 +- + external/libwpg/UnpackedTarball_libwpg.mk | 7 - + external/libwps/ExternalProject_libwps.mk | 8 +- + include/writerperfect/DirectoryStream.hxx | 18 +- + include/writerperfect/DocumentHandler.hxx | 6 +- + include/writerperfect/WPXSvInputStream.hxx | 24 +- + writerperfect/CppunitTest_writerperfect_stream.mk | 2 +- + writerperfect/Library_wpftdraw.mk | 2 +- + writerperfect/Library_wpftimpress.mk | 3 +- + writerperfect/Library_wpftwriter.mk | 6 +- + writerperfect/Library_writerperfect.mk | 4 +- + writerperfect/qa/unit/WPXSvStreamTest.cxx | 135 +++++----- + writerperfect/qa/unit/WpftImpressFilterTest.cxx | 2 +- + writerperfect/qa/unit/WpftWriterFilterTest.cxx | 4 +- + writerperfect/source/common/DirectoryStream.cxx | 34 ++- + writerperfect/source/common/DocumentHandler.cxx | 6 +- + writerperfect/source/common/WPXSvInputStream.cxx | 43 +-- + writerperfect/source/draw/CDRImportFilter.cxx | 4 +- + writerperfect/source/draw/CDRImportFilter.hxx | 4 +- + writerperfect/source/draw/CMXImportFilter.cxx | 4 +- + writerperfect/source/draw/CMXImportFilter.hxx | 4 +- + writerperfect/source/draw/FreehandImportFilter.cxx | 4 +- + writerperfect/source/draw/FreehandImportFilter.hxx | 4 +- + writerperfect/source/draw/ImportFilterBase.cxx | 3 +- + writerperfect/source/draw/ImportFilterBase.hxx | 8 +- + writerperfect/source/draw/MSPUBImportFilter.cxx | 4 +- + writerperfect/source/draw/MSPUBImportFilter.hxx | 4 +- + writerperfect/source/draw/VisioImportFilter.cxx | 4 +- + writerperfect/source/draw/VisioImportFilter.hxx | 4 +- + writerperfect/source/draw/WPGImportFilter.cxx | 6 +- + writerperfect/source/draw/WPGImportFilter.hxx | 4 +- + .../source/impress/KeynoteImportFilter.cxx | 18 +- + .../source/writer/AbiWordImportFilter.cxx | 4 +- + .../source/writer/AbiWordImportFilter.hxx | 4 +- + writerperfect/source/writer/EBookImportFilter.cxx | 58 ++-- + writerperfect/source/writer/EBookImportFilter.hxx | 4 +- + writerperfect/source/writer/ImportFilterBase.cxx | 3 +- + writerperfect/source/writer/ImportFilterBase.hxx | 8 +- + .../source/writer/MSWorksImportFilter.cxx | 11 +- + .../source/writer/MSWorksImportFilter.hxx | 4 +- + writerperfect/source/writer/MWAWImportFilter.cxx | 9 +- + writerperfect/source/writer/MWAWImportFilter.hxx | 4 +- + .../source/writer/WordPerfectImportFilter.cxx | 49 ++-- + 71 files changed, 936 insertions(+), 533 deletions(-) + create mode 100644 external/libebook/0001-blind-attempt-to-workaround-MSVC-bug.patch + create mode 100644 external/libmwaw/0001-librevenge-stream-is-optional-don-t-depend-on-it.patch + delete mode 100644 external/libmwaw/0001-std-isfinite-is-C-11.patch + delete mode 100644 external/libmwaw/0001-use-correct-type.patch + delete mode 100644 external/libmwaw/0001-values4003-apparently-contains-22-patterns-not-28.patch + create mode 100644 external/libmwaw/0002-librevenge-stream-is-optional-don-t-depend-on-it.patch + create mode 100644 external/librevenge/0001-nested-iterator-classes-need-to-be-exported-too.patch + delete mode 100644 external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch + +diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk +index 2ecd404..240a7fe 100644 +--- a/RepositoryExternal.mk ++++ b/RepositoryExternal.mk +@@ -1594,7 +1594,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.0$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libcdr) + endef +@@ -1619,11 +1619,11 @@ else # !SYSTEM_EBOOK + + define gb_LinkTarget__use_ebook + $(call gb_LinkTarget_set_include,$(1),\ +- $(EBOOK_CFLAGS) \ ++ -I${WORKDIR}/UnpackedTarball/libebook/inc \ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.0$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libebook) + +@@ -1654,11 +1654,11 @@ else # !SYSTEM_ETONYEK + + define gb_LinkTarget__use_etonyek + $(call gb_LinkTarget_set_include,$(1),\ +- $(ETONYEK_CFLAGS) \ ++ -I${WORKDIR}/UnpackedTarball/libetonyek/inc \ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.0$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs/libetonyek-0.1$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libetonyek) + +@@ -1689,11 +1689,11 @@ else # !SYSTEM_FREEHAND + + define gb_LinkTarget__use_freehand + $(call gb_LinkTarget_set_include,$(1),\ +- $(FREEHAND_CFLAGS) \ ++ -I${WORKDIR}/UnpackedTarball/libfreehand/inc \ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.0$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libfreehand) + +@@ -1751,7 +1751,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.0 \ ++ -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \ + ) + + endef +@@ -1846,7 +1846,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.0$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libabw) + +@@ -1878,7 +1878,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.0$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libmspub) + +@@ -1906,7 +1906,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.0$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libvisio) + +@@ -1935,7 +1935,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libwpd)/src/lib/.libs/libwpd-0.9$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libwpd)/src/lib/.libs/libwpd-0.10$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libwpd) + +@@ -1968,7 +1968,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs/libwpg-0.2$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs/libwpg-0.3$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libwpg) + +@@ -2001,7 +2001,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs/libwps-0.2$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs/libwps-0.3$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libwps) + +@@ -2033,7 +2033,7 @@ $(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + ) + $(call gb_LinkTarget_add_libs,$(1),\ +- $(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs/libmwaw-0.2$(gb_StaticLibrary_PLAINEXT) \ ++ $(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs/libmwaw-0.3$(gb_StaticLibrary_PLAINEXT) \ + ) + $(call gb_LinkTarget_use_external_project,$(1),libmwaw) + +diff --git a/configure.ac b/configure.ac +index 5adefd8..a4741fb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7667,49 +7667,49 @@ dnl Check for system librevenge + dnl =================================================================== + AS_IF([test "$COM" = "MSC"], + [librevenge_libdir="${WORKDIR}/LinkTarget/Library"], +- [librevenge_libdir="${WORKDIR}/UnpackedTarball/lirevenge/src/lib/.libs"] ++ [librevenge_libdir="${WORKDIR}/UnpackedTarball/librevenge/src/lib/.libs"] + ) + libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0],["-I${WORKDIR}/UnpackedTarball/librevenge/inc"],["-L${librevenge_libdir} -lrevenge-0.0"]), + + dnl =================================================================== + dnl Check for system libe-book + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.0 >= 0.0.2],["-I${WORKDIR}/UnpackedTarball/libebook/inc"],["-L${WORKDIR}/UnpackedTarball/libebook/src/lib/.libs -le-book-0.0"]) ++libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.1]) + + dnl =================================================================== + dnl Check for system libetonyek + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.0],["-I${WORKDIR}/UnpackedTarball/libetonyek/inc"],["-L${WORKDIR}/UnpackedTarball/libetonyek/src/lib/.libs -letonyek-0.0"]) ++libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1]) + + dnl =================================================================== + dnl Check for system libfreehand + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.0],["-I${WORKDIR}/UnpackedTarball/libfreehand/inc"],["-L${WORKDIR}/UnpackedTarball/libfreehand/src/lib/.libs -lfreehand-0.0"]) ++libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1]) + + dnl =================================================================== + dnl Check for system libodfgen + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.0 >= 0.0.3]) ++libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.1]) + + dnl =================================================================== + dnl Check for system libcdr + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.0 >= 0.0.5]) ++libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1]) + + dnl =================================================================== + dnl Check for system libmspub + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.0]) ++libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1]) + + dnl =================================================================== + dnl Check for system libmwaw + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.2]) ++libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1]) + + dnl =================================================================== + dnl Check for system libvisio + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.0]) ++libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.1]) + + dnl =================================================================== + dnl Check for system libcmis +@@ -7726,7 +7726,7 @@ AC_SUBST(ENABLE_CMIS) + dnl =================================================================== + dnl Check for system libwpd + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 >= 0.9.5 libwpd-stream-0.9 >= 0.9.5],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.9"]) ++libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.10 libwpd-stream-0.10],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.10"]) + + dnl =================================================================== + dnl Check for system lcms2 +@@ -7781,17 +7781,17 @@ AC_SUBST([SYSTEM_FREETYPE]) + dnl =================================================================== + dnl Check for system libabw + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libabw],[ABW],[libabw-0.0],["-I${WORKDIR}/UnpackedTarball/libabw/inc"],["-L${WORKDIR}/UnpackedTarball/libabw/src/lib/.libs -labw-0.0"]) ++libo_CHECK_SYSTEM_MODULE([libabw],[ABW],[libabw-0.1]) + + dnl =================================================================== + dnl Check for system libwps + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.2],["-I${WORKDIR}/UnpackedTarball/libwps/inc"],["-L${WORKDIR}/UnpackedTarball/libwps/src/lib/.libs -lwps-0.2"]) ++libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.3]) + + dnl =================================================================== + dnl Check for system libwpg + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.2],["-I${WORKDIR}/UnpackedTarball/libwpg/inc"],["-L${WORKDIR}/UnpackedTarball/libwpg/src/lib/.libs -lwpg-0.2"]) ++libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.3]) + + # =================================================================== + # Check for system libxslt +diff --git a/download.lst b/download.lst +index 19cfb4b..7b7d368 100644 +--- a/download.lst ++++ b/download.lst +@@ -1,5 +1,5 @@ +-export ABW_MD5SUM := 40fa48e03b1e28ae0325cc34b35bc46d +-export ABW_TARBALL := libabw-0.0.2.tar.bz2 ++export ABW_MD5SUM := 9317e967c8fa8ff50e049744c4b33c87 ++export ABW_TARBALL := libabw-0.1.0.tar.bz2 + export APACHE_COMMONS_CODEC_TARBALL := $(if $(filter TRUE,$(HAVE_JAVA6))\ + ,048751f3271906db5126ab76870444c4-commons-codec-1.9-src.zip\ + ,2e482c7567908d334785ce7d69ddfff7-commons-codec-1.6-src.tar.gz\ +@@ -17,8 +17,8 @@ export APR_UTIL_TARBALL := apr-util-1.5.3.tar.gz + export BOOST_TARBALL := d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2 + export BSH_TARBALL := ea570af93c284aa9e5621cd563f54f4d-bsh-2.0b1-src.tar.gz + export CAIRO_TARBALL := f101a9e88b783337b20b2e26dfd26d5f-cairo-1.10.2.tar.gz +-export CDR_MD5SUM := fbcd8619fc6646f41d527c1329102998 +-export CDR_TARBALL := libcdr-0.0.15.tar.bz2 ++export CDR_MD5SUM := 0e2f56934c8872ec4a254cd4bb1d7cf6 ++export CDR_TARBALL := libcdr-0.1.0.tar.bz2 + export CLUCENE_TARBALL := 48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz + export CMIS_TARBALL := 22f8a85daf4a012180322e1f52a7563b-libcmis-0.4.1.tar.gz + export COINMP_MD5SUM := 1cce53bf4b40ae29790d2c5c9f8b1129 +@@ -30,11 +30,11 @@ export CT2N_TARBALL := 451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3. + export CURL_MD5SUM := e6d1f9d1b59da5062109ffe14e0569a4 + export CURL_TARBALL := curl-7.36.0.tar.bz2 + export DBGHELP_DLL := 13fbc2e8b37ddf28181dd6d8081c2b8e-dbghelp.dll +-export EBOOK_MD5SUM := 2f1ceaf2ac8752ed278e175447d9b978 +-export EBOOK_TARBALL := libe-book-0.0.3.tar.bz2 ++export EBOOK_MD5SUM := 3244af3faf9e8334b8c45d1107ba8ca2 ++export EBOOK_TARBALL := libe-book-0.1.0.tar.bz2 + export EPM_TARBALL := 3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz +-export ETONYEK_MD5SUM := 3c50bc60394d1f2675fbf9bd22581363 +-export ETONYEK_TARBALL := libetonyek-0.0.4.tar.bz2 ++export ETONYEK_MD5SUM := 9d4de5e3b0846dc53b9d18908557fb02 ++export ETONYEK_TARBALL := libetonyek-0.1.0.tar.bz2 + export EXPAT_TARBALL := dd7dab7a5fea97d2a6a43f511449b7cd-expat-2.1.0.tar.gz + export FIREBIRD_MD5SUM := 21154d2004e025c8a3666625b0357bb5 + export FIREBIRD_TARBALL := Firebird-2.5.2.26540-0.tar.bz2 +@@ -52,8 +52,8 @@ export FONT_OPENSANS_TARBALL := 7a15edea7d415ac5150ea403e27401fd-open-sans-font- + export FONT_PTSERIF_TARBALL := c3c1a8ba7452950636e871d25020ce0d-pt-serif-font-1.0000W.tar.gz + export FONT_SOURCECODE_TARBALL := 0279a21fab6f245e85a6f85fea54f511-source-code-font-1.009.tar.gz + export FONT_SOURCESANS_TARBALL := 1e9ddfe25ac9577da709d7b2ea36f939-source-sans-font-1.036.tar.gz +-export FREEHAND_MD5SUM := 496dd00028afcc19f896b01394769043 +-export FREEHAND_TARBALL := libfreehand-0.0.0.tar.bz2 ++export FREEHAND_MD5SUM := 5f029fef73e42a2c2ae4524a7513f97d ++export FREEHAND_TARBALL := libfreehand-0.1.0.tar.bz2 + export FREETYPE_TARBALL := dbf2caca1d3afd410a29217a9809d397-freetype-2.4.8.tar.bz2 + export GLEW_TARBALL := 594eb47b4b1210e25438d51825404d5a-glew-1.10.0.zip + export GLM_TARBALL := bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip +@@ -96,16 +96,16 @@ export LIBXSLT_TARBALL := 9667bf6f9310b957254fdcf6596600b7-libxslt-1.1.28.tar.gz + export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz + export MARIADB_TARBALL := 05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2 + export MDDS_TARBALL := aa5ca9d1ed1082890835afab26400a39-mdds_0.10.3.tar.bz2 +-export MSPUB_MD5SUM := 1120705cd0f0d9bd5506360bf57b6c2e +-export MSPUB_TARBALL := libmspub-0.0.6.tar.bz2 +-export MWAW_MD5SUM := d794625f156a9fb1c53b3f8a8aa13b5e +-export MWAW_TARBALL := libmwaw-0.2.0.tar.bz2 ++export MSPUB_MD5SUM := 7abe88964fd37fa4893792966ba1ac87 ++export MSPUB_TARBALL := libmspub-0.1.0.tar.bz2 ++export MWAW_MD5SUM := 6f1ac4a0e24131c422e1e91f07718fb6 ++export MWAW_TARBALL := libmwaw-0.3.1.tar.bz2 + export MYSQLCPPCONN_TARBALL := 0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz + export MYTHES_TARBALL := 46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz + export NEON_TARBALL := ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz + export NSS_TARBALL := 06beb053e257d9e22641339c905c6eba-nss-3.15.3-with-nspr-4.10.2.tar.gz +-export ODFGEN_MD5SUM := e5483d1f0b71e64c367c1194b54b0f53 +-export ODFGEN_TARBALL := libodfgen-0.0.4.tar.bz2 ++export ODFGEN_MD5SUM := 6c708dbcca976ad56115c98f191a0e90 ++export ODFGEN_TARBALL := libodfgen-0.1.0.tar.bz2 + export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6 + export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2 + export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz +@@ -129,11 +129,14 @@ export SERF_TARBALL := serf-1.2.1.tar.bz2 + export SWING_TARBALL := 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip + export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz + export VIGRA_TARBALL := d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz +-export VISIO_MD5SUM := 82628333418f101a20cd21f980cf9f40 +-export VISIO_TARBALL := libvisio-0.0.31.tar.bz2 +-export WPD_TARBALL := a3dcac551fae5ebbec16e844810828c4-libwpd-0.9.9.tar.bz2 +-export WPG_TARBALL := b85436266b2ac91d351ab5684b181151-libwpg-0.2.2.tar.bz2 +-export WPS_TARBALL := 46eb0e7f213ad61bd5dee0c494132cb0-libwps-0.2.9.tar.bz2 ++export VISIO_MD5SUM := 931588332ba44682c9cd5eefbd358ab4 ++export VISIO_TARBALL := libvisio-0.1.0.tar.bz2 ++export WPD_MD5SUM := 0773d79a1f240ef9f4f20242b13c5bb7 ++export WPD_TARBALL := libwpd-0.10.0.tar.bz2 ++export WPG_MD5SUM := 17da9770cb8b317b7633f9807b32b71a ++export WPG_TARBALL := libwpg-0.3.0.tar.bz2 ++export WPS_MD5SUM := d4d77d08b9048bae3b8ec8df11f80efd ++export WPS_TARBALL := libwps-0.3.0.tar.bz2 + export XSLTML_TARBALL := a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip + export ZLIB_MD5SUM := 44d667c142d7cda120332623eab69f40 + export ZLIB_TARBALL := zlib-1.2.8.tar.gz +diff --git a/external/libabw/ExternalProject_libabw.mk b/external/libabw/ExternalProject_libabw.mk +index 1bcb33d..63d4e52 100644 +--- a/external/libabw/ExternalProject_libabw.mk ++++ b/external/libabw/ExternalProject_libabw.mk +@@ -18,7 +18,7 @@ $(eval $(call gb_ExternalProject_register_targets,libabw,\ + $(eval $(call gb_ExternalProject_use_externals,libabw,\ + boost_headers \ + libxml2 \ +- wpd \ ++ revenge \ + zlib \ + )) + +@@ -33,13 +33,12 @@ $(call gb_ExternalProject_get_state_target,libabw,build) : + --disable-tools \ + --disable-debug \ + --disable-werror \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),\ + -I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side)) \ + $(if $(SYSTEM_LIBXML),,-I$(call gb_UnpackedTarball_get_dir,xml2)/include)" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && (cd $(EXTERNAL_WORKDIR)/src/lib && \ +- $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE)) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libcdr/ExternalProject_libcdr.mk b/external/libcdr/ExternalProject_libcdr.mk +index d96b0b2..174de18 100644 +--- a/external/libcdr/ExternalProject_libcdr.mk ++++ b/external/libcdr/ExternalProject_libcdr.mk +@@ -19,8 +19,7 @@ $(eval $(call gb_ExternalProject_use_externals,libcdr,\ + boost_headers \ + icu \ + lcms2 \ +- wpd \ +- wpg \ ++ revenge \ + zlib \ + )) + +@@ -32,14 +31,14 @@ $(call gb_ExternalProject_get_state_target,libcdr,build) : + --enable-static \ + --disable-shared \ + --without-docs \ ++ --disable-tools \ + --disable-debug \ + --disable-werror \ + --disable-weffc \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && (cd $(EXTERNAL_WORKDIR)/src/lib && \ +- $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE)) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libebook/0001-blind-attempt-to-workaround-MSVC-bug.patch b/external/libebook/0001-blind-attempt-to-workaround-MSVC-bug.patch +new file mode 100644 +index 0000000..2ecedf3 +--- /dev/null ++++ b/external/libebook/0001-blind-attempt-to-workaround-MSVC-bug.patch +@@ -0,0 +1,87 @@ ++From e9362c25b772c2cfb657b1234d8b636669a1b01b Mon Sep 17 00:00:00 2001 ++From: David Tardon ++Date: Mon, 26 May 2014 16:33:00 +0200 ++Subject: [PATCH] blind attempt to workaround MSVC bug ++ ++http://msdn.microsoft.com/en-us/library/27zksbks.aspx ++--- ++ src/lib/EBOOKDocument.cpp | 49 ++++++++++++++++++++++++++++------------------- ++ 1 file changed, 29 insertions(+), 20 deletions(-) ++ ++diff --git a/src/lib/EBOOKDocument.cpp b/src/lib/EBOOKDocument.cpp ++index ea1a223..5b8e7ec 100644 ++--- a/src/lib/EBOOKDocument.cpp +++++ b/src/lib/EBOOKDocument.cpp ++@@ -173,6 +173,15 @@ catch (...) ++ return EBOOKDocument::TYPE_UNKNOWN; ++ } ++ +++extern "C" +++{ +++ +++ void detectInternalSubset(void *const ctx, const xmlChar *const name, const xmlChar *, const xmlChar *); +++ void detectExternalSubset(void *const ctx, const xmlChar *const name, const xmlChar *, const xmlChar *); +++ void detectStartElement(void *const ctx, const xmlChar *const name, const xmlChar **); +++ +++} +++ ++ struct HTMLContext ++ { ++ xmlSAXHandler handler; ++@@ -196,26 +205,6 @@ void detectHTMLContent(void *const ctx, const xmlChar *const name) ++ context->html = EBOOKHTMLToken::html == getHTMLTokenId(char_cast(name)); ++ } ++ ++-extern "C" ++-{ ++- ++- void detectInternalSubset(void *const ctx, const xmlChar *const name, const xmlChar *, const xmlChar *) ++- { ++- detectHTMLContent(ctx, name); ++- } ++- ++- void detectExternalSubset(void *const ctx, const xmlChar *const name, const xmlChar *, const xmlChar *) ++- { ++- detectHTMLContent(ctx, name); ++- } ++- ++- void detectStartElement(void *const ctx, const xmlChar *const name, const xmlChar **) ++- { ++- detectHTMLContent(ctx, name); ++- } ++- ++-} ++- ++ HTMLContext::HTMLContext() ++ : handler() ++ , detected(false) ++@@ -250,6 +239,26 @@ catch (...) ++ return false; ++ } ++ +++extern "C" +++{ +++ +++ void detectInternalSubset(void *const ctx, const xmlChar *const name, const xmlChar *, const xmlChar *) +++ { +++ detectHTMLContent(ctx, name); +++ } +++ +++ void detectExternalSubset(void *const ctx, const xmlChar *const name, const xmlChar *, const xmlChar *) +++ { +++ detectHTMLContent(ctx, name); +++ } +++ +++ void detectStartElement(void *const ctx, const xmlChar *const name, const xmlChar **) +++ { +++ detectHTMLContent(ctx, name); +++ } +++ +++} +++ ++ template ++ bool probe(const RVNGInputStreamPtr_t &input, const EBOOKDocument::Type type, EBOOKDocument::Type *const typeOut, EBOOKDocument::Confidence &confidence) try ++ { ++-- ++1.9.0 ++ +diff --git a/external/libebook/ExternalProject_libebook.mk b/external/libebook/ExternalProject_libebook.mk +index b4e2bd6..785aeb7 100644 +--- a/external/libebook/ExternalProject_libebook.mk ++++ b/external/libebook/ExternalProject_libebook.mk +@@ -19,10 +19,11 @@ $(eval $(call gb_ExternalProject_use_externals,libebook,\ + boost_headers \ + icu \ + libxml2 \ +- wpd \ ++ revenge \ + zlib \ + )) + ++# TODO: remove the generators/stream empty vars on libe-book update + $(call gb_ExternalProject_get_state_target,libebook,build) : + $(call gb_ExternalProject_run,build,\ + export PKG_CONFIG="" \ +@@ -31,15 +32,18 @@ $(call gb_ExternalProject_get_state_target,libebook,build) : + --enable-static \ + --disable-shared \ + --without-docs \ ++ --without-tools \ ++ --disable-tests \ + $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug,--disable-debug) \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + --disable-werror \ + --disable-weffc \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + XML_CFLAGS="$(if $(SYSTEM_LIBXML),$(LIBXML_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,xml2)/include)" \ + XML_LIBS="$(LIBXML_LIBS)" \ ++ REVENGE_GENERATORS_CFLAGS=' ' REVENGE_GENERATORS_LIBS=' ' REVENGE_STREAM_CFLAGS=' ' REVENGE_STREAM_LIBS=' ' \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && cd src/lib \ +- && $(MAKE) $(if $(VERBOSE)$(verbose),V=1) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk +index 7dfee2c..bcc098a 100644 +--- a/external/libebook/UnpackedTarball_libebook.mk ++++ b/external/libebook/UnpackedTarball_libebook.mk +@@ -13,4 +13,8 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libebook,$(EBOOK_TARBALL))) + + $(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,1)) + ++$(eval $(call gb_UnpackedTarball_add_patches,libebook,\ ++ external/libebook/0001-blind-attempt-to-workaround-MSVC-bug.patch \ ++)) ++ + # vim: set noet sw=4 ts=4: +diff --git a/external/libetonyek/ExternalProject_libetonyek.mk b/external/libetonyek/ExternalProject_libetonyek.mk +index 1108282..ddf1394 100644 +--- a/external/libetonyek/ExternalProject_libetonyek.mk ++++ b/external/libetonyek/ExternalProject_libetonyek.mk +@@ -18,7 +18,7 @@ $(eval $(call gb_ExternalProject_register_targets,libetonyek,\ + $(eval $(call gb_ExternalProject_use_externals,libetonyek,\ + boost_headers \ + libxml2 \ +- wpd \ ++ revenge \ + zlib \ + )) + +@@ -34,11 +34,12 @@ $(call gb_ExternalProject_get_state_target,libetonyek,build) : + --disable-werror \ + --disable-weffc \ + --without-tools \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + BOOST_CFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + XML_CFLAGS="$(if $(SYSTEM_LIBXML),$(LIBXML_CFLAGS),-I$(call gb_UnpackedTarball_get_dir,xml2)/include)" \ + XML_LIBS="$(LIBXML_LIBS)" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && $(MAKE) $(if $(VERBOSE)$(verbose),V=1) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libfreehand/ExternalProject_libfreehand.mk b/external/libfreehand/ExternalProject_libfreehand.mk +index 068d886..39380e9 100644 +--- a/external/libfreehand/ExternalProject_libfreehand.mk ++++ b/external/libfreehand/ExternalProject_libfreehand.mk +@@ -16,8 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,libfreehand,\ + )) + + $(eval $(call gb_ExternalProject_use_externals,libfreehand,\ +- wpd \ +- wpg \ ++ revenge \ + zlib \ + )) + +@@ -29,13 +28,13 @@ $(call gb_ExternalProject_get_state_target,libfreehand,build) : + --enable-static \ + --disable-shared \ + --without-docs \ ++ --disable-tools \ + --disable-debug \ + --disable-werror \ + --disable-weffc \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && (cd $(EXTERNAL_WORKDIR)/src/lib && \ +- $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE)) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libmspub/ExternalProject_libmspub.mk b/external/libmspub/ExternalProject_libmspub.mk +index a9edc00..8cbf9a6 100644 +--- a/external/libmspub/ExternalProject_libmspub.mk ++++ b/external/libmspub/ExternalProject_libmspub.mk +@@ -18,8 +18,7 @@ $(eval $(call gb_ExternalProject_register_targets,libmspub,\ + $(eval $(call gb_ExternalProject_use_externals,libmspub,\ + boost_headers \ + icu \ +- wpd \ +- wpg \ ++ revenge \ + )) + + $(call gb_ExternalProject_get_state_target,libmspub,build) : +@@ -30,14 +29,14 @@ $(call gb_ExternalProject_get_state_target,libmspub,build) : + --enable-static \ + --disable-shared \ + --without-docs \ ++ --disable-tools \ + --disable-debug \ + --disable-werror \ + --disable-weffc \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && (cd $(EXTERNAL_WORKDIR)/src/lib && \ +- $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE)) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libmwaw/0001-librevenge-stream-is-optional-don-t-depend-on-it.patch b/external/libmwaw/0001-librevenge-stream-is-optional-don-t-depend-on-it.patch +new file mode 100644 +index 0000000..2b42f90 +--- /dev/null ++++ b/external/libmwaw/0001-librevenge-stream-is-optional-don-t-depend-on-it.patch +@@ -0,0 +1,293 @@ ++From 7b7cf183a7ad454706aa0f1657c851c578ec476e Mon Sep 17 00:00:00 2001 ++From: David Tardon ++Date: Sun, 25 May 2014 15:51:54 +0200 ++Subject: [PATCH] librevenge-stream is optional: don't depend on it ++ ++--- ++ src/lib/MWAWStringStream.cxx | 153 +++++++++++++++++++++++++++++++++++++++++++ ++ src/lib/MWAWStringStream.hxx | 50 ++++++++++++++ ++ src/lib/Makefile.am | 2 + ++ src/lib/WingzParser.cxx | 3 +- ++ 4 files changed, 207 insertions(+), 1 deletion(-) ++ create mode 100644 src/lib/MWAWStringStream.cxx ++ create mode 100644 src/lib/MWAWStringStream.hxx ++ ++diff --git a/src/lib/MWAWStringStream.cxx b/src/lib/MWAWStringStream.cxx ++new file mode 100644 ++index 0000000..efea071 ++--- /dev/null +++++ b/src/lib/MWAWStringStream.cxx ++@@ -0,0 +1,153 @@ +++/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */ +++ +++/* libmwaw +++* Version: MPL 2.0 / LGPLv2+ +++* +++* The contents of this file are subject to the Mozilla Public License Version +++* 2.0 (the "License"); you may not use this file except in compliance with +++* the License or as specified alternatively below. You may obtain a copy of +++* the License at http://www.mozilla.org/MPL/ +++* +++* Software distributed under the License is distributed on an "AS IS" basis, +++* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +++* for the specific language governing rights and limitations under the +++* License. +++* +++* Alternatively, the contents of this file may be used under the terms of +++* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), +++* in which case the provisions of the LGPLv2+ are applicable +++* instead of those above. +++*/ +++ +++#include +++#include +++ +++#include +++ +++#include "MWAWStringStream.hxx" +++ +++class MWAWStringStreamPrivate +++{ +++public: +++ MWAWStringStreamPrivate(const unsigned char *data, unsigned dataSize); +++ ~MWAWStringStreamPrivate(); +++ std::vector buffer; +++ long offset; +++private: +++ MWAWStringStreamPrivate(const MWAWStringStreamPrivate &); +++ MWAWStringStreamPrivate &operator=(const MWAWStringStreamPrivate &); +++}; +++ +++MWAWStringStreamPrivate::MWAWStringStreamPrivate(const unsigned char *data, unsigned dataSize) : +++ buffer(dataSize), +++ offset(0) +++{ +++ std::memcpy(&buffer[0], data, dataSize); +++} +++ +++MWAWStringStreamPrivate::~MWAWStringStreamPrivate() +++{ +++} +++ +++MWAWStringStream::MWAWStringStream(const unsigned char *data, const unsigned int dataSize) : +++ librevenge::RVNGInputStream(), +++ d(new MWAWStringStreamPrivate(data, dataSize)) +++{ +++} +++ +++MWAWStringStream::~MWAWStringStream() +++{ +++ delete d; +++} +++ +++const unsigned char *MWAWStringStream::read(unsigned long numBytes, unsigned long &numBytesRead) +++{ +++ numBytesRead = 0; +++ +++ if (numBytes == 0) +++ return 0; +++ +++ long numBytesToRead; +++ +++ if ((unsigned long)d->offset+numBytes < d->buffer.size()) +++ numBytesToRead = (long) numBytes; +++ else +++ numBytesToRead = (long) d->buffer.size() - d->offset; +++ +++ numBytesRead = (unsigned long) numBytesToRead; // about as paranoid as we can be.. +++ +++ if (numBytesToRead == 0) +++ return 0; +++ +++ long oldOffset = d->offset; +++ d->offset += numBytesToRead; +++ +++ return &d->buffer[size_t(oldOffset)]; +++ +++} +++ +++long MWAWStringStream::tell() +++{ +++ return d->offset; +++} +++ +++int MWAWStringStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) +++{ +++ if (seekType == librevenge::RVNG_SEEK_CUR) +++ d->offset += offset; +++ else if (seekType == librevenge::RVNG_SEEK_SET) +++ d->offset = offset; +++ else if (seekType == librevenge::RVNG_SEEK_END) +++ d->offset += d->buffer.size(); +++ +++ if (d->offset < 0) { +++ d->offset = 0; +++ return 1; +++ } +++ if ((long)d->offset > (long)d->buffer.size()) { +++ d->offset = (long) d->buffer.size(); +++ return 1; +++ } +++ +++ return 0; +++} +++ +++bool MWAWStringStream::isEnd() +++{ +++ if ((long)d->offset >= (long)d->buffer.size()) +++ return true; +++ +++ return false; +++} +++ +++bool MWAWStringStream::isStructured() +++{ +++ return false; +++} +++ +++unsigned MWAWStringStream::subStreamCount() +++{ +++ return 0; +++} +++ +++const char *MWAWStringStream::subStreamName(unsigned) +++{ +++ return 0; +++} +++ +++bool MWAWStringStream::existsSubStream(const char *) +++{ +++ return false; +++} +++ +++librevenge::RVNGInputStream *MWAWStringStream::getSubStreamById(unsigned) +++{ +++ return 0; +++} +++ +++librevenge::RVNGInputStream *MWAWStringStream::getSubStreamByName(const char *) +++{ +++ return 0; +++} +++ +++// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: ++diff --git a/src/lib/MWAWStringStream.hxx b/src/lib/MWAWStringStream.hxx ++new file mode 100644 ++index 0000000..9a6aa02 ++--- /dev/null +++++ b/src/lib/MWAWStringStream.hxx ++@@ -0,0 +1,50 @@ +++/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */ +++ +++/* libmwaw +++* Version: MPL 2.0 / LGPLv2+ +++* +++* The contents of this file are subject to the Mozilla Public License Version +++* 2.0 (the "License"); you may not use this file except in compliance with +++* the License or as specified alternatively below. You may obtain a copy of +++* the License at http://www.mozilla.org/MPL/ +++* +++* Software distributed under the License is distributed on an "AS IS" basis, +++* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +++* for the specific language governing rights and limitations under the +++* License. +++* +++* Alternatively, the contents of this file may be used under the terms of +++* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), +++* in which case the provisions of the LGPLv2+ are applicable +++* instead of those above. +++*/ +++ +++#include +++ +++class MWAWStringStreamPrivate; +++ +++class MWAWStringStream: public librevenge::RVNGInputStream +++{ +++public: +++ MWAWStringStream(const unsigned char *data, const unsigned int dataSize); +++ ~MWAWStringStream(); +++ +++ const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); +++ long tell(); +++ int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType); +++ bool isEnd(); +++ +++ bool isStructured(); +++ unsigned subStreamCount(); +++ const char *subStreamName(unsigned); +++ bool existsSubStream(const char *name); +++ librevenge::RVNGInputStream *getSubStreamByName(const char *name); +++ librevenge::RVNGInputStream *getSubStreamById(unsigned); +++ +++private: +++ MWAWStringStreamPrivate *d; +++ MWAWStringStream(const MWAWStringStream &); // copy is not allowed +++ MWAWStringStream &operator=(const MWAWStringStream &); // assignment is not allowed +++}; +++ +++// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: ++diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in ++index eb17bad..f7934b4 100644 ++--- a/src/lib/Makefile.in +++++ b/src/lib/Makefile.in ++@@ -162,12 +162,12 @@ am_libmwaw_@MWAW_MAJOR_VERSION@_@MWAW_MI ++ MWAWPrinter.lo MWAWPropertyHandler.lo MWAWRSRCParser.lo \ ++ MWAWSection.lo MWAWSpreadsheetDecoder.lo \ ++ MWAWSpreadsheetEncoder.lo MWAWSpreadsheetListener.lo \ ++- MWAWSubDocument.lo MWAWTable.lo MWAWTextListener.lo \ ++- NisusWrtGraph.lo NisusWrtParser.lo NisusWrtStruct.lo \ ++- NisusWrtText.lo RagTimeParser.lo RagTimeSpreadsheet.lo \ ++- RagTimeText.lo SuperPaintParser.lo TeachTxtParser.lo \ ++- WingzParser.lo WriteNowParser.lo WriteNowText.lo \ ++- WriterPlsParser.lo ZWrtParser.lo ZWrtText.lo +++ MWAWStringStream.lo MWAWSubDocument.lo MWAWTable.lo \ +++ MWAWTextListener.lo NisusWrtGraph.lo NisusWrtParser.lo \ +++ NisusWrtStruct.lo NisusWrtText.lo RagTimeParser.lo \ +++ RagTimeSpreadsheet.lo RagTimeText.lo SuperPaintParser.lo \ +++ TeachTxtParser.lo WingzParser.lo WriteNowParser.lo \ +++ WriteNowText.lo WriterPlsParser.lo ZWrtParser.lo ZWrtText.lo ++ libmwaw_@MWAW_MAJOR_VERSION@_@MWAW_MINOR_VERSION@_la_OBJECTS = $(am_libmwaw_@MWAW_MAJOR_VERSION@_@MWAW_MINOR_VERSION@_la_OBJECTS) ++ AM_V_lt = $(am__v_lt_@AM_V@) ++ am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) ++@@ -610,6 +610,8 @@ libmwaw_@MWAW_MAJOR_VERSION@_@MWAW_MINOR ++ MWAWSpreadsheetEncoder.hxx \ ++ MWAWSpreadsheetListener.cxx \ ++ MWAWSpreadsheetListener.hxx \ +++ MWAWStringStream.cxx \ +++ MWAWStringStream.hxx \ ++ MWAWSubDocument.cxx \ ++ MWAWSubDocument.hxx \ ++ MWAWTable.cxx \ ++@@ -812,6 +814,7 @@ distclean-compile: ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MWAWSpreadsheetDecoder.Plo@am__quote@ ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MWAWSpreadsheetEncoder.Plo@am__quote@ ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MWAWSpreadsheetListener.Plo@am__quote@ +++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MWAWStringStream.Plo@am__quote@ ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MWAWSubDocument.Plo@am__quote@ ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MWAWTable.Plo@am__quote@ ++ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MWAWTextListener.Plo@am__quote@ ++diff --git a/src/lib/WingzParser.cxx b/src/lib/WingzParser.cxx ++index 4813816..93dde7d 100644 ++--- a/src/lib/WingzParser.cxx +++++ b/src/lib/WingzParser.cxx ++@@ -49,6 +49,7 @@ ++ #include "MWAWPictMac.hxx" ++ #include "MWAWPrinter.hxx" ++ #include "MWAWSpreadsheetListener.hxx" +++#include "MWAWStringStream.hxx" ++ #include "MWAWSubDocument.hxx" ++ ++ #include "WingzParser.hxx" ++@@ -2496,7 +2497,7 @@ bool WingzParser::decodeEncrypted() ++ ++ // finally replace the actual input with a new input ++ shared_ptr newInput ++- (new librevenge::RVNGStringStream(buffer, (unsigned int)length)); +++ (new MWAWStringStream(buffer, (unsigned int)length)); ++ delete [] buffer; ++ getParserState()->m_input.reset(new MWAWInputStream(newInput, false)); ++ return true; ++-- ++1.9.0 ++ +diff --git a/external/libmwaw/0001-std-isfinite-is-C-11.patch b/external/libmwaw/0001-std-isfinite-is-C-11.patch +deleted file mode 100644 +index 73fde5a..0000000 +--- a/external/libmwaw/0001-std-isfinite-is-C-11.patch ++++ /dev/null +@@ -1,43 +0,0 @@ +-From 5da59d9aa9298136d447e4014aef207f00cdc82b Mon Sep 17 00:00:00 2001 +-From: David Tardon +-Date: Sun, 3 Nov 2013 12:26:26 +0100 +-Subject: [PATCH] std::isfinite is C++11 +- +---- +- configure.ac | 10 ++++++++++ +- src/lib/CWDbaseContent.cxx | 5 +++-- +- 2 files changed, 13 insertions(+), 2 deletions(-) +- +-diff --git a/src/lib/CWDbaseContent.cxx b/src/lib/CWDbaseContent.cxx +-index f27148d..7198103 100644 +---- a/src/lib/CWDbaseContent.cxx +-+++ b/src/lib/CWDbaseContent.cxx +-@@ -33,7 +33,6 @@ +- +- #include +- +--#include +- #include +- #include +- #include +-@@ -41,6 +40,8 @@ +- #include +- #include +- +-+#include +-+ +- #include +- +- #include "MWAWContentListener.hxx" +-@@ -969,7 +970,7 @@ void CWDbaseContent::send(double val, CWStyleManager::CellFormat const &format) +- if (type>=10&&type<=11) type += 4; +- else if (type>=14) type=16; +- } +-- if (type <= 0 || type >=16 || type==10 || type==11 || !std::isfinite(val)) { +-+ if (type <= 0 || type >=16 || type==10 || type==11 || !boost::math::isfinite(val)) { +- s << val; +- listener->insertUnicodeString(s.str().c_str()); +- return; +--- +-1.8.3.1 +- +diff --git a/external/libmwaw/0001-use-correct-type.patch b/external/libmwaw/0001-use-correct-type.patch +deleted file mode 100644 +index 7a6ef2d..0000000 +--- a/external/libmwaw/0001-use-correct-type.patch ++++ /dev/null +@@ -1,52 +0,0 @@ +-From cde8d7c47cdea327f8153ab72cde650f1b36f7f8 Mon Sep 17 00:00:00 2001 +-From: David Tardon +-Date: Sun, 3 Nov 2013 12:59:29 +0100 +-Subject: [PATCH] use correct type +- +---- +- src/lib/HMWJGraph.cxx | 8 ++++---- +- 1 file changed, 4 insertions(+), 4 deletions(-) +- +-diff --git a/src/lib/HMWJGraph.cxx b/src/lib/HMWJGraph.cxx +-index fca366c..dd83ace 100644 +---- a/src/lib/HMWJGraph.cxx +-+++ b/src/lib/HMWJGraph.cxx +-@@ -2668,7 +2668,7 @@ bool HMWJGraph::sendGroup(HMWJGraphInternal::Group const &group, MWAWPosition po +- return true; +- } +- +-- std::multimap::const_iterator fIt; +-+ std::map::const_iterator fIt; +- int numFrames = int(m_state->m_framesList.size()); +- for (size_t c=0; c::const_iterator fIt; +-+ std::map::const_iterator fIt; +- int page = group.m_page; +- int numFrames = int(m_state->m_framesList.size()); +- for (size_t c=0; cm_input; +-- std::multimap::const_iterator fIt; +-+ std::map::const_iterator fIt; +- int numFrames = int(m_state->m_framesList.size()); +- for (size_t c=0; cm_input; +-- std::multimap::const_iterator fIt; +-+ std::map::const_iterator fIt; +- int numFrames = int(m_state->m_framesList.size()); +- for (size_t c=0; c +-Date: Thu, 24 Apr 2014 10:40:05 +0200 +-Subject: [PATCH] values4003 apparently contains 22 patterns, not 28 +- +-(cherry picked from commit c2ee6f30deb497dcf0ffa18a7ade603f398d889f) +- +-Conflicts: +- src/lib/MSKGraph.cxx +---- +- src/lib/MSKGraph.cxx | 2 +- +- 1 file changed, 1 insertion(+), 1 deletion(-) +- +-diff --git a/src/lib/MSKGraph.cxx b/src/lib/MSKGraph.cxx +-index 7c1a9f6..f32d7c6 100644 +---- a/src/lib/MSKGraph.cxx +-+++ b/src/lib/MSKGraph.cxx +-@@ -728,7 +728,7 @@ void State::initPatterns(int vers) +- 0x55ff, 0x55ff, 0x55ff, 0x55ff, 0x55ff, 0xeeff, 0x55ff, 0xbbff, 0x77ff, 0xddff, 0x77ff, 0xddff, 0x7fff, 0xf7ff, 0x7fff, 0xf7ff, +- 0x7fff, 0xffff, 0xf7ff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff +- }; +-- m_rsrcPatternsMap.insert(std::map::value_type(4003,Patterns(28, values4003))); +-+ m_rsrcPatternsMap.insert(std::map::value_type(4003,Patterns(22, values4003))); +- static uint16_t const (values4004[]) = { +- 0xf0f0, 0xf0f0, 0x0f0f, 0x0f0f, 0xcccc, 0x3333, 0xcccc, 0x3333, 0x3333, 0xcccc, 0x3333, 0xcccc +- }; +--- +-1.9.0 +- +diff --git a/external/libmwaw/0002-librevenge-stream-is-optional-don-t-depend-on-it.patch b/external/libmwaw/0002-librevenge-stream-is-optional-don-t-depend-on-it.patch +new file mode 100644 +index 0000000..bd94338 +--- /dev/null ++++ b/external/libmwaw/0002-librevenge-stream-is-optional-don-t-depend-on-it.patch +@@ -0,0 +1,54 @@ ++From ead2223f2d3d4742df84f37c6cea9c73b71257c5 Mon Sep 17 00:00:00 2001 ++From: David Tardon ++Date: Sun, 25 May 2014 16:07:21 +0200 ++Subject: [PATCH] librevenge-stream is optional: don't depend on it ++ ++--- ++ src/lib/MWAWInputStream.cxx | 9 +++++---- ++ 1 file changed, 5 insertions(+), 4 deletions(-) ++ ++diff --git a/src/lib/MWAWInputStream.cxx b/src/lib/MWAWInputStream.cxx ++index 91b713b..0d60f67 100644 ++--- a/src/lib/MWAWInputStream.cxx +++++ b/src/lib/MWAWInputStream.cxx ++@@ -43,6 +43,7 @@ ++ #include "MWAWDebug.hxx" ++ ++ #include "MWAWInputStream.hxx" +++#include "MWAWStringStream.hxx" ++ ++ MWAWInputStream::MWAWInputStream(shared_ptr inp, bool inverted) ++ : m_stream(inp), m_streamSize(0), m_inverseRead(inverted), m_readLimit(-1), m_prevLimits(), ++@@ -517,7 +518,7 @@ bool MWAWInputStream::unBinHex() ++ MWAW_DEBUG_MSG(("MWAWInputStream::unBinHex: can not read the resource fork\n")); ++ } ++ else { ++- shared_ptr rsrc(new librevenge::RVNGStringStream(data, (unsigned int)numBytesRead)); +++ shared_ptr rsrc(new MWAWStringStream(data, (unsigned int)numBytesRead)); ++ m_resourceFork.reset(new MWAWInputStream(rsrc,false)); ++ } ++ } ++@@ -532,7 +533,7 @@ bool MWAWInputStream::unBinHex() ++ MWAW_DEBUG_MSG(("MWAWInputStream::unBinHex: can not read the data fork\n")); ++ return false; ++ } ++- m_stream.reset(new librevenge::RVNGStringStream(data, (unsigned int)numBytesRead)); +++ m_stream.reset(new MWAWStringStream(data, (unsigned int)numBytesRead)); ++ } ++ ++ return true; ++@@ -692,9 +693,9 @@ bool MWAWInputStream::unMacMIME(MWAWInputStream *inp, ++ return false; ++ } ++ if (wh==1) ++- dataInput.reset(new librevenge::RVNGStringStream(data, (unsigned int)numBytesRead)); +++ dataInput.reset(new MWAWStringStream(data, (unsigned int)numBytesRead)); ++ else if (wh==2) ++- rsrcInput.reset(new librevenge::RVNGStringStream(data, (unsigned int)numBytesRead)); +++ rsrcInput.reset(new MWAWStringStream(data, (unsigned int)numBytesRead)); ++ else { // the finder info ++ if (entrySize < 8) { ++ MWAW_DEBUG_MSG(("MWAWInputStream::unMacMIME: finder info size is odd\n")); ++-- ++1.9.0 ++ +diff --git a/external/libmwaw/ExternalProject_libmwaw.mk b/external/libmwaw/ExternalProject_libmwaw.mk +index e8d837b..bbc69a7 100644 +--- a/external/libmwaw/ExternalProject_libmwaw.mk ++++ b/external/libmwaw/ExternalProject_libmwaw.mk +@@ -17,8 +17,7 @@ $(eval $(call gb_ExternalProject_register_targets,libmwaw,\ + + $(eval $(call gb_ExternalProject_use_externals,libmwaw,\ + boost_headers \ +- wpd \ +- wpg \ ++ revenge \ + )) + + $(call gb_ExternalProject_get_state_target,libmwaw,build) : +@@ -29,12 +28,14 @@ $(call gb_ExternalProject_get_state_target,libmwaw,build) : + --enable-static \ + --disable-shared \ + --without-docs \ ++ --disable-tools \ ++ --disable-zip \ + $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug,--disable-debug) \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + --disable-werror \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + && (cd $(EXTERNAL_WORKDIR)/src/lib && \ +- $(if $(VERBOSE)$(verbose),V=1) \ + $(MAKE)) \ + ) + +diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk b/external/libmwaw/UnpackedTarball_libmwaw.mk +index 44fa61f..6f63f28 100644 +--- a/external/libmwaw/UnpackedTarball_libmwaw.mk ++++ b/external/libmwaw/UnpackedTarball_libmwaw.mk +@@ -14,9 +14,8 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libmwaw,$(MWAW_TARBALL))) + $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,1)) + + $(eval $(call gb_UnpackedTarball_add_patches,libmwaw,\ +- external/libmwaw/0001-std-isfinite-is-C-11.patch \ +- external/libmwaw/0001-use-correct-type.patch \ +- external/libmwaw/0001-values4003-apparently-contains-22-patterns-not-28.patch \ ++ external/libmwaw/0001-librevenge-stream-is-optional-don-t-depend-on-it.patch \ ++ external/libmwaw/0002-librevenge-stream-is-optional-don-t-depend-on-it.patch \ + )) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libodfgen/0001-properly-export-API-symbols.patch b/external/libodfgen/0001-properly-export-API-symbols.patch +index 3f488eb..91799aa 100644 +--- a/external/libodfgen/0001-properly-export-API-symbols.patch ++++ b/external/libodfgen/0001-properly-export-API-symbols.patch +@@ -21,14 +21,14 @@ index 79c387b..19e04e3 100644 + +++ b/inc/libodfgen/OdfDocumentHandler.hxx + @@ -26,6 +26,8 @@ + #define _ODFDOCUMENTHANDLER_HXX_ +- #include ++ #include + + +#include "libodfgen-api.hxx" + + + /** Type of ODF content a generator should produce. + * + * @sa OdgGenerator, OdpGenerator, OdtGenerator +-@@ -57,7 +59,7 @@ typedef bool (*OdfEmbeddedImage)(const WPXBinaryData &input, librev ++@@ -57,7 +59,7 @@ typedef bool (*OdfEmbeddedImage)(const librevenge::RVNGBinaryData &input, librev + * saved to a file, printed to the standard output, saved to a file + * inside a package, or whatever else. + */ +@@ -42,64 +42,85 @@ index f818e3e..24455d8 100644 + --- a/inc/libodfgen/OdgGenerator.hxx + +++ b/inc/libodfgen/OdgGenerator.hxx + @@ -27,6 +27,7 @@ +- #include +- #include ++ ++ #include + + +#include "libodfgen-api.hxx" + #include "OdfDocumentHandler.hxx" + +- class OdgGeneratorPrivate; ++ class OdfGenerator; + @@ -37,7 +38,7 @@ class OdgGeneratorPrivate; +- * See @c libwpg library for documentation of the +- * libwpg::WPGPaintInterface interface. ++ * See @c librevenge library for documentation of the ++ * librevenge::WPGPaintInterface interface. + */ +--class OdgGenerator : public libwpg::WPGPaintInterface +-+class ODFGENAPI OdgGenerator : public libwpg::WPGPaintInterface ++-class OdgGenerator : public librevenge::RVNGDrawingInterface +++class ODFGENAPI OdgGenerator : public librevenge::RVNGDrawingInterface + { + public: +- OdgGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType); ++ OdgGenerator(); + diff --git a/inc/libodfgen/OdpGenerator.hxx b/inc/libodfgen/OdpGenerator.hxx + index 71f2562..c61f5ad 100644 + --- a/inc/libodfgen/OdpGenerator.hxx + +++ b/inc/libodfgen/OdpGenerator.hxx + @@ -27,6 +27,7 @@ + +- #include ++ #include + + +#include "libodfgen-api.hxx" + #include "OdfDocumentHandler.hxx" + +- class OdpGeneratorPrivate; ++ class OdfGenerator; + @@ -37,7 +38,7 @@ class OdpGeneratorPrivate; +- * See @c libetonyek library for documentation of the +- * libetonyek::KEYPresentationInterface interface. ++ * See @c librevenge library for documentation of the ++ * librevenge::KEYPresentationInterface interface. ++ */ ++-class OdpGenerator : public librevenge::RVNGPresentationInterface +++class ODFGENAPI OdpGenerator : public librevenge::RVNGPresentationInterface ++ { ++ public: ++ OdpGenerator(); ++diff --git a/inc/libodfgen/OdsGenerator.hxx b/inc/libodfgen/OdsGenerator.hxx ++index f88c207..09e1b18 100644 ++--- a/inc/libodfgen/OdsGenerator.hxx +++++ b/inc/libodfgen/OdsGenerator.hxx ++@@ -29,6 +29,7 @@ ++ ++ #include ++ +++#include "libodfgen-api.hxx" ++ #include "OdfDocumentHandler.hxx" ++ ++ class OdfGenerator; ++@@ -39,7 +40,7 @@ class OdsGeneratorPrivate; ++ * See @c libdocumentinterface library for documentation of the librevenge::RVNGSpreadsheetInterface ++ * interface. + */ +--class OdpGenerator : public libetonyek::KEYPresentationInterface +-+class ODFGENAPI OdpGenerator : public libetonyek::KEYPresentationInterface ++-class OdsGenerator : public librevenge::RVNGSpreadsheetInterface +++class ODFGENAPI OdsGenerator : public librevenge::RVNGSpreadsheetInterface + { + public: +- OdpGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType); ++ OdsGenerator(); + diff --git a/inc/libodfgen/OdtGenerator.hxx b/inc/libodfgen/OdtGenerator.hxx + index 9c3ff88..e11778c 100644 + --- a/inc/libodfgen/OdtGenerator.hxx + +++ b/inc/libodfgen/OdtGenerator.hxx + @@ -29,6 +29,7 @@ + +- #include ++ #include + + +#include "libodfgen-api.hxx" + #include "OdfDocumentHandler.hxx" + +- /** Handler for embedded objects. ++ class OdtGeneratorPrivate; + @@ -39,7 +40,7 @@ class OdfGenerator; +- * See @c libwpd library for documentation of the ::WPXDocumentInterface ++ * See @c librevenge library for documentation of the ::librevenge::RVNGTextInterface + * interface. + */ +--class OdtGenerator : public WPXDocumentInterface +-+class ODFGENAPI OdtGenerator : public WPXDocumentInterface ++-class OdtGenerator : public librevenge::RVNGTextInterface +++class ODFGENAPI OdtGenerator : public librevenge::RVNGTextInterface + { + public: +- OdtGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType); ++ OdtGenerator(); + diff --git a/inc/libodfgen/libodfgen-api.hxx b/inc/libodfgen/libodfgen-api.hxx + new file mode 100644 + index 0000000..39ffd05 +diff --git a/external/libodfgen/ExternalPackage_libodfgen.mk b/external/libodfgen/ExternalPackage_libodfgen.mk +index a0692ed..5ae1839 100644 +--- a/external/libodfgen/ExternalPackage_libodfgen.mk ++++ b/external/libodfgen/ExternalPackage_libodfgen.mk +@@ -12,11 +12,11 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,libodfgen,libodfgen)) + $(eval $(call gb_ExternalPackage_use_external_project,libodfgen,libodfgen)) + + ifeq ($(OS),MACOSX) +-$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.0.0.dylib,src/.libs/libodfgen-0.0.dylib)) ++$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.1.1.dylib,src/.libs/libodfgen-0.1.dylib)) + else ifeq ($(OS),WNT) +-$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.0.dll,src/.libs/libodfgen-0.0.dll)) ++$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.1.dll,src/.libs/libodfgen-0.1.dll)) + else ifeq ($(filter IOS ANDROID,$(OS)),) +-$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.0.so.0,src/.libs/libodfgen-0.0.so.0.0.4)) ++$(eval $(call gb_ExternalPackage_add_file,libodfgen,$(LIBO_LIB_FOLDER)/libodfgen-0.1.so.1,src/.libs/libodfgen-0.1.so.1.0.0)) + endif + + # vim: set noet sw=4 ts=4: +diff --git a/external/libodfgen/ExternalProject_libodfgen.mk b/external/libodfgen/ExternalProject_libodfgen.mk +index ab430df..f4e0072 100644 +--- a/external/libodfgen/ExternalProject_libodfgen.mk ++++ b/external/libodfgen/ExternalProject_libodfgen.mk +@@ -17,9 +17,7 @@ $(eval $(call gb_ExternalProject_register_targets,libodfgen,\ + + $(eval $(call gb_ExternalProject_use_externals,libodfgen,\ + boost_headers \ +- etonyek \ +- wpd \ +- wpg \ ++ revenge \ + )) + + $(call gb_ExternalProject_get_state_target,libodfgen,build) : +diff --git a/external/libodfgen/Library_odfgen.mk b/external/libodfgen/Library_odfgen.mk +index ce18735..dfdd5df 100644 +--- a/external/libodfgen/Library_odfgen.mk ++++ b/external/libodfgen/Library_odfgen.mk +@@ -13,9 +13,7 @@ $(eval $(call gb_Library_use_unpacked,odfgen,libodfgen)) + + $(eval $(call gb_Library_use_externals,odfgen,\ + boost_headers \ +- etonyek \ +- wpd \ +- wpg \ ++ revenge \ + )) + + $(eval $(call gb_Library_set_warnings_not_errors,odfgen)) +@@ -34,15 +32,21 @@ $(eval $(call gb_Library_add_defs,odfgen,\ + + $(eval $(call gb_Library_add_generated_exception_objects,odfgen,\ + UnpackedTarball/libodfgen/src/DocumentElement \ ++ UnpackedTarball/libodfgen/src/FilterInternal \ + UnpackedTarball/libodfgen/src/FontStyle \ + UnpackedTarball/libodfgen/src/GraphicFunctions \ ++ UnpackedTarball/libodfgen/src/GraphicStyle \ + UnpackedTarball/libodfgen/src/InternalHandler \ + UnpackedTarball/libodfgen/src/ListStyle \ ++ UnpackedTarball/libodfgen/src/OdcGenerator \ ++ UnpackedTarball/libodfgen/src/OdfGenerator \ + UnpackedTarball/libodfgen/src/OdgGenerator \ + UnpackedTarball/libodfgen/src/OdpGenerator \ ++ UnpackedTarball/libodfgen/src/OdsGenerator \ + UnpackedTarball/libodfgen/src/OdtGenerator \ + UnpackedTarball/libodfgen/src/PageSpan \ + UnpackedTarball/libodfgen/src/SectionStyle \ ++ UnpackedTarball/libodfgen/src/SheetStyle \ + UnpackedTarball/libodfgen/src/TableStyle \ + UnpackedTarball/libodfgen/src/TextRunStyle \ + )) +diff --git a/external/librevenge/0001-nested-iterator-classes-need-to-be-exported-too.patch b/external/librevenge/0001-nested-iterator-classes-need-to-be-exported-too.patch +new file mode 100644 +index 0000000..a6055f9 +--- /dev/null ++++ b/external/librevenge/0001-nested-iterator-classes-need-to-be-exported-too.patch +@@ -0,0 +1,53 @@ ++From 03c0fe096ae6e71237d36b88f5f0aa0f62eb09d6 Mon Sep 17 00:00:00 2001 ++From: David Tardon ++Date: Mon, 26 May 2014 14:47:57 +0200 ++Subject: [PATCH] nested iterator classes need to be exported too ++ ++--- ++ inc/librevenge/RVNGPropertyList.h | 2 +- ++ inc/librevenge/RVNGPropertyListVector.h | 2 +- ++ inc/librevenge/RVNGString.h | 2 +- ++ 3 files changed, 3 insertions(+), 3 deletions(-) ++ ++diff --git a/inc/librevenge/RVNGPropertyList.h b/inc/librevenge/RVNGPropertyList.h ++index c00af07..ac9c10d 100644 ++--- a/inc/librevenge/RVNGPropertyList.h +++++ b/inc/librevenge/RVNGPropertyList.h ++@@ -60,7 +60,7 @@ public: ++ ++ RVNGString getPropString() const; ++ ++- class Iter +++ class REVENGE_API Iter ++ { ++ public: ++ Iter(const RVNGPropertyList &propList); ++diff --git a/inc/librevenge/RVNGPropertyListVector.h b/inc/librevenge/RVNGPropertyListVector.h ++index 850326e..d56f583 100644 ++--- a/inc/librevenge/RVNGPropertyListVector.h +++++ b/inc/librevenge/RVNGPropertyListVector.h ++@@ -55,7 +55,7 @@ public: ++ ++ RVNGString getPropString() const; ++ ++- class Iter +++ class REVENGE_API Iter ++ { ++ public: ++ Iter(const RVNGPropertyListVector &vect); ++diff --git a/inc/librevenge/RVNGString.h b/inc/librevenge/RVNGString.h ++index cbea3bc..429170a 100644 ++--- a/inc/librevenge/RVNGString.h +++++ b/inc/librevenge/RVNGString.h ++@@ -118,7 +118,7 @@ public: ++ return !operator<=(str); ++ } ++ ++- class Iter +++ class REVENGE_API Iter ++ { ++ public: ++ Iter(const RVNGString &str); ++-- ++1.9.0 ++ +diff --git a/external/librevenge/UnpackedTarball_librevenge.mk b/external/librevenge/UnpackedTarball_librevenge.mk +index 8311eab..4fef678 100644 +--- a/external/librevenge/UnpackedTarball_librevenge.mk ++++ b/external/librevenge/UnpackedTarball_librevenge.mk +@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,librevenge,1)) + + $(eval $(call gb_UnpackedTarball_add_patches,librevenge,\ + external/librevenge/0001-properly-export-API-symbols.patch \ ++ external/librevenge/0001-nested-iterator-classes-need-to-be-exported-too.patch \ + )) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch b/external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch +deleted file mode 100644 +index 6c7135f..0000000 +--- a/external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch ++++ /dev/null +@@ -1,26 +0,0 @@ +-From 410f564d9a728b983cf11ba9b3eadfc7d59c187c Mon Sep 17 00:00:00 2001 +-From: David Tardon +-Date: Thu, 17 Oct 2013 10:35:34 +0200 +-Subject: [PATCH] fdo#70480 do not crash reading malformed zip +- +-Change-Id: Ia37e8be5172a49669cb9f7271c5401ca88f39072 +---- +- src/lib/VSDZipStream.cpp | 2 ++ +- 1 file changed, 2 insertions(+) +- +-diff --git a/src/lib/VSDZipStream.cpp b/src/lib/VSDZipStream.cpp +-index 3b3e08a..1c12d56 100644 +---- a/src/lib/VSDZipStream.cpp +-+++ b/src/lib/VSDZipStream.cpp +-@@ -203,6 +203,8 @@ bool libvisio::VSDZipStreamImpl::isZipStream() +- return false; +- if (!readCentralDirectory(end)) +- return false; +-+ if (m_cdir.empty()) +-+ return false; +- CentralDirectoryEntry entry = m_cdir.begin()->second; +- m_input->seek(entry.offset, WPX_SEEK_SET); +- LocalFileHeader header; +--- +-1.8.3.1 +- +diff --git a/external/libvisio/ExternalProject_libvisio.mk b/external/libvisio/ExternalProject_libvisio.mk +index 597ea93..4ea2b23 100644 +--- a/external/libvisio/ExternalProject_libvisio.mk ++++ b/external/libvisio/ExternalProject_libvisio.mk +@@ -18,9 +18,8 @@ $(eval $(call gb_ExternalProject_register_targets,libvisio,\ + $(eval $(call gb_ExternalProject_use_externals,libvisio,\ + boost_headers \ + icu \ +- wpd \ +- wpg \ + libxml2 \ ++ revenge \ + zlib \ + )) + +@@ -32,14 +31,14 @@ $(call gb_ExternalProject_get_state_target,libvisio,build) : + --enable-static \ + --disable-shared \ + --without-docs \ ++ --disable-tools \ + --disable-debug \ + --disable-werror \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side)) \ + $(if $(SYSTEM_LIBXML),,-I$(call gb_UnpackedTarball_get_dir,xml2)/include)" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && (cd $(EXTERNAL_WORKDIR)/src/lib && \ +- $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE)) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libvisio/UnpackedTarball_libvisio.mk b/external/libvisio/UnpackedTarball_libvisio.mk +index 4680d78..e4c0561 100644 +--- a/external/libvisio/UnpackedTarball_libvisio.mk ++++ b/external/libvisio/UnpackedTarball_libvisio.mk +@@ -11,10 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libvisio)) + + $(eval $(call gb_UnpackedTarball_set_tarball,libvisio,$(VISIO_TARBALL))) + +-$(eval $(call gb_UnpackedTarball_set_patchlevel,libvisio,1)) +- +-$(eval $(call gb_UnpackedTarball_add_patches,libvisio,\ +- external/libvisio/0001-fdo-70480-do-not-crash-reading-malformed-zip.patch \ +-)) +- + # vim: set noet sw=4 ts=4: +diff --git a/external/libwpd/ExternalProject_libwpd.mk b/external/libwpd/ExternalProject_libwpd.mk +index 4d65938..88b7715 100644 +--- a/external/libwpd/ExternalProject_libwpd.mk ++++ b/external/libwpd/ExternalProject_libwpd.mk +@@ -15,20 +15,25 @@ $(eval $(call gb_ExternalProject_register_targets,libwpd,\ + build \ + )) + ++$(eval $(call gb_ExternalProject_use_externals,libwpd,\ ++ revenge \ ++)) ++ + $(call gb_ExternalProject_get_state_target,libwpd,build) : + $(call gb_ExternalProject_run,build,\ +- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)" CXXFLAGS="$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)") \ +- ./configure \ ++ export PKG_CONFIG="" \ ++ && ./configure \ + --with-pic \ + --enable-static \ + --disable-shared \ +- --without-stream \ + --without-docs \ ++ --disable-tools \ + --disable-debug \ + $(if $(filter MACOSX,$(OS)),--disable-werror) \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ ++ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)" CXXFLAGS="$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)") \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libwpg/ExternalProject_libwpg.mk b/external/libwpg/ExternalProject_libwpg.mk +index e8fafe7..804a989 100644 +--- a/external/libwpg/ExternalProject_libwpg.mk ++++ b/external/libwpg/ExternalProject_libwpg.mk +@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,libwpg,\ + )) + + $(eval $(call gb_ExternalProject_use_externals,libwpg,\ ++ revenge \ + wpd \ + )) + +@@ -27,12 +28,12 @@ $(call gb_ExternalProject_get_state_target,libwpg,build) : + --enable-static \ + --disable-shared \ + --without-docs \ ++ --disable-tools \ + --disable-debug \ + --disable-werror \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && (cd $(EXTERNAL_WORKDIR)/src/lib && \ +- $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE)) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/external/libwpg/UnpackedTarball_libwpg.mk b/external/libwpg/UnpackedTarball_libwpg.mk +index 7c76a95..03be206 100644 +--- a/external/libwpg/UnpackedTarball_libwpg.mk ++++ b/external/libwpg/UnpackedTarball_libwpg.mk +@@ -11,11 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libwpg)) + + $(eval $(call gb_UnpackedTarball_set_tarball,libwpg,$(WPG_TARBALL))) + +-# HACK to avoid the need to deliver the headers to $(OUTDIR). This +-# should be removed when libwpg is updated. +-$(eval $(call gb_UnpackedTarball_set_post_action,libwpg,\ +- mkdir -p inc/libwpg && \ +- cp -f src/lib/libwpg.h src/lib/WPGPaintInterface.h src/lib/WPGraphics.h inc/libwpg \ +-)) +- + # vim: set noet sw=4 ts=4: +diff --git a/external/libwps/ExternalProject_libwps.mk b/external/libwps/ExternalProject_libwps.mk +index a1b1bac..f21c70d 100644 +--- a/external/libwps/ExternalProject_libwps.mk ++++ b/external/libwps/ExternalProject_libwps.mk +@@ -17,7 +17,7 @@ $(eval $(call gb_ExternalProject_register_targets,libwps,\ + + $(eval $(call gb_ExternalProject_use_externals,libwps,\ + boost_headers \ +- wpd \ ++ revenge \ + )) + + $(call gb_ExternalProject_get_state_target,libwps,build) : +@@ -28,13 +28,13 @@ $(call gb_ExternalProject_get_state_target,libwps,build) : + --enable-static \ + --disable-shared \ + --without-docs \ ++ --disable-tools \ + --disable-debug \ + --disable-werror \ ++ $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ + CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ +- && (cd $(EXTERNAL_WORKDIR)/src/lib && \ +- $(if $(VERBOSE)$(verbose),V=1) \ +- $(MAKE)) \ ++ && $(MAKE) \ + ) + + # vim: set noet sw=4 ts=4: +diff --git a/include/writerperfect/DirectoryStream.hxx b/include/writerperfect/DirectoryStream.hxx +index 7c8e9b0..b8f3dad 100644 +--- a/include/writerperfect/DirectoryStream.hxx ++++ b/include/writerperfect/DirectoryStream.hxx +@@ -10,7 +10,7 @@ + #ifndef INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX + #define INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX + +-#include ++#include + + #include + +@@ -23,7 +23,7 @@ namespace com { namespace sun { namespace star { namespace ucb { + namespace writerperfect + { + +-class WRITERPERFECT_DLLPUBLIC DirectoryStream : public WPXInputStream ++class WRITERPERFECT_DLLPUBLIC DirectoryStream : public librevenge::RVNGInputStream + { + struct Impl; + +@@ -31,13 +31,17 @@ public: + explicit DirectoryStream(const com::sun::star::uno::Reference &xContent); + virtual ~DirectoryStream(); + +- virtual bool isOLEStream() SAL_OVERRIDE; +- virtual WPXInputStream *getDocumentOLEStream(const char *pName) SAL_OVERRIDE; ++ virtual bool isStructured() SAL_OVERRIDE; ++ virtual unsigned subStreamCount() SAL_OVERRIDE; ++ virtual const char *subStreamName(unsigned id) SAL_OVERRIDE; ++ virtual bool existsSubStream(const char *name) SAL_OVERRIDE; ++ virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name) SAL_OVERRIDE; ++ virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id) SAL_OVERRIDE; + +- virtual const unsigned char *read(unsigned long nNumBytes, unsigned long &nNumBytesRead) SAL_OVERRIDE; +- virtual int seek(long nOffset, WPX_SEEK_TYPE eSeekType) SAL_OVERRIDE; ++ virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) SAL_OVERRIDE; ++ virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) SAL_OVERRIDE; + virtual long tell() SAL_OVERRIDE; +- virtual bool atEOS() SAL_OVERRIDE; ++ virtual bool isEnd() SAL_OVERRIDE; + + private: + Impl *m_pImpl; +diff --git a/include/writerperfect/DocumentHandler.hxx b/include/writerperfect/DocumentHandler.hxx +index db18e35..2670096 100644 +--- a/include/writerperfect/DocumentHandler.hxx ++++ b/include/writerperfect/DocumentHandler.hxx +@@ -22,8 +22,6 @@ + + #include + +-#include +- + #include + + #include +@@ -41,9 +39,9 @@ public: + DocumentHandler(com::sun::star::uno::Reference < com::sun::star::xml::sax::XDocumentHandler > &xHandler); + void startDocument() SAL_OVERRIDE; + void endDocument() SAL_OVERRIDE; +- void startElement(const char *psName, const WPXPropertyList &xPropList) SAL_OVERRIDE; ++ void startElement(const char *psName, const librevenge::RVNGPropertyList &xPropList) SAL_OVERRIDE; + void endElement(const char *psName) SAL_OVERRIDE; +- void characters(const WPXString &sCharacters) SAL_OVERRIDE; ++ void characters(const librevenge::RVNGString &sCharacters) SAL_OVERRIDE; + + private: + com::sun::star::uno::Reference < com::sun::star::xml::sax::XDocumentHandler > mxHandler; +diff --git a/include/writerperfect/WPXSvInputStream.hxx b/include/writerperfect/WPXSvInputStream.hxx +index 9890b32..03b5a7d 100644 +--- a/include/writerperfect/WPXSvInputStream.hxx ++++ b/include/writerperfect/WPXSvInputStream.hxx +@@ -10,7 +10,7 @@ + #ifndef INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX + #define INCLUDED_WRITERPERFECT_WPXSVINPUTSTREAM_HXX + +-#include ++#include + + #include + +@@ -26,27 +26,23 @@ namespace writerperfect + + class WPXSvInputStreamImpl; + +-class WRITERPERFECT_DLLPUBLIC WPXSvInputStream : public WPXInputStream ++class WRITERPERFECT_DLLPUBLIC WPXSvInputStream : public librevenge::RVNGInputStream + { + public: + WPXSvInputStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xStream ); + virtual ~WPXSvInputStream(); + +- virtual bool isStructured(); +- virtual unsigned subStreamCount(); +- virtual const char * subStreamName(unsigned id); +- virtual bool existsSubStream(const char *name); +- virtual WPXInputStream * getSubStreamByName(const char *name); +- virtual WPXInputStream * getSubStreamById(unsigned id); ++ virtual bool isStructured() SAL_OVERRIDE; ++ virtual unsigned subStreamCount() SAL_OVERRIDE; ++ virtual const char * subStreamName(unsigned id) SAL_OVERRIDE; ++ virtual bool existsSubStream(const char *name) SAL_OVERRIDE; ++ virtual librevenge::RVNGInputStream * getSubStreamByName(const char *name) SAL_OVERRIDE; ++ virtual librevenge::RVNGInputStream * getSubStreamById(unsigned id) SAL_OVERRIDE; + + virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) SAL_OVERRIDE; +- virtual int seek(long offset, WPX_SEEK_TYPE seekType) SAL_OVERRIDE; ++ virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) SAL_OVERRIDE; + virtual long tell() SAL_OVERRIDE; +- virtual bool isEnd(); +- +- virtual bool isOLEStream() SAL_OVERRIDE; +- virtual WPXInputStream * getDocumentOLEStream(const char *name) SAL_OVERRIDE; +- virtual bool atEOS() SAL_OVERRIDE; ++ virtual bool isEnd() SAL_OVERRIDE; + + private: + WPXSvInputStreamImpl *mpImpl; +diff --git a/writerperfect/CppunitTest_writerperfect_stream.mk b/writerperfect/CppunitTest_writerperfect_stream.mk +index 1d8ae92..8416008 100644 +--- a/writerperfect/CppunitTest_writerperfect_stream.mk ++++ b/writerperfect/CppunitTest_writerperfect_stream.mk +@@ -23,7 +23,7 @@ $(eval $(call gb_CppunitTest_use_ure,writerperfect_stream)) + + $(eval $(call gb_CppunitTest_use_externals,writerperfect_stream,\ + boost_headers \ +- wpd \ ++ revenge \ + )) + + $(eval $(call gb_CppunitTest_use_libraries,writerperfect_stream,\ +diff --git a/writerperfect/Library_wpftdraw.mk b/writerperfect/Library_wpftdraw.mk +index 2f730ea..807afc9 100644 +--- a/writerperfect/Library_wpftdraw.mk ++++ b/writerperfect/Library_wpftdraw.mk +@@ -38,10 +38,10 @@ $(eval $(call gb_Library_use_libraries,wpftdraw,\ + + $(eval $(call gb_Library_use_externals,wpftdraw,\ + cdr \ +- etonyek \ + freehand \ + mspub \ + odfgen \ ++ revenge \ + visio \ + wpg \ + wpd \ +diff --git a/writerperfect/Library_wpftimpress.mk b/writerperfect/Library_wpftimpress.mk +index db7218c..39ef718 100644 +--- a/writerperfect/Library_wpftimpress.mk ++++ b/writerperfect/Library_wpftimpress.mk +@@ -41,8 +41,7 @@ $(eval $(call gb_Library_use_externals,wpftimpress,\ + boost_headers \ + etonyek \ + odfgen \ +- wpd \ +- wpg \ ++ revenge \ + zlib \ + libxml2 \ + )) +diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk +index c8a1631..db6afdf 100644 +--- a/writerperfect/Library_wpftwriter.mk ++++ b/writerperfect/Library_wpftwriter.mk +@@ -43,15 +43,15 @@ $(eval $(call gb_Library_use_externals,wpftwriter,\ + abw \ + boost_headers \ + ebook \ +- etonyek \ + icui18n \ + icuuc \ + libxml2 \ + mwaw \ + odfgen \ +- wps \ +- wpg \ ++ revenge \ + wpd \ ++ wpg \ ++ wps \ + zlib \ + )) + +diff --git a/writerperfect/Library_writerperfect.mk b/writerperfect/Library_writerperfect.mk +index bd8d258..3089b5a 100644 +--- a/writerperfect/Library_writerperfect.mk ++++ b/writerperfect/Library_writerperfect.mk +@@ -25,10 +25,8 @@ $(eval $(call gb_Library_add_defs,writerperfect,\ + + $(eval $(call gb_Library_use_externals,writerperfect,\ + boost_headers \ +- etonyek \ + odfgen \ +- wpd \ +- wpg \ ++ revenge \ + )) + + $(eval $(call gb_Library_use_sdk_api,writerperfect)) +diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx +index 1d28ec8..d75f201 100644 +--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx ++++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx +@@ -34,6 +34,11 @@ namespace uno = com::sun::star::uno; + + using boost::shared_ptr; + ++using librevenge::RVNGInputStream; ++using librevenge::RVNG_SEEK_CUR; ++using librevenge::RVNG_SEEK_END; ++using librevenge::RVNG_SEEK_SET; ++ + using std::equal; + + using writerperfect::WPXSvInputStream; +@@ -64,21 +69,21 @@ static const char aText[] = "hello world"; + static const char aOLEFile[] = "/writerperfect/qa/unit/data/fdo40686-1.doc"; + static const char aZipFile[] = "/writerperfect/qa/unit/data/test.odt"; + +-shared_ptr lcl_createStream() ++shared_ptr lcl_createStream() + { + using comphelper::SequenceInputStream; + + const css::uno::Sequence aData(reinterpret_cast(aText), sizeof aText); + const uno::Reference xInputStream(new SequenceInputStream(aData)); + +- shared_ptr pInputStream; ++ shared_ptr pInputStream; + if (xInputStream.is()) + pInputStream.reset(new WPXSvInputStream(xInputStream)); + + return pInputStream; + } + +-const shared_ptr lcl_createStreamForURL(const rtl::OUString &rURL) ++const shared_ptr lcl_createStreamForURL(const rtl::OUString &rURL) + { + using uno::Reference; + using uno::UNO_QUERY_THROW; +@@ -89,13 +94,13 @@ const shared_ptr lcl_createStreamForURL(const rtl::OUString &rUR + UNO_QUERY_THROW); + const Reference xInputStream(xFileAccess->openFileRead(rURL), UNO_QUERY_THROW); + +- const shared_ptr pInput(new WPXSvInputStream(xInputStream)); ++ const shared_ptr pInput(new WPXSvInputStream(xInputStream)); + return pInput; + } + + void WPXSvStreamTest::testRead() + { +- const shared_ptr pInput(lcl_createStream()); ++ const shared_ptr pInput(lcl_createStream()); + const unsigned long nLen = sizeof aText; + + unsigned long nReadBytes = 0; +@@ -107,199 +112,199 @@ void WPXSvStreamTest::testRead() + pData = pInput->read(1UL, nReadBytes); + CPPUNIT_ASSERT_EQUAL(1UL, nReadBytes); + CPPUNIT_ASSERT(equal(pText, pText + nReadBytes, pData)); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + pText += nReadBytes; + + pData = pInput->read(2UL, nReadBytes); + CPPUNIT_ASSERT_EQUAL(2UL, nReadBytes); + CPPUNIT_ASSERT(equal(pText, pText + nReadBytes, pData)); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + pText += nReadBytes; + + pData = pInput->read(3UL, nReadBytes); + CPPUNIT_ASSERT_EQUAL(3UL, nReadBytes); + CPPUNIT_ASSERT(equal(pText, pText + nReadBytes, pData)); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + pText += nReadBytes; + + assert(nLen > 6); + pData = pInput->read(nLen - 6, nReadBytes); + CPPUNIT_ASSERT_EQUAL(nLen - 6, nReadBytes); + CPPUNIT_ASSERT(equal(pText, pText + nReadBytes, pData)); +- CPPUNIT_ASSERT(pInput->atEOS()); ++ CPPUNIT_ASSERT(pInput->isEnd()); + + // reading everything at once +- pInput->seek(0, WPX_SEEK_SET); ++ pInput->seek(0, RVNG_SEEK_SET); + pText = pTextOrig; + + pData = pInput->read(nLen, nReadBytes); + CPPUNIT_ASSERT_EQUAL(nLen, nReadBytes); + CPPUNIT_ASSERT(equal(pText, pText + nReadBytes, pData)); +- CPPUNIT_ASSERT(pInput->atEOS()); ++ CPPUNIT_ASSERT(pInput->isEnd()); + + // trying to read too much +- pInput->seek(0, WPX_SEEK_SET); ++ pInput->seek(0, RVNG_SEEK_SET); + pText = pTextOrig; + + pData = pInput->read(nLen + 1, nReadBytes); + CPPUNIT_ASSERT_EQUAL(nLen, nReadBytes); + CPPUNIT_ASSERT(equal(pText, pText + nReadBytes, pData)); +- CPPUNIT_ASSERT(pInput->atEOS()); ++ CPPUNIT_ASSERT(pInput->isEnd()); + + // trying to read nothing +- pInput->seek(0, WPX_SEEK_SET); ++ pInput->seek(0, RVNG_SEEK_SET); + pText = pTextOrig; + + pData = pInput->read(0UL, nReadBytes); + CPPUNIT_ASSERT_EQUAL(0UL, nReadBytes); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); + CPPUNIT_ASSERT_EQUAL(pData, static_cast(0)); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + } + + void WPXSvStreamTest::testSeekSet() + { +- const shared_ptr pInput(lcl_createStream()); ++ const shared_ptr pInput(lcl_createStream()); + const long nLen = sizeof aText; + + // check initial state + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + + // valid seeks +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, WPX_SEEK_SET)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, RVNG_SEEK_SET)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(1, WPX_SEEK_SET)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(1, RVNG_SEEK_SET)); + CPPUNIT_ASSERT_EQUAL(1L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(nLen, WPX_SEEK_SET)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(nLen, RVNG_SEEK_SET)); + CPPUNIT_ASSERT(nLen == pInput->tell()); +- CPPUNIT_ASSERT(pInput->atEOS()); ++ CPPUNIT_ASSERT(pInput->isEnd()); + + // go back to the beginning +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, WPX_SEEK_SET)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, RVNG_SEEK_SET)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); + + // invalid seeks +- CPPUNIT_ASSERT(0 != pInput->seek(-1, WPX_SEEK_SET)); ++ CPPUNIT_ASSERT(0 != pInput->seek(-1, RVNG_SEEK_SET)); + // Okay, this is not defined. But it is what the WPXSvInputStream + // does ATM and it is reasonable. + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + +- CPPUNIT_ASSERT(0 != pInput->seek(nLen + 1, WPX_SEEK_SET)); ++ CPPUNIT_ASSERT(0 != pInput->seek(nLen + 1, RVNG_SEEK_SET)); + CPPUNIT_ASSERT(nLen == pInput->tell()); +- CPPUNIT_ASSERT(pInput->atEOS()); ++ CPPUNIT_ASSERT(pInput->isEnd()); + } + + void WPXSvStreamTest::testSeekCur() + { +- const shared_ptr pInput(lcl_createStream()); ++ const shared_ptr pInput(lcl_createStream()); + const long nLen = sizeof aText; + + // check initial state +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); + + // valid seeks + +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, WPX_SEEK_CUR)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, RVNG_SEEK_CUR)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(1, WPX_SEEK_CUR)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(1, RVNG_SEEK_CUR)); + CPPUNIT_ASSERT_EQUAL(1L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(-1, WPX_SEEK_CUR)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(-1, RVNG_SEEK_CUR)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + + // go back to the beginning +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, WPX_SEEK_SET)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, RVNG_SEEK_SET)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); + + // invalid seeks +- CPPUNIT_ASSERT(0 != pInput->seek(-1, WPX_SEEK_CUR)); ++ CPPUNIT_ASSERT(0 != pInput->seek(-1, RVNG_SEEK_CUR)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + +- CPPUNIT_ASSERT(0 != pInput->seek(nLen + 1, WPX_SEEK_CUR)); ++ CPPUNIT_ASSERT(0 != pInput->seek(nLen + 1, RVNG_SEEK_CUR)); + CPPUNIT_ASSERT(nLen == pInput->tell()); +- CPPUNIT_ASSERT(pInput->atEOS()); ++ CPPUNIT_ASSERT(pInput->isEnd()); + } + + void WPXSvStreamTest::testSeekEnd() + { +- const shared_ptr pInput(lcl_createStream()); ++ const shared_ptr pInput(lcl_createStream()); + const long nLen = sizeof aText; + + // check initial state +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); + + // valid seeks +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, WPX_SEEK_END)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, RVNG_SEEK_END)); + CPPUNIT_ASSERT(nLen == pInput->tell()); +- CPPUNIT_ASSERT(pInput->atEOS()); ++ CPPUNIT_ASSERT(pInput->isEnd()); + +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(-1, WPX_SEEK_END)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(-1, RVNG_SEEK_END)); + CPPUNIT_ASSERT((nLen - 1) == pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(-nLen, WPX_SEEK_END)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(-nLen, RVNG_SEEK_END)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + + // go back to the beginning +- CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, WPX_SEEK_SET)); ++ CPPUNIT_ASSERT_EQUAL(0, pInput->seek(0, RVNG_SEEK_SET)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); + + // invalid seeks +- CPPUNIT_ASSERT(0 != pInput->seek(1, WPX_SEEK_END)); ++ CPPUNIT_ASSERT(0 != pInput->seek(1, RVNG_SEEK_END)); + CPPUNIT_ASSERT(nLen == pInput->tell()); +- CPPUNIT_ASSERT(pInput->atEOS()); ++ CPPUNIT_ASSERT(pInput->isEnd()); + +- CPPUNIT_ASSERT(0 != pInput->seek(-nLen - 1, WPX_SEEK_END)); ++ CPPUNIT_ASSERT(0 != pInput->seek(-nLen - 1, RVNG_SEEK_END)); + CPPUNIT_ASSERT_EQUAL(0L, pInput->tell()); +- CPPUNIT_ASSERT(!pInput->atEOS()); ++ CPPUNIT_ASSERT(!pInput->isEnd()); + } + + void WPXSvStreamTest::testStructured() + { + // OLE2 + { +- const shared_ptr pInput(lcl_createStreamForURL(getURLFromSrc(aOLEFile))); ++ const shared_ptr pInput(lcl_createStreamForURL(getURLFromSrc(aOLEFile))); + assert(bool(pInput)); + +- CPPUNIT_ASSERT(pInput->isOLEStream()); +- shared_ptr pSubStream(pInput->getDocumentOLEStream("WordDocument")); ++ CPPUNIT_ASSERT(pInput->isStructured()); ++ shared_ptr pSubStream(pInput->getSubStreamByName("WordDocument")); + CPPUNIT_ASSERT(bool(pSubStream)); +- pSubStream.reset(pInput->getDocumentOLEStream("foo")); ++ pSubStream.reset(pInput->getSubStreamByName("foo")); + CPPUNIT_ASSERT(!pSubStream); + } + + // Zip + { +- const shared_ptr pInput(lcl_createStreamForURL(getURLFromSrc(aZipFile))); ++ const shared_ptr pInput(lcl_createStreamForURL(getURLFromSrc(aZipFile))); + assert(bool(pInput)); + +- CPPUNIT_ASSERT(pInput->isOLEStream()); +- shared_ptr pSubStream(pInput->getDocumentOLEStream("content.xml")); ++ CPPUNIT_ASSERT(pInput->isStructured()); ++ shared_ptr pSubStream(pInput->getSubStreamByName("content.xml")); + CPPUNIT_ASSERT(bool(pSubStream)); +- pSubStream.reset(pInput->getDocumentOLEStream("foo")); ++ pSubStream.reset(pInput->getSubStreamByName("foo")); + CPPUNIT_ASSERT(!pSubStream); + } + + // not structured + { +- const shared_ptr pInput(lcl_createStream()); ++ const shared_ptr pInput(lcl_createStream()); + +- CPPUNIT_ASSERT(!pInput->isOLEStream()); +- CPPUNIT_ASSERT(0 == pInput->getDocumentOLEStream("foo")); ++ CPPUNIT_ASSERT(!pInput->isStructured()); ++ CPPUNIT_ASSERT(0 == pInput->getSubStreamByName("foo")); + } + } + +diff --git a/writerperfect/qa/unit/WpftImpressFilterTest.cxx b/writerperfect/qa/unit/WpftImpressFilterTest.cxx +index 2f349fa..4286f8a 100644 +--- a/writerperfect/qa/unit/WpftImpressFilterTest.cxx ++++ b/writerperfect/qa/unit/WpftImpressFilterTest.cxx +@@ -31,7 +31,7 @@ WpftImpressFilterTest::WpftImpressFilterTest() + + void WpftImpressFilterTest::test() + { +- doTest("org.libreoffice.comp.Impress.KeynoteImportFilter", "/writerperfect/qa/unit/data/libetonyek/"); ++ // doTest("org.libreoffice.comp.Impress.KeynoteImportFilter", "/writerperfect/qa/unit/data/libetonyek/"); + } + + CPPUNIT_TEST_SUITE_REGISTRATION(WpftImpressFilterTest); +diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx b/writerperfect/qa/unit/WpftWriterFilterTest.cxx +index 284c5f5..2afc4e7 100644 +--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx ++++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx +@@ -32,9 +32,9 @@ WpftWriterFilterTest::WpftWriterFilterTest() + void WpftWriterFilterTest::test() + { + doTest("com.sun.star.comp.Writer.AbiWordImportFilter", "/writerperfect/qa/unit/data/libabw/"); +- doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/libe-book/"); ++ // doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/libe-book/"); + doTest("com.sun.star.comp.Writer.MSWorksImportFilter", "/writerperfect/qa/unit/data/libwps/"); +- doTest("com.sun.star.comp.Writer.MWAWImportFilter", "/writerperfect/qa/unit/data/libmwaw/"); ++ // doTest("com.sun.star.comp.Writer.MWAWImportFilter", "/writerperfect/qa/unit/data/libmwaw/"); + doTest("com.sun.star.comp.Writer.WordPerfectImportFilter", "/writerperfect/qa/unit/data/libwpd/"); + } + +diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx +index c125694..b720eec 100644 +--- a/writerperfect/source/common/DirectoryStream.cxx ++++ b/writerperfect/source/common/DirectoryStream.cxx +@@ -112,14 +112,32 @@ DirectoryStream::~DirectoryStream() + delete m_pImpl; + } + +-bool DirectoryStream::isOLEStream() ++bool DirectoryStream::isStructured() + { + return true; + } + +-WPXInputStream *DirectoryStream::getDocumentOLEStream(const char *const pName) ++unsigned DirectoryStream::subStreamCount() + { +- WPXInputStream *input = 0; ++ // TODO: implement me ++ return 0; ++} ++ ++const char * DirectoryStream::subStreamName(unsigned /* id */) ++{ ++ // TODO: implement me ++ return 0; ++} ++ ++bool DirectoryStream::existsSubStream(const char * /* name */) ++{ ++ // TODO: implement me ++ return false; ++} ++ ++librevenge::RVNGInputStream *DirectoryStream::getSubStreamByName(const char *const pName) ++{ ++ librevenge::RVNGInputStream *input = 0; + + ucbhelper::Content aContent(m_pImpl->xContent, uno::Reference(), comphelper::getProcessComponentContext()); + const uno::Reference xInputStream(findStream(aContent, rtl::OUString::createFromAscii(pName))); +@@ -129,13 +147,19 @@ WPXInputStream *DirectoryStream::getDocumentOLEStream(const char *const pName) + return input; + } + ++librevenge::RVNGInputStream *DirectoryStream::getSubStreamById(unsigned /* id */) ++{ ++ // TODO: implement me ++ return 0; ++} ++ + const unsigned char *DirectoryStream::read(unsigned long, unsigned long &nNumBytesRead) + { + nNumBytesRead = 0; + return 0; + } + +-int DirectoryStream::seek(long, WPX_SEEK_TYPE) ++int DirectoryStream::seek(long, librevenge::RVNG_SEEK_TYPE) + { + return -1; + } +@@ -145,7 +169,7 @@ long DirectoryStream::tell() + return 0; + } + +-bool DirectoryStream::atEOS() ++bool DirectoryStream::isEnd() + { + return true; + } +diff --git a/writerperfect/source/common/DocumentHandler.cxx b/writerperfect/source/common/DocumentHandler.cxx +index 239f20e..f36bb28 100644 +--- a/writerperfect/source/common/DocumentHandler.cxx ++++ b/writerperfect/source/common/DocumentHandler.cxx +@@ -39,11 +39,11 @@ void DocumentHandler::endDocument() + mxHandler->endDocument(); + } + +-void DocumentHandler::startElement(const char *psName, const WPXPropertyList &xPropList) ++void DocumentHandler::startElement(const char *psName, const librevenge::RVNGPropertyList &xPropList) + { + SvXMLAttributeList *pAttrList = new SvXMLAttributeList(); + Reference < XAttributeList > xAttrList(pAttrList); +- WPXPropertyList::Iter i(xPropList); ++ librevenge::RVNGPropertyList::Iter i(xPropList); + for (i.rewind(); i.next(); ) + { + // filter out libwpd elements +@@ -65,7 +65,7 @@ void DocumentHandler::endElement(const char *psName) + mxHandler->endElement(sElementName); + } + +-void DocumentHandler::characters(const WPXString &sCharacters) ++void DocumentHandler::characters(const librevenge::RVNGString &sCharacters) + { + OUString sCharU16(sCharacters.cstr(), strlen(sCharacters.cstr()), RTL_TEXTENCODING_UTF8); + mxHandler->characters(sCharU16); +diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx +index b2ad2a8..4fad167 100644 +--- a/writerperfect/source/common/WPXSvInputStream.cxx ++++ b/writerperfect/source/common/WPXSvInputStream.cxx +@@ -391,10 +391,10 @@ public : + + bool isStructured(); + unsigned subStreamCount(); +- const char * subStreamName(unsigned id); ++ const char *subStreamName(unsigned id); + bool existsSubStream(const char *name); +- WPXInputStream * getSubStreamByName(const char *name); +- WPXInputStream * getSubStreamById(unsigned id); ++ librevenge::RVNGInputStream *getSubStreamByName(const char *name); ++ librevenge::RVNGInputStream *getSubStreamById(unsigned id); + + const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); + int seek(long offset); +@@ -410,8 +410,8 @@ private: + bool isZip(); + void ensureZipIsInitialized(); + +- WPXInputStream *createWPXStream(const SotStorageStreamRef &rxStorage); +- WPXInputStream *createWPXStream(const Reference &rxStream); ++ librevenge::RVNGInputStream *createWPXStream(const SotStorageStreamRef &rxStorage); ++ librevenge::RVNGInputStream *createWPXStream(const Reference &rxStream); + + private: + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > mxStream; +@@ -627,7 +627,7 @@ bool WPXSvInputStreamImpl::existsSubStream(const char *const name) + return false; + } + +-WPXInputStream *WPXSvInputStreamImpl::getSubStreamByName(const char *const name) ++librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamByName(const char *const name) + { + if (!name) + return 0; +@@ -665,7 +665,7 @@ WPXInputStream *WPXSvInputStreamImpl::getSubStreamByName(const char *const name) + return 0; + } + +-WPXInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsigned id) ++librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsigned id) + { + if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is()) + return 0; +@@ -715,7 +715,7 @@ void WPXSvInputStreamImpl::invalidateReadBuffer() + } + } + +-WPXInputStream *WPXSvInputStreamImpl::createWPXStream(const SotStorageStreamRef &rxStorage) ++librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const SotStorageStreamRef &rxStorage) + { + if (rxStorage.Is()) + { +@@ -725,7 +725,7 @@ WPXInputStream *WPXSvInputStreamImpl::createWPXStream(const SotStorageStreamRef + return 0; + } + +-WPXInputStream *WPXSvInputStreamImpl::createWPXStream(const Reference &rxStream) ++librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const Reference &rxStream) + { + if (rxStream.is()) + return new WPXSvInputStream( rxStream ); +@@ -867,12 +867,12 @@ long WPXSvInputStream::tell() + return retVal - (long)mpImpl->mnReadBufferLength + (long)mpImpl->mnReadBufferPos; + } + +-int WPXSvInputStream::seek(long offset, WPX_SEEK_TYPE seekType) ++int WPXSvInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) + { + sal_Int64 tmpOffset = offset; +- if (seekType == WPX_SEEK_CUR) ++ if (seekType == librevenge::RVNG_SEEK_CUR) + tmpOffset += tell(); +- if (seekType == WPX_SEEK_END) ++ if (seekType == librevenge::RVNG_SEEK_END) + tmpOffset += mpImpl->mnLength; + + int retVal = 0; +@@ -929,33 +929,18 @@ bool WPXSvInputStream::existsSubStream(const char *const name) + return mpImpl->existsSubStream(name); + } + +-WPXInputStream *WPXSvInputStream::getSubStreamByName(const char *name) ++librevenge::RVNGInputStream *WPXSvInputStream::getSubStreamByName(const char *name) + { + mpImpl->invalidateReadBuffer(); + return mpImpl->getSubStreamByName(name); + } + +-WPXInputStream *WPXSvInputStream::getSubStreamById(const unsigned id) ++librevenge::RVNGInputStream *WPXSvInputStream::getSubStreamById(const unsigned id) + { + mpImpl->invalidateReadBuffer(); + return mpImpl->getSubStreamById(id); + } + +-bool WPXSvInputStream::atEOS() +-{ +- return isEnd(); +-} +- +-bool WPXSvInputStream::isOLEStream() +-{ +- return isStructured(); +-} +- +-WPXInputStream *WPXSvInputStream::getDocumentOLEStream(const char *name) +-{ +- return getSubStreamByName(name); +-} +- + } + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/writerperfect/source/draw/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx +index 4cc5688..e0c1bd8 100644 +--- a/writerperfect/source/draw/CDRImportFilter.cxx ++++ b/writerperfect/source/draw/CDRImportFilter.cxx +@@ -27,12 +27,12 @@ using com::sun::star::uno::Sequence; + using com::sun::star::uno::XComponentContext; + using com::sun::star::uno::XInterface; + +-bool CDRImportFilter::doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) ++bool CDRImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) + { + return libcdr::CDRDocument::parse(&rInput, &rGenerator); + } + +-bool CDRImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool CDRImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + if (libcdr::CDRDocument::isSupported(&rInput)) + { +diff --git a/writerperfect/source/draw/CDRImportFilter.hxx b/writerperfect/source/draw/CDRImportFilter.hxx +index cf8a254..3df8ccc 100644 +--- a/writerperfect/source/draw/CDRImportFilter.hxx ++++ b/writerperfect/source/draw/CDRImportFilter.hxx +@@ -33,8 +33,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString CDRImportFilter_getImplementationName() +diff --git a/writerperfect/source/draw/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx +index 78f39de..f9044f8 100644 +--- a/writerperfect/source/draw/CMXImportFilter.cxx ++++ b/writerperfect/source/draw/CMXImportFilter.cxx +@@ -27,12 +27,12 @@ using com::sun::star::uno::Sequence; + using com::sun::star::uno::XComponentContext; + using com::sun::star::uno::XInterface; + +-bool CMXImportFilter::doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) ++bool CMXImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) + { + return libcdr::CMXDocument::parse(&rInput, &rGenerator); + } + +-bool CMXImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool CMXImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + if (libcdr::CMXDocument::isSupported(&rInput)) + { +diff --git a/writerperfect/source/draw/CMXImportFilter.hxx b/writerperfect/source/draw/CMXImportFilter.hxx +index 4bc37eb..43ffe96 100644 +--- a/writerperfect/source/draw/CMXImportFilter.hxx ++++ b/writerperfect/source/draw/CMXImportFilter.hxx +@@ -33,8 +33,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString CMXImportFilter_getImplementationName() +diff --git a/writerperfect/source/draw/FreehandImportFilter.cxx b/writerperfect/source/draw/FreehandImportFilter.cxx +index b92386f..db37858 100644 +--- a/writerperfect/source/draw/FreehandImportFilter.cxx ++++ b/writerperfect/source/draw/FreehandImportFilter.cxx +@@ -23,12 +23,12 @@ using com::sun::star::uno::Sequence; + using com::sun::star::uno::XComponentContext; + using com::sun::star::uno::XInterface; + +-bool FreehandImportFilter::doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) ++bool FreehandImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) + { + return libfreehand::FreeHandDocument::parse(&rInput, &rGenerator); + } + +-bool FreehandImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool FreehandImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + if (libfreehand::FreeHandDocument::isSupported(&rInput)) + { +diff --git a/writerperfect/source/draw/FreehandImportFilter.hxx b/writerperfect/source/draw/FreehandImportFilter.hxx +index bb3a3c6..0f9e284 100644 +--- a/writerperfect/source/draw/FreehandImportFilter.hxx ++++ b/writerperfect/source/draw/FreehandImportFilter.hxx +@@ -30,8 +30,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString FreehandImportFilter_getImplementationName() +diff --git a/writerperfect/source/draw/ImportFilterBase.cxx b/writerperfect/source/draw/ImportFilterBase.cxx +index ce98231..6fc09b2 100644 +--- a/writerperfect/source/draw/ImportFilterBase.cxx ++++ b/writerperfect/source/draw/ImportFilterBase.cxx +@@ -92,7 +92,8 @@ throw (RuntimeException, std::exception) + + WPXSvInputStream input( xInputStream ); + +- OdgGenerator exporter(&xHandler, ODF_FLAT_XML); ++ OdgGenerator exporter; ++ exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML); + + return doImportDocument(input, exporter); + } +diff --git a/writerperfect/source/draw/ImportFilterBase.hxx b/writerperfect/source/draw/ImportFilterBase.hxx +index 0efdc64..56a1808 100644 +--- a/writerperfect/source/draw/ImportFilterBase.hxx ++++ b/writerperfect/source/draw/ImportFilterBase.hxx +@@ -8,9 +8,9 @@ + #ifndef INCLUDED_WRITERPERFECT_SOURCE_DRAW_IMPORTFILTERBASE_HXX + #define INCLUDED_WRITERPERFECT_SOURCE_DRAW_IMPORTFILTERBASE_HXX + +-#include ++#include + +-#include ++#include + + #include + #include +@@ -78,8 +78,8 @@ public: + throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) = 0; +- virtual bool doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) = 0; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) = 0; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) = 0; + + private: + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext; +diff --git a/writerperfect/source/draw/MSPUBImportFilter.cxx b/writerperfect/source/draw/MSPUBImportFilter.cxx +index 08f275d..99d5941 100644 +--- a/writerperfect/source/draw/MSPUBImportFilter.cxx ++++ b/writerperfect/source/draw/MSPUBImportFilter.cxx +@@ -25,12 +25,12 @@ using com::sun::star::uno::Sequence; + using com::sun::star::uno::XComponentContext; + using com::sun::star::uno::XInterface; + +-bool MSPUBImportFilter::doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) ++bool MSPUBImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) + { + return libmspub::MSPUBDocument::parse(&rInput, &rGenerator); + } + +-bool MSPUBImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool MSPUBImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + if (libmspub::MSPUBDocument::isSupported(&rInput)) + { +diff --git a/writerperfect/source/draw/MSPUBImportFilter.hxx b/writerperfect/source/draw/MSPUBImportFilter.hxx +index 3ac4e5a..b615af8 100644 +--- a/writerperfect/source/draw/MSPUBImportFilter.hxx ++++ b/writerperfect/source/draw/MSPUBImportFilter.hxx +@@ -30,8 +30,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString MSPUBImportFilter_getImplementationName() +diff --git a/writerperfect/source/draw/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx +index 311068b..969697b 100644 +--- a/writerperfect/source/draw/VisioImportFilter.cxx ++++ b/writerperfect/source/draw/VisioImportFilter.cxx +@@ -23,12 +23,12 @@ using com::sun::star::uno::Sequence; + using com::sun::star::uno::XComponentContext; + using com::sun::star::uno::XInterface; + +-bool VisioImportFilter::doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) ++bool VisioImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) + { + return libvisio::VisioDocument::parse(&rInput, &rGenerator); + } + +-bool VisioImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool VisioImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + if (libvisio::VisioDocument::isSupported(&rInput)) + { +diff --git a/writerperfect/source/draw/VisioImportFilter.hxx b/writerperfect/source/draw/VisioImportFilter.hxx +index fab0e63..2b23462 100644 +--- a/writerperfect/source/draw/VisioImportFilter.hxx ++++ b/writerperfect/source/draw/VisioImportFilter.hxx +@@ -30,8 +30,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString VisioImportFilter_getImplementationName() +diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx +index 4341af2..6c0eac0 100644 +--- a/writerperfect/source/draw/WPGImportFilter.cxx ++++ b/writerperfect/source/draw/WPGImportFilter.cxx +@@ -19,6 +19,8 @@ + + #include + ++#include ++ + #include "WPGImportFilter.hxx" + + using com::sun::star::uno::Reference; +@@ -28,12 +30,12 @@ using com::sun::star::uno::Sequence; + using com::sun::star::uno::XComponentContext; + using com::sun::star::uno::XInterface; + +-bool WPGImportFilter::doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) ++bool WPGImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) + { + return libwpg::WPGraphics::parse(&rInput, &rGenerator); + } + +-bool WPGImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool WPGImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + if (libwpg::WPGraphics::isSupported(&rInput)) + { +diff --git a/writerperfect/source/draw/WPGImportFilter.hxx b/writerperfect/source/draw/WPGImportFilter.hxx +index 5105dad..98cc3aa 100644 +--- a/writerperfect/source/draw/WPGImportFilter.hxx ++++ b/writerperfect/source/draw/WPGImportFilter.hxx +@@ -35,8 +35,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, libwpg::WPGPaintInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString WPGImportFilter_getImplementationName() +diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx +index 9f8b57e..236e5d9 100644 +--- a/writerperfect/source/impress/KeynoteImportFilter.cxx ++++ b/writerperfect/source/impress/KeynoteImportFilter.cxx +@@ -144,14 +144,15 @@ throw (RuntimeException, std::exception) + // writes to in-memory target doc + DocumentHandler xHandler(xInternalHandler); + +- shared_ptr< WPXInputStream > input; ++ shared_ptr< librevenge::RVNGInputStream > input; + if ( bIsPackage ) + input.reset( new writerperfect::DirectoryStream( xContent ) ); + else + input.reset( new WPXSvInputStream( xInputStream ) ); + +- OdpGenerator exporter(&xHandler, ODF_FLAT_XML); +- bool tmpParseResult = libetonyek::KEYDocument::parse(input.get(), &exporter); ++ OdpGenerator exporter; ++ exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML); ++ bool tmpParseResult = libetonyek::EtonyekDocument::parse(input.get(), &exporter); + return tmpParseResult; + } + +@@ -216,7 +217,7 @@ throw( com::sun::star::uno::RuntimeException, std::exception ) + if (!xInputStream.is()) + return OUString(); + +- shared_ptr< WPXInputStream > input( new WPXSvInputStream( xInputStream ) ); ++ shared_ptr< librevenge::RVNGInputStream > input( new WPXSvInputStream( xInputStream ) ); + + /* Apple Keynote documents come in two variants: + * * actual files (zip), only produced by Keynote 5 (at least with +@@ -247,11 +248,12 @@ throw( com::sun::star::uno::RuntimeException, std::exception ) + return OUString(); + } + +- libetonyek::KEYDocumentType type = libetonyek::KEY_DOCUMENT_TYPE_UNKNOWN; +- if ( !libetonyek::KEYDocument::isSupported( input.get(), &type ) ) ++ libetonyek::EtonyekDocument::Type type = libetonyek::EtonyekDocument::TYPE_UNKNOWN; ++ const libetonyek::EtonyekDocument::Confidence confidence = libetonyek::EtonyekDocument::isSupported( input.get(), &type ); ++ if ((libetonyek::EtonyekDocument::CONFIDENCE_NONE == confidence) || (libetonyek::EtonyekDocument::TYPE_KEYNOTE != type)) + return OUString(); + +- if ( type == libetonyek::KEY_DOCUMENT_TYPE_APXL_FILE ) ++ if ( confidence == libetonyek::EtonyekDocument::CONFIDENCE_SUPPORTED_PART ) + { + assert( !bIsPackage ); + +@@ -262,7 +264,7 @@ throw( com::sun::star::uno::RuntimeException, std::exception ) + if ( xPackageContent.is() ) + { + input.reset( new writerperfect::DirectoryStream( xPackageContent ) ); +- if ( libetonyek::KEYDocument::isSupported( input.get() ) ) ++ if ( libetonyek::EtonyekDocument::CONFIDENCE_EXCELLENT == libetonyek::EtonyekDocument::isSupported( input.get() ) ) + { + xContent = xPackageContent; + bUCBContentChanged = true; +diff --git a/writerperfect/source/writer/AbiWordImportFilter.cxx b/writerperfect/source/writer/AbiWordImportFilter.cxx +index 034f248..b8aa524 100644 +--- a/writerperfect/source/writer/AbiWordImportFilter.cxx ++++ b/writerperfect/source/writer/AbiWordImportFilter.cxx +@@ -24,12 +24,12 @@ using com::sun::star::uno::RuntimeException; + using com::sun::star::uno::XComponentContext; + using com::sun::star::uno::XInterface; + +-bool AbiWordImportFilter::doImportDocument( WPXInputStream &rInput, const rtl::OUString &, WPXDocumentInterface &rGenerator ) ++bool AbiWordImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator ) + { + return libabw::AbiDocument::parse(&rInput, &rGenerator); + } + +-bool AbiWordImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool AbiWordImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + if (libabw::AbiDocument::isFileFormatSupported(&rInput)) + { +diff --git a/writerperfect/source/writer/AbiWordImportFilter.hxx b/writerperfect/source/writer/AbiWordImportFilter.hxx +index c1a75d5..6d81423 100644 +--- a/writerperfect/source/writer/AbiWordImportFilter.hxx ++++ b/writerperfect/source/writer/AbiWordImportFilter.hxx +@@ -33,8 +33,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, const rtl::OUString &rFilterName, WPXDocumentInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString AbiWordImportFilter_getImplementationName() +diff --git a/writerperfect/source/writer/EBookImportFilter.cxx b/writerperfect/source/writer/EBookImportFilter.cxx +index 6c14347..3003768 100644 +--- a/writerperfect/source/writer/EBookImportFilter.cxx ++++ b/writerperfect/source/writer/EBookImportFilter.cxx +@@ -24,40 +24,58 @@ using com::sun::star::uno::Exception; + using com::sun::star::uno::RuntimeException; + using com::sun::star::uno::XComponentContext; + +-bool EBookImportFilter::doImportDocument( WPXInputStream &rInput, const rtl::OUString &rFilterName, WPXDocumentInterface &rGenerator ) ++using libebook::EBOOKDocument; ++ ++bool EBookImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) + { + if (rFilterName == "FictionBook 2") +- return libebook::FB2Document::parse(&rInput, &rGenerator); ++ return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_FICTIONBOOK2); + else if (rFilterName == "PalmDoc") +- return libebook::PDBDocument::parse(&rInput, &rGenerator); ++ return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PALMDOC); + else if (rFilterName == "Plucker eBook") +- return libebook::PLKRDocument::parse(&rInput, &rGenerator); ++ return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PLUCKER); + else if (rFilterName == "eReader eBook") +- return libebook::PMLDocument::parse(&rInput, &rGenerator); ++ return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PEANUTPRESS); + else if (rFilterName == "TealDoc") +- return libebook::TDDocument::parse(&rInput, &rGenerator); ++ return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_TEALDOC); + else if (rFilterName == "zTXT") +- return libebook::ZTXTDocument::parse(&rInput, &rGenerator); ++ return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_ZTXT); + + return false; + } + +-bool EBookImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool EBookImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + rTypeName = ""; + +- if (libebook::FB2Document::isSupported(&rInput)) +- rTypeName = "writer_FictionBook_2"; +- else if (libebook::PDBDocument::isSupported(&rInput)) +- rTypeName = "writer_PalmDoc"; +- else if (libebook::PLKRDocument::isSupported(&rInput)) +- rTypeName = "writer_Plucker_eBook"; +- else if (libebook::PMLDocument::isSupported(&rInput)) +- rTypeName = "writer_eReader_eBook"; +- else if (libebook::TDDocument::isSupported(&rInput)) +- rTypeName = "writer_TealDoc"; +- else if (libebook::ZTXTDocument::isSupported(&rInput)) +- rTypeName = "writer_zTXT"; ++ EBOOKDocument::Type type = EBOOKDocument::TYPE_UNKNOWN; ++ ++ if (EBOOKDocument::CONFIDENCE_EXCELLENT == EBOOKDocument::isSupported(&rInput, &type)) ++ { ++ switch (type) ++ { ++ case EBOOKDocument::TYPE_FICTIONBOOK2 : ++ rTypeName = "writer_FictionBook_2"; ++ break; ++ case EBOOKDocument::TYPE_PALMDOC : ++ rTypeName = "writer_PalmDoc"; ++ break; ++ case EBOOKDocument::TYPE_PLUCKER : ++ rTypeName = "writer_Plucker_eBook"; ++ break; ++ case EBOOKDocument::TYPE_PEANUTPRESS : ++ rTypeName = "writer_eReader_eBook"; ++ break; ++ case EBOOKDocument::TYPE_TEALDOC : ++ rTypeName = "writer_TealDoc"; ++ break; ++ case EBOOKDocument::TYPE_ZTXT : ++ rTypeName = "writer_zTXT"; ++ break; ++ default : ++ SAL_WARN_IF(type != EBOOKDocument::TYPE_UNKNOWN, "writerperfect", "EBookImportFilter::doDetectFormat: document type " << type << " detected, but ignored"); ++ } ++ } + + return !rTypeName.isEmpty(); + } +diff --git a/writerperfect/source/writer/EBookImportFilter.hxx b/writerperfect/source/writer/EBookImportFilter.hxx +index 693ce31..0365fd7 100644 +--- a/writerperfect/source/writer/EBookImportFilter.hxx ++++ b/writerperfect/source/writer/EBookImportFilter.hxx +@@ -33,8 +33,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, const rtl::OUString &rFilterName, WPXDocumentInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString EBookImportFilter_getImplementationName() +diff --git a/writerperfect/source/writer/ImportFilterBase.cxx b/writerperfect/source/writer/ImportFilterBase.cxx +index 59bc8ef..9f1ecc5 100644 +--- a/writerperfect/source/writer/ImportFilterBase.cxx ++++ b/writerperfect/source/writer/ImportFilterBase.cxx +@@ -93,7 +93,8 @@ throw (RuntimeException, std::exception) + + WPXSvInputStream input( xInputStream ); + +- OdtGenerator exporter(&xHandler, ODF_FLAT_XML); ++ OdtGenerator exporter; ++ exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML); + + doRegisterHandlers(exporter); + +diff --git a/writerperfect/source/writer/ImportFilterBase.hxx b/writerperfect/source/writer/ImportFilterBase.hxx +index 90dc4e2..b54af43 100644 +--- a/writerperfect/source/writer/ImportFilterBase.hxx ++++ b/writerperfect/source/writer/ImportFilterBase.hxx +@@ -10,8 +10,8 @@ + + #include + +-#include +-#include ++#include ++#include + + #include + #include +@@ -79,8 +79,8 @@ public: + throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) = 0; +- virtual bool doImportDocument( WPXInputStream &rInput, const rtl::OUString &rFilterName, WPXDocumentInterface &rGenerator ) = 0; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) = 0; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) = 0; + virtual void doRegisterHandlers( OdtGenerator &rGenerator ); + + private: +diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx +index 7aef8e9..7567294 100644 +--- a/writerperfect/source/writer/MSWorksImportFilter.cxx ++++ b/writerperfect/source/writer/MSWorksImportFilter.cxx +@@ -24,16 +24,17 @@ using com::sun::star::uno::Exception; + using com::sun::star::uno::RuntimeException; + using com::sun::star::uno::XComponentContext; + +-bool MSWorksImportFilter::doImportDocument( WPXInputStream &rInput, const rtl::OUString &, WPXDocumentInterface &rGenerator ) ++bool MSWorksImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator ) + { +- return WPS_OK == WPSDocument::parse(&rInput, &rGenerator); ++ return libwps::WPS_OK == libwps::WPSDocument::parse(&rInput, &rGenerator); + } + +-bool MSWorksImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool MSWorksImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { +- const WPSConfidence confidence = WPSDocument::isFileFormatSupported(&rInput); ++ libwps::WPSKind kind = libwps::WPS_TEXT; ++ const libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&rInput, kind); + +- if ((confidence == WPS_CONFIDENCE_EXCELLENT) || (confidence == WPS_CONFIDENCE_GOOD)) ++ if ((kind == libwps::WPS_TEXT) && (confidence == libwps::WPS_CONFIDENCE_EXCELLENT)) + { + rTypeName = "writer_MS_Works_Document"; + return true; +diff --git a/writerperfect/source/writer/MSWorksImportFilter.hxx b/writerperfect/source/writer/MSWorksImportFilter.hxx +index 924e2c20..b5ddfe4 100644 +--- a/writerperfect/source/writer/MSWorksImportFilter.hxx ++++ b/writerperfect/source/writer/MSWorksImportFilter.hxx +@@ -33,8 +33,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, const rtl::OUString &rFilterName, WPXDocumentInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE; + }; + + OUString MSWorksImportFilter_getImplementationName() +diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx +index 97f414a..ad656c9 100644 +--- a/writerperfect/source/writer/MWAWImportFilter.cxx ++++ b/writerperfect/source/writer/MWAWImportFilter.cxx +@@ -24,18 +24,19 @@ using com::sun::star::uno::Exception; + using com::sun::star::uno::RuntimeException; + using com::sun::star::uno::XComponentContext; + +-static bool handleEmbeddedMWAWObject(const WPXBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType) ++static bool handleEmbeddedMWAWObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType) + { +- OdgGenerator exporter(pHandler, streamType); ++ OdgGenerator exporter; ++ exporter.addDocumentHandler(pHandler, streamType); + return MWAWDocument::decodeGraphic(data, &exporter); + } + +-bool MWAWImportFilter::doImportDocument( WPXInputStream &rInput, const rtl::OUString &, WPXDocumentInterface &rGenerator ) ++bool MWAWImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator ) + { + return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator); + } + +-bool MWAWImportFilter::doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) ++bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) + { + rTypeName = ""; + +diff --git a/writerperfect/source/writer/MWAWImportFilter.hxx b/writerperfect/source/writer/MWAWImportFilter.hxx +index 4efe185..62883f9 100644 +--- a/writerperfect/source/writer/MWAWImportFilter.hxx ++++ b/writerperfect/source/writer/MWAWImportFilter.hxx +@@ -33,8 +33,8 @@ public: + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + private: +- virtual bool doDetectFormat( WPXInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; +- virtual bool doImportDocument( WPXInputStream &rInput, const rtl::OUString &rFilterName, WPXDocumentInterface &rGenerator ) SAL_OVERRIDE; ++ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE; ++ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE; + virtual void doRegisterHandlers( OdtGenerator &rGenerator ) SAL_OVERRIDE; + }; + +diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx +index e70eef6..c741782 100644 +--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx ++++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx +@@ -28,8 +28,9 @@ + #include + #include + +-#include + #include ++#include ++#include + + #include "WordPerfectImportFilter.hxx" + +@@ -57,31 +58,36 @@ using com::sun::star::xml::sax::XParser; + using writerperfect::DocumentHandler; + using writerperfect::WPXSvInputStream; + +-static bool handleEmbeddedWPGObject(const WPXBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType) ++static bool handleEmbeddedWPGObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType) + { +- OdgGenerator exporter(pHandler, streamType); ++ OdgGenerator exporter; ++ exporter.addDocumentHandler(pHandler, streamType); + + libwpg::WPGFileFormat fileFormat = libwpg::WPG_AUTODETECT; + +- if (!libwpg::WPGraphics::isSupported(const_cast(data.getDataStream()))) ++ if (!libwpg::WPGraphics::isSupported(const_cast(data.getDataStream()))) + fileFormat = libwpg::WPG_WPG1; + +- return libwpg::WPGraphics::parse(const_cast(data.getDataStream()), &exporter, fileFormat); ++ return libwpg::WPGraphics::parse(const_cast(data.getDataStream()), &exporter, fileFormat); + } + +-static bool handleEmbeddedWPGImage(const WPXBinaryData &input, WPXBinaryData &output) ++static bool handleEmbeddedWPGImage(const librevenge::RVNGBinaryData &input, librevenge::RVNGBinaryData &output) + { +- WPXString svgOutput; + libwpg::WPGFileFormat fileFormat = libwpg::WPG_AUTODETECT; + +- if (!libwpg::WPGraphics::isSupported(const_cast(input.getDataStream()))) ++ if (!libwpg::WPGraphics::isSupported(const_cast(input.getDataStream()))) + fileFormat = libwpg::WPG_WPG1; + +- if (!libwpg::WPGraphics::generateSVG(const_cast(input.getDataStream()), svgOutput, fileFormat)) ++ librevenge::RVNGStringVector svgOutput; ++ librevenge::RVNGSVGDrawingGenerator aSVGGenerator(svgOutput, ""); ++ ++ if (!libwpg::WPGraphics::parse(const_cast(input.getDataStream()), &aSVGGenerator, fileFormat)) + return false; + ++ assert(1 == svgOutput.size()); ++ + output.clear(); +- output.append((unsigned char *)svgOutput.cstr(), strlen(svgOutput.cstr())); ++ output.append(reinterpret_cast(svgOutput[0].cstr()), svgOutput[0].size()); + return true; + } + +@@ -106,9 +112,9 @@ bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::s + + OString aUtf8Passwd; + +- WPDConfidence confidence = WPDocument::isFileFormatSupported(&input); ++ libwpd::WPDConfidence confidence = libwpd::WPDocument::isFileFormatSupported(&input); + +- if (WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence) ++ if (libwpd::WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence) + { + int unsuccessfulAttempts = 0; + while (true ) +@@ -119,7 +125,7 @@ bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::s + return false; + OUString aPasswd = aPasswdDlg.GetPassword(); + aUtf8Passwd = OUStringToOString(aPasswd, RTL_TEXTENCODING_UTF8); +- if (WPD_PASSWORD_MATCH_OK == WPDocument::verifyPassword(&input, aUtf8Passwd.getStr())) ++ if (libwpd::WPD_PASSWORD_MATCH_OK == libwpd::WPDocument::verifyPassword(&input, aUtf8Passwd.getStr())) + break; + else + unsuccessfulAttempts++; +@@ -142,10 +148,11 @@ bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::s + // writes to in-memory target doc + DocumentHandler xHandler(xInternalHandler); + +- OdtGenerator collector(&xHandler, ODF_FLAT_XML); ++ OdtGenerator collector; ++ collector.addDocumentHandler(&xHandler, ODF_FLAT_XML); + collector.registerEmbeddedObjectHandler("image/x-wpg", &handleEmbeddedWPGObject); + collector.registerEmbeddedImageHandler("image/x-wpg", &handleEmbeddedWPGImage); +- if (WPD_OK == WPDocument::parse(&input, &collector, aUtf8Passwd.isEmpty() ? 0 : aUtf8Passwd.getStr())) ++ if (libwpd::WPD_OK == libwpd::WPDocument::parse(&input, &collector, aUtf8Passwd.isEmpty() ? 0 : aUtf8Passwd.getStr())) + return true; + return false; + } +@@ -171,7 +178,7 @@ throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std:: + OUString SAL_CALL WordPerfectImportFilter::detect( Sequence< PropertyValue >& Descriptor ) + throw( RuntimeException, std::exception ) + { +- WPDConfidence confidence = WPD_CONFIDENCE_NONE; ++ libwpd::WPDConfidence confidence = libwpd::WPD_CONFIDENCE_NONE; + OUString sTypeName; + sal_Int32 nLength = Descriptor.getLength(); + sal_Int32 location = nLength; +@@ -190,9 +197,9 @@ throw( RuntimeException, std::exception ) + + WPXSvInputStream input( xInputStream ); + +- confidence = WPDocument::isFileFormatSupported(&input); ++ confidence = libwpd::WPDocument::isFileFormatSupported(&input); + +- if (confidence == WPD_CONFIDENCE_EXCELLENT || confidence == WPD_CONFIDENCE_SUPPORTED_ENCRYPTION) ++ if (confidence == libwpd::WPD_CONFIDENCE_EXCELLENT || confidence == libwpd::WPD_CONFIDENCE_SUPPORTED_ENCRYPTION) + sTypeName = "writer_WordPerfect_Document"; + + if (!sTypeName.isEmpty()) +@@ -289,9 +296,9 @@ throw (RuntimeException, std::exception) + + OString aUtf8Passwd; + +- WPDConfidence confidence = WPDocument::isFileFormatSupported(&input); ++ libwpd::WPDConfidence confidence = libwpd::WPDocument::isFileFormatSupported(&input); + +- if (WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence) ++ if (libwpd::WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence) + { + int unsuccessfulAttempts = 0; + while (true ) +@@ -302,7 +309,7 @@ throw (RuntimeException, std::exception) + return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL; + msPassword = aPasswdDlg.GetPassword().getStr(); + aUtf8Passwd = OUStringToOString(msPassword, RTL_TEXTENCODING_UTF8); +- if (WPD_PASSWORD_MATCH_OK == WPDocument::verifyPassword(&input, aUtf8Passwd.getStr())) ++ if (libwpd::WPD_PASSWORD_MATCH_OK == libwpd::WPDocument::verifyPassword(&input, aUtf8Passwd.getStr())) + break; + else + unsuccessfulAttempts++; +-- +1.9.3 + diff --git a/0007-libwpd-stream-does-not-exist-anymore.patch b/0007-libwpd-stream-does-not-exist-anymore.patch new file mode 100644 index 0000000..df8b3f4 --- /dev/null +++ b/0007-libwpd-stream-does-not-exist-anymore.patch @@ -0,0 +1,26 @@ +From 5a1b5883e57a61e487d306d8e7c379940d7667d3 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 26 May 2014 20:08:43 +0200 +Subject: [PATCH 7/9] libwpd-stream does not exist anymore + +Change-Id: Iaec196373d913f47c2b4575fcefcd41fa97fc808 +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a4741fb..80d7410 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7726,7 +7726,7 @@ AC_SUBST(ENABLE_CMIS) + dnl =================================================================== + dnl Check for system libwpd + dnl =================================================================== +-libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.10 libwpd-stream-0.10],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.10"]) ++libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.10],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.10"]) + + dnl =================================================================== + dnl Check for system lcms2 +-- +1.9.3 + diff --git a/0008-export-SYSTEM_REVENGE.patch b/0008-export-SYSTEM_REVENGE.patch new file mode 100644 index 0000000..384b420 --- /dev/null +++ b/0008-export-SYSTEM_REVENGE.patch @@ -0,0 +1,25 @@ +From efc4f596de77b8e723883348f13ff22efdba61aa Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 26 May 2014 20:46:21 +0200 +Subject: [PATCH 8/9] export SYSTEM_REVENGE + +Change-Id: I2aeb928dbd27df0f77ea0fe136dd38305ad3a004 +--- + config_host.mk.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/config_host.mk.in b/config_host.mk.in +index 27615e9..82b2028 100644 +--- a/config_host.mk.in ++++ b/config_host.mk.in +@@ -553,6 +553,7 @@ export SYSTEM_POPPLER=@SYSTEM_POPPLER@ + export SYSTEM_POSTGRESQL=@SYSTEM_POSTGRESQL@ + export SYSTEM_PYTHON=@SYSTEM_PYTHON@ + export SYSTEM_REDLAND=@SYSTEM_REDLAND@ ++export SYSTEM_REVENGE=@SYSTEM_REVENGE@ + export SYSTEM_RHINO=@SYSTEM_RHINO@ + export SYSTEM_SERF=@SYSTEM_SERF@ + export SYSTEM_UCPP=@SYSTEM_UCPP@ +-- +1.9.3 + diff --git a/0009-drop-trailing-comma.patch b/0009-drop-trailing-comma.patch new file mode 100644 index 0000000..4769c93 --- /dev/null +++ b/0009-drop-trailing-comma.patch @@ -0,0 +1,26 @@ +From 4daaa1f5f9c01cdadb9dbde8a646118426d9c5b2 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 26 May 2014 21:45:39 +0200 +Subject: [PATCH 9/9] drop trailing comma + +Change-Id: Iaed722dc183158e1a73a6cafd91248aa76527ff3 +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 80d7410..e507cb5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7669,7 +7669,7 @@ AS_IF([test "$COM" = "MSC"], + [librevenge_libdir="${WORKDIR}/LinkTarget/Library"], + [librevenge_libdir="${WORKDIR}/UnpackedTarball/librevenge/src/lib/.libs"] + ) +-libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0],["-I${WORKDIR}/UnpackedTarball/librevenge/inc"],["-L${librevenge_libdir} -lrevenge-0.0"]), ++libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0],["-I${WORKDIR}/UnpackedTarball/librevenge/inc"],["-L${librevenge_libdir} -lrevenge-0.0"]) + + dnl =================================================================== + dnl Check for system libe-book +-- +1.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 4621727..b5d6174 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -37,7 +37,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.0 -Release: 5%{?libo_prerelease}%{?dist} +Release: 6%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 Group: Applications/Productivity URL: http://www.libreoffice.org/ @@ -71,31 +71,32 @@ Source16: %{external_url}/32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16. Source17: %{external_url}/4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz Source18: %{external_url}/b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz Source19: %{external_url}/ae330b9493bd4503ac390106ff6060d7-libexttextcat-3.4.3.tar.bz2 -Source20: %{external_url}/libcdr-0.0.15.tar.bz2 -Source21: %{external_url}/b85436266b2ac91d351ab5684b181151-libwpg-0.2.2.tar.bz2 -Source22: %{external_url}/a3dcac551fae5ebbec16e844810828c4-libwpd-0.9.9.tar.bz2 -Source23: %{external_url}/46eb0e7f213ad61bd5dee0c494132cb0-libwps-0.2.9.tar.bz2 -Source24: %{external_url}/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz -Source25: %{external_url}/libvisio-0.0.31.tar.bz2 -Source26: %{external_url}/lcms2-2.6.tar.gz -Source27: %{external_url}/libmspub-0.0.6.tar.bz2 -Source28: %{external_url}/36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2 -Source29: %{external_url}/d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2 -Source30: %{external_url}/harfbuzz-0.9.23.tar.bz2 -%global bundling_options %{?bundling_options} --without-system-mythes --without-system-redland --without-system-libexttextcat --without-system-libcdr --without-system-libwpg --without-system-libwpd --without-system-libwps --without-system-clucene --without-system-libvisio --without-system-lcms2 --without-system-libmspub --without-system-liblangtag --without-system-boost --without-system-harfbuzz -%endif +Source20: %{external_url}/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz +Source21: %{external_url}/lcms2-2.6.tar.gz +Source22: %{external_url}/36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2 +Source23: %{external_url}/d6eef4b4cacb2183f2bf265a5a03a354-boost_1_55_0.tar.bz2 +Source24: %{external_url}/harfbuzz-0.9.23.tar.bz2 +%global bundling_options %{?bundling_options} --without-system-mythes --without-system-redland --without-system-libexttextcat --without-system-clucene --without-system-lcms2 --without-system-liblangtag --without-system-boost --without-system-harfbuzz +%endif +Source25: %{external_url}/libcdr-0.1.0.tar.bz2 +Source26: %{external_url}/libwpg-0.3.0.tar.bz2 +Source27: %{external_url}/libwpd-0.10.0.tar.bz2 +Source28: %{external_url}/libwps-0.3.0.tar.bz2 +Source29: %{external_url}/libvisio-0.1.0.tar.bz2 +Source30: %{external_url}/libmspub-0.1.0.tar.bz2 Source31: %{external_url}/22f8a85daf4a012180322e1f52a7563b-libcmis-0.4.1.tar.gz -Source32: %{external_url}/libodfgen-0.0.4.tar.bz2 -Source33: %{external_url}/libmwaw-0.2.0.tar.bz2 -Source34: %{external_url}/libetonyek-0.0.4.tar.bz2 -Source35: %{external_url}/libfreehand-0.0.0.tar.bz2 -Source36: %{external_url}/libe-book-0.0.3.tar.bz2 +Source32: %{external_url}/libodfgen-0.1.0.tar.bz2 +Source33: %{external_url}/libmwaw-0.3.1.tar.bz2 +Source34: %{external_url}/libetonyek-0.1.0.tar.bz2 +Source35: %{external_url}/libfreehand-0.1.0.tar.bz2 +Source36: %{external_url}/libe-book-0.1.0.tar.bz2 Source37: %{external_url}/Firebird-2.5.2.26540-0.tar.bz2 -Source38: %{external_url}/libabw-0.0.2.tar.bz2 +Source38: %{external_url}/libabw-0.1.0.tar.bz2 Source39: %{external_url}/libatomic_ops-7_2d.zip Source40: %{external_url}/libeot-0.01.tar.bz2 Source41: %{external_url}/language-subtag-registry-2014-03-27.tar.bz2 -%global bundling_options %{?bundling_options} --without-system-libcmis --without-system-libodfgen --without-system-libmwaw --without-system-libetonyek --without-system-libfreehand --without-system-libebook --without-system-firebird --without-system-libabw --without-system-libatomic_ops --without-system-libeot +Source42: %{external_url}/librevenge-0.0.0.tar.bz2 +%global bundling_options %{?bundling_options} --without-system-libcdr --without-system-libwpg --without-system-libwpd --without-system-libwps --without-system-libvisio --without-system-libmspub --without-system-libcmis --without-system-libodfgen --without-system-libmwaw --without-system-libetonyek --without-system-libfreehand --without-system-libebook --without-system-firebird --without-system-libabw --without-system-libatomic_ops --without-system-libeot --without-system-librevenge %endif # build tools @@ -164,18 +165,24 @@ BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xt) %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: pkgconfig(lcms2) -BuildRequires: pkgconfig(libcdr-0.0) %endif %if 0%{?fedora} -BuildRequires: pkgconfig(libabw-0.0) +BuildRequires: pkgconfig(libabw-0.1) +BuildRequires: pkgconfig(libcdr-0.1) BuildRequires: pkgconfig(libcmis-0.4) -BuildRequires: pkgconfig(libe-book-0.0) +BuildRequires: pkgconfig(libe-book-0.1) BuildRequires: pkgconfig(libeot) -BuildRequires: pkgconfig(libetonyek-0.0) -BuildRequires: pkgconfig(libfreehand-0.0) -BuildRequires: pkgconfig(libmwaw-0.2) -BuildRequires: pkgconfig(libodfgen-0.0) +BuildRequires: pkgconfig(libetonyek-0.1) +BuildRequires: pkgconfig(libfreehand-0.1) +BuildRequires: pkgconfig(libmwaw-0.3) +BuildRequires: pkgconfig(libmspub-0.1) +BuildRequires: pkgconfig(libodfgen-0.1) BuildRequires: pkgconfig(liborcus-0.8) +BuildRequires: pkgconfig(librevenge-0.0) +BuildRequires: pkgconfig(libvisio-0.1) +BuildRequires: pkgconfig(libwpd-0.10) +BuildRequires: pkgconfig(libwpg-0.3) +BuildRequires: pkgconfig(libwps-0.3) BuildRequires: pkgconfig(mdds) %endif BuildRequires: pkgconfig(libcurl) @@ -187,11 +194,6 @@ BuildRequires: pkgconfig(libidn) %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: libjpeg-turbo-devel BuildRequires: pkgconfig(liblangtag) -BuildRequires: pkgconfig(libmspub-0.0) -BuildRequires: pkgconfig(libvisio-0.0) -BuildRequires: pkgconfig(libwpd-0.9) -BuildRequires: pkgconfig(libwpg-0.2) -BuildRequires: pkgconfig(libwps-0.2) %else BuildRequires: libjpeg-devel %endif @@ -288,6 +290,15 @@ Patch10: 0001-never-run-autogen.sh.patch Patch11: 0001-add-X-TryExec-entries-to-desktop-files.patch # not upstreamed Patch12: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch +Patch13: 0001-build-libodfgen-as-shared-lib.patch +Patch14: 0002-bundle-librevenge.patch +Patch15: 0003-the-other-way-around.patch +Patch16: 0004-fix-deps-for-projects-using-librevenge.patch +Patch17: 0005-always-provide-REDLAND_CFLAGS-LIBS-to-ext.-projects.patch +Patch18: 0006-rebase-all-import-libs.patch +Patch19: 0007-libwpd-stream-does-not-exist-anymore.patch +Patch20: 0008-export-SYSTEM_REVENGE.patch +Patch21: 0009-drop-trailing-comma.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -299,12 +310,12 @@ Patch12: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch %if 0%{?rhel} %if 0%{?rhel} < 7 # redland libs are already suffixed -> no need to filter them too -%global libo_bundled_libs_filter /^lib\\(clucene\\|lcms2\\|fbembed\\|GLEW\\)\\.so.*$/d +%global libo_bundled_libs_filter /^lib\\(clucene\\|lcms2\\|fbembed\\|GLEW\\|odfgen\\|revenge\\)\\.so.*$/d %filter_from_provides %{libo_bundled_libs_filter} %filter_from_requires %{libo_bundled_libs_filter} %filter_setup %else -%global libo_bundled_libs_filter ^lib\\(fbembed\\|GLEW\\)\\.so.*$ +%global libo_bundled_libs_filter ^lib\\(fbembed\\|GLEW\\|odfgen\\|revenge\\)\\.so.*$ %global __provides_exclude %{libo_bundled_libs_filter} %global __requires_exclude %{libo_bundled_libs_filter} %endif @@ -1208,10 +1219,10 @@ export PYTHON_LIBS=`python-config --libs python` %endif %endif -%if 0%{?rhel} && 0%{?rhel} < 7 +# %%if 0%%{?rhel} && 0%%{?rhel} < 7 aclocal -I m4 autoconf -%endif +# %endif # TODO: enable gltf? # TODO: enable coinmp? @@ -1641,6 +1652,8 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libfrmlo.so %if 0%{?rhel} %{baseinstdir}/program/libGLEW.so.* +%{baseinstdir}/program/libodfgen-0.1.so.* +%{baseinstdir}/program/librevenge-0.0.so.* %endif %{baseinstdir}/program/libguesslanglo.so %{baseinstdir}/program/libhelplinkerlo.so @@ -2256,6 +2269,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog +* Wed May 28 2014 David Tardon - 1:4.3.0.0-6.beta1 +- switch to librevenge-based import libs + * Tue May 27 2014 Kalev Lember - 1:4.3.0.0-5.beta1 - Rebuild for boost 1.55.0