parent
a99e84c76e
commit
3536b774df
@ -1,382 +0,0 @@
|
|||||||
From 80a7fe5fa0644e48c2088f50ef7ed45878256d43 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
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 <dtardon@redhat.com>
|
|
||||||
+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 <libwpd/libwpd.h>
|
|
||||||
+
|
|
||||||
++#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 <libwpd/libwpd.h>
|
|
||||||
+ #include <libwpg/libwpg.h>
|
|
||||||
+
|
|
||||||
++#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 <libetonyek/libetonyek.h>
|
|
||||||
+
|
|
||||||
++#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 <libwpd/libwpd.h>
|
|
||||||
+
|
|
||||||
++#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 <fridrich.strba@bluewin.ch>
|
|
||||||
++ * Copyright (C) 2011 Eilidh McAdam <tibbylickle@gmail.com>
|
|
||||||
++ *
|
|
||||||
++ * 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
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From e7cd2abfcff1673238e4c517ab614a818a4597f9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: alonso <laurent.alonso@inria.fr>
|
|
||||||
Date: Fri, 30 May 2014 12:26:34 +0200
|
|
||||||
Subject: [PATCH 1/5] fix creation of substreams for OLE2
|
|
||||||
|
|
||||||
Change-Id: Idade93bcc1981543357e849b2faf075e7a021d3e
|
|
||||||
(cherry picked from commit 78fe1a5edf1dcdec44441fdb57554333a25ac3b1)
|
|
||||||
---
|
|
||||||
writerperfect/source/common/WPXSvInputStream.cxx | 10 +++++++---
|
|
||||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
index 4fad167..e5cf65b 100644
|
|
||||||
--- a/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
@@ -174,7 +174,11 @@ void OLEStorageImpl::initialize(SvStream *const pStream)
|
|
||||||
|
|
||||||
SotStorageStreamRef OLEStorageImpl::getStream(const rtl::OUString &rPath)
|
|
||||||
{
|
|
||||||
- NameMap_t::iterator aIt = maNameMap.find(rPath);
|
|
||||||
+ rtl::OUString aPath(rPath);
|
|
||||||
+ // accept paths which begin by '/'
|
|
||||||
+ if (aPath.startsWith("/") && aPath.getLength() >= 2)
|
|
||||||
+ aPath=rPath.copy(1);
|
|
||||||
+ NameMap_t::iterator aIt = maNameMap.find(aPath);
|
|
||||||
|
|
||||||
// For the while don't return stream in this situation.
|
|
||||||
// Later, given how libcdr's zip stream implementation behaves,
|
|
||||||
@@ -183,7 +187,7 @@ SotStorageStreamRef OLEStorageImpl::getStream(const rtl::OUString &rPath)
|
|
||||||
return SotStorageStreamRef();
|
|
||||||
|
|
||||||
if (!maStreams[aIt->second].stream.ref.Is())
|
|
||||||
- maStreams[aIt->second].stream.ref = createStream(rPath);
|
|
||||||
+ maStreams[aIt->second].stream.ref = createStream(aPath);
|
|
||||||
|
|
||||||
return maStreams[aIt->second].stream.ref;
|
|
||||||
}
|
|
||||||
@@ -206,7 +210,7 @@ void OLEStorageImpl::traverse(const SotStorageRef &rStorage, const rtl::OUString
|
|
||||||
{
|
|
||||||
if (aIt->IsStream())
|
|
||||||
{
|
|
||||||
- maStreams.push_back(OLEStreamData(rtl::OUStringToOString(aIt->GetName(), RTL_TEXTENCODING_UTF8)));
|
|
||||||
+ maStreams.push_back(OLEStreamData(rtl::OUStringToOString(concatPath(rPath, aIt->GetName()), RTL_TEXTENCODING_UTF8)));
|
|
||||||
maNameMap[concatPath(rPath, aIt->GetName())] = maStreams.size() - 1;
|
|
||||||
}
|
|
||||||
else if (aIt->IsStorage())
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,113 +0,0 @@
|
|||||||
From 8ea986b7c5fb87c5991801acba3d47378294d85c Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Wed, 28 May 2014 10:22:41 +0200
|
|
||||||
Subject: [PATCH 01/18] improve WPXSvInputStream test
|
|
||||||
|
|
||||||
Change-Id: I95817ea44b6793d4a80b74b32f3b5477c6169b26
|
|
||||||
(cherry picked from commit c14a6e0570c33c8a1258d5b562ca082de2cf05ce)
|
|
||||||
---
|
|
||||||
writerperfect/CppunitTest_writerperfect_stream.mk | 1 +
|
|
||||||
writerperfect/qa/unit/WPXSvStreamTest.cxx | 42 +++++++++++++++++++++++
|
|
||||||
2 files changed, 43 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/writerperfect/CppunitTest_writerperfect_stream.mk b/writerperfect/CppunitTest_writerperfect_stream.mk
|
|
||||||
index 8416008..ad943e0 100644
|
|
||||||
--- a/writerperfect/CppunitTest_writerperfect_stream.mk
|
|
||||||
+++ b/writerperfect/CppunitTest_writerperfect_stream.mk
|
|
||||||
@@ -47,6 +47,7 @@ $(eval $(call gb_CppunitTest_use_components,writerperfect_stream,\
|
|
||||||
package/util/package2 \
|
|
||||||
ucb/source/core/ucb1 \
|
|
||||||
ucb/source/ucp/file/ucpfile1 \
|
|
||||||
+ unotools/util/utl \
|
|
||||||
))
|
|
||||||
|
|
||||||
$(eval $(call gb_CppunitTest_add_exception_objects,writerperfect_stream,\
|
|
||||||
diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx
|
|
||||||
index d75f201..c2b4f20 100644
|
|
||||||
--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx
|
|
||||||
+++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx
|
|
||||||
@@ -9,6 +9,7 @@
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cassert>
|
|
||||||
+#include <sstream>
|
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
@@ -98,6 +99,24 @@ const shared_ptr<RVNGInputStream> lcl_createStreamForURL(const rtl::OUString &rU
|
|
||||||
return pInput;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void lcl_testSubStreams(const shared_ptr<RVNGInputStream> &pInput)
|
|
||||||
+{
|
|
||||||
+ shared_ptr<RVNGInputStream> pSubStream;
|
|
||||||
+
|
|
||||||
+ // all valid substreams can be read
|
|
||||||
+ for (std::size_t i = 0; i != pInput->subStreamCount(); ++i)
|
|
||||||
+ {
|
|
||||||
+ std::ostringstream msg("opening substream ");
|
|
||||||
+ msg << i;
|
|
||||||
+ pSubStream.reset(pInput->getSubStreamById(i));
|
|
||||||
+ CPPUNIT_ASSERT_MESSAGE(msg.str(), bool(pSubStream));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // invalid substreams cannot be read
|
|
||||||
+ pSubStream.reset(pInput->getSubStreamById(pInput->subStreamCount()));
|
|
||||||
+ CPPUNIT_ASSERT(!pSubStream);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void WPXSvStreamTest::testRead()
|
|
||||||
{
|
|
||||||
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
|
|
||||||
@@ -281,8 +300,17 @@ void WPXSvStreamTest::testStructured()
|
|
||||||
assert(bool(pInput));
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT(pInput->isStructured());
|
|
||||||
+ CPPUNIT_ASSERT(2 == pInput->subStreamCount());
|
|
||||||
+ lcl_testSubStreams(pInput);
|
|
||||||
+
|
|
||||||
+ // check for existing substream
|
|
||||||
+ CPPUNIT_ASSERT(pInput->existsSubStream("WordDocument"));
|
|
||||||
shared_ptr<RVNGInputStream> pSubStream(pInput->getSubStreamByName("WordDocument"));
|
|
||||||
CPPUNIT_ASSERT(bool(pSubStream));
|
|
||||||
+ CPPUNIT_ASSERT(!pSubStream->isEnd());
|
|
||||||
+
|
|
||||||
+ // check for not existing substream
|
|
||||||
+ CPPUNIT_ASSERT(!pInput->existsSubStream("foo"));
|
|
||||||
pSubStream.reset(pInput->getSubStreamByName("foo"));
|
|
||||||
CPPUNIT_ASSERT(!pSubStream);
|
|
||||||
}
|
|
||||||
@@ -293,8 +321,18 @@ void WPXSvStreamTest::testStructured()
|
|
||||||
assert(bool(pInput));
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT(pInput->isStructured());
|
|
||||||
+ CPPUNIT_ASSERT(9 == pInput->subStreamCount());
|
|
||||||
+ lcl_testSubStreams(pInput);
|
|
||||||
+
|
|
||||||
+ // check for existing substream
|
|
||||||
+ CPPUNIT_ASSERT(pInput->existsSubStream("content.xml"));
|
|
||||||
shared_ptr<RVNGInputStream> pSubStream(pInput->getSubStreamByName("content.xml"));
|
|
||||||
CPPUNIT_ASSERT(bool(pSubStream));
|
|
||||||
+ CPPUNIT_ASSERT(!pSubStream->isEnd());
|
|
||||||
+
|
|
||||||
+ // check for not existing substream
|
|
||||||
+ CPPUNIT_ASSERT(pInput->existsSubStream("content.xml"));
|
|
||||||
+ CPPUNIT_ASSERT(!pInput->existsSubStream("foo"));
|
|
||||||
pSubStream.reset(pInput->getSubStreamByName("foo"));
|
|
||||||
CPPUNIT_ASSERT(!pSubStream);
|
|
||||||
}
|
|
||||||
@@ -304,7 +342,11 @@ void WPXSvStreamTest::testStructured()
|
|
||||||
const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT(!pInput->isStructured());
|
|
||||||
+ CPPUNIT_ASSERT(0 == pInput->subStreamCount());
|
|
||||||
+ CPPUNIT_ASSERT(!pInput->existsSubStream("foo"));
|
|
||||||
CPPUNIT_ASSERT(0 == pInput->getSubStreamByName("foo"));
|
|
||||||
+ CPPUNIT_ASSERT(0 == pInput->getSubStreamById(42));
|
|
||||||
+ CPPUNIT_ASSERT(0 == pInput->subStreamName(42));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From 026dc56eb7deb7c49b6d54875a697d4a431082fe Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Fri, 30 May 2014 19:50:24 +0200
|
|
||||||
Subject: [PATCH] only def graphite external if --enable-graphite
|
|
||||||
|
|
||||||
Change-Id: I58271b5138b6dda4c448af63146a2f2171cb61a1
|
|
||||||
---
|
|
||||||
RepositoryExternal.mk | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
|
|
||||||
index 240a7fe..ada101e 100644
|
|
||||||
--- a/RepositoryExternal.mk
|
|
||||||
+++ b/RepositoryExternal.mk
|
|
||||||
@@ -1321,6 +1321,8 @@ endef
|
|
||||||
|
|
||||||
endif # SYSTEM_FONTCONFIG
|
|
||||||
|
|
||||||
+ifeq ($(ENABLE_GRAPHITE),TRUE)
|
|
||||||
+
|
|
||||||
ifneq ($(SYSTEM_GRAPHITE),)
|
|
||||||
|
|
||||||
define gb_LinkTarget__use_graphite
|
|
||||||
@@ -1348,6 +1350,12 @@ endef
|
|
||||||
|
|
||||||
endif # SYSTEM_GRAPHITE
|
|
||||||
|
|
||||||
+else # !ENABLE_GRAPHITE
|
|
||||||
+
|
|
||||||
+gb_LinkTarget__use_graphite :=
|
|
||||||
+
|
|
||||||
+endif # ENABLE_GRAPHITE
|
|
||||||
+
|
|
||||||
ifneq ($(SYSTEM_ICU),)
|
|
||||||
|
|
||||||
gb_LinkTarget__use_icu_headers:=
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,177 +0,0 @@
|
|||||||
From 807782cd52d5751bfb98f6e5cb42add2bc679c0c Mon Sep 17 00:00:00 2001
|
|
||||||
From: alonso <laurent.alonso@inria.fr>
|
|
||||||
Date: Wed, 28 May 2014 15:55:39 +0200
|
|
||||||
Subject: [PATCH 02/18] enable new handlers
|
|
||||||
|
|
||||||
Change-Id: I1c07a44e7d318478bcb2561d29ea53a9475e4b1f
|
|
||||||
(cherry picked from commit 6cae6d682cfdec0104f68552def2d1b5719c8fbe)
|
|
||||||
---
|
|
||||||
.../source/writer/MSWorksImportFilter.cxx | 12 +++++
|
|
||||||
.../source/writer/MSWorksImportFilter.hxx | 1 +
|
|
||||||
writerperfect/source/writer/MWAWImportFilter.cxx | 52 +++++++++++++++++-----
|
|
||||||
3 files changed, 54 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
|
|
||||||
index 7567294..2d253fb 100644
|
|
||||||
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
|
|
||||||
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
|
|
||||||
@@ -24,6 +24,13 @@ using com::sun::star::uno::Exception;
|
|
||||||
using com::sun::star::uno::RuntimeException;
|
|
||||||
using com::sun::star::uno::XComponentContext;
|
|
||||||
|
|
||||||
+static bool handleEmbeddedWKSObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
|
|
||||||
+{
|
|
||||||
+ OdsGenerator exporter;
|
|
||||||
+ exporter.addDocumentHandler(pHandler, streamType);
|
|
||||||
+ return libwps::WPSDocument::parse(const_cast<librevenge::RVNGInputStream *>(data.getDataStream()), &exporter)==libwps::WPS_OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
bool MSWorksImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator )
|
|
||||||
{
|
|
||||||
return libwps::WPS_OK == libwps::WPSDocument::parse(&rInput, &rGenerator);
|
|
||||||
@@ -43,6 +50,11 @@ bool MSWorksImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, O
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void MSWorksImportFilter::doRegisterHandlers( OdtGenerator &rGenerator )
|
|
||||||
+{
|
|
||||||
+ rGenerator.registerEmbeddedObjectHandler("image/wks-ods", &handleEmbeddedWKSObject);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
OUString MSWorksImportFilter_getImplementationName ()
|
|
||||||
throw (RuntimeException)
|
|
||||||
{
|
|
||||||
diff --git a/writerperfect/source/writer/MSWorksImportFilter.hxx b/writerperfect/source/writer/MSWorksImportFilter.hxx
|
|
||||||
index b5ddfe4..9bddf08 100644
|
|
||||||
--- a/writerperfect/source/writer/MSWorksImportFilter.hxx
|
|
||||||
+++ b/writerperfect/source/writer/MSWorksImportFilter.hxx
|
|
||||||
@@ -35,6 +35,7 @@ public:
|
|
||||||
private:
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
|
|
||||||
OUString MSWorksImportFilter_getImplementationName()
|
|
||||||
diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx
|
|
||||||
index ad656c9..d55a645 100644
|
|
||||||
--- a/writerperfect/source/writer/MWAWImportFilter.cxx
|
|
||||||
+++ b/writerperfect/source/writer/MWAWImportFilter.cxx
|
|
||||||
@@ -24,13 +24,20 @@ using com::sun::star::uno::Exception;
|
|
||||||
using com::sun::star::uno::RuntimeException;
|
|
||||||
using com::sun::star::uno::XComponentContext;
|
|
||||||
|
|
||||||
-static bool handleEmbeddedMWAWObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
|
|
||||||
+static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
|
|
||||||
{
|
|
||||||
OdgGenerator exporter;
|
|
||||||
exporter.addDocumentHandler(pHandler, streamType);
|
|
||||||
return MWAWDocument::decodeGraphic(data, &exporter);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
|
|
||||||
+{
|
|
||||||
+ OdsGenerator exporter;
|
|
||||||
+ exporter.addDocumentHandler(pHandler, streamType);
|
|
||||||
+ return MWAWDocument::decodeSpreadsheet(data, &exporter);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
bool MWAWImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator )
|
|
||||||
{
|
|
||||||
return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator);
|
|
||||||
@@ -65,12 +72,12 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
|
|
||||||
case MWAWDocument::MWAW_T_EDOC:
|
|
||||||
rTypeName = "writer_eDoc_Document";
|
|
||||||
break;
|
|
||||||
- case MWAWDocument::MWAW_T_GREATWORKS:
|
|
||||||
- rTypeName = "writer_Great_Works";
|
|
||||||
- break;
|
|
||||||
case MWAWDocument::MWAW_T_FULLWRITE:
|
|
||||||
rTypeName = "writer_FullWrite_Professional";
|
|
||||||
break;
|
|
||||||
+ case MWAWDocument::MWAW_T_GREATWORKS:
|
|
||||||
+ rTypeName = "writer_Great_Works";
|
|
||||||
+ break;
|
|
||||||
case MWAWDocument::MWAW_T_HANMACWORDJ:
|
|
||||||
rTypeName = "writer_HanMac_Word_J";
|
|
||||||
break;
|
|
||||||
@@ -83,24 +90,24 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
|
|
||||||
case MWAWDocument::MWAW_T_MACDOC:
|
|
||||||
rTypeName = "writer_MacDoc";
|
|
||||||
break;
|
|
||||||
- case MWAWDocument::MWAW_T_MARINERWRITE:
|
|
||||||
- rTypeName = "writer_Mariner_Write";
|
|
||||||
- break;
|
|
||||||
- case MWAWDocument::MWAW_T_MINDWRITE:
|
|
||||||
- rTypeName = "writer_MindWrite";
|
|
||||||
- break;
|
|
||||||
case MWAWDocument::MWAW_T_MACWRITE:
|
|
||||||
rTypeName = "writer_MacWrite";
|
|
||||||
break;
|
|
||||||
case MWAWDocument::MWAW_T_MACWRITEPRO:
|
|
||||||
rTypeName = "writer_MacWritePro";
|
|
||||||
break;
|
|
||||||
+ case MWAWDocument::MWAW_T_MARINERWRITE:
|
|
||||||
+ rTypeName = "writer_Mariner_Write";
|
|
||||||
+ break;
|
|
||||||
case MWAWDocument::MWAW_T_MICROSOFTWORD:
|
|
||||||
rTypeName = "writer_Mac_Word";
|
|
||||||
break;
|
|
||||||
case MWAWDocument::MWAW_T_MICROSOFTWORKS:
|
|
||||||
rTypeName = "writer_Mac_Works";
|
|
||||||
break;
|
|
||||||
+ case MWAWDocument::MWAW_T_MINDWRITE:
|
|
||||||
+ rTypeName = "writer_MindWrite";
|
|
||||||
+ break;
|
|
||||||
case MWAWDocument::MWAW_T_MORE:
|
|
||||||
rTypeName = "writer_Mac_More";
|
|
||||||
break;
|
|
||||||
@@ -123,13 +130,35 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
|
|
||||||
rTypeName = "writer_ZWrite";
|
|
||||||
break;
|
|
||||||
|
|
||||||
+ case MWAWDocument::MWAW_T_ADOBEILLUSTRATOR:
|
|
||||||
+ case MWAWDocument::MWAW_T_CLARISRESOLVE:
|
|
||||||
+ case MWAWDocument::MWAW_T_DBASE:
|
|
||||||
+ case MWAWDocument::MWAW_T_FAMILYTREEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_FILEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_FOXBASE:
|
|
||||||
+ case MWAWDocument::MWAW_T_FULLIMPACT:
|
|
||||||
+ case MWAWDocument::MWAW_T_FULLPAINT:
|
|
||||||
case MWAWDocument::MWAW_T_FRAMEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_INFOGENIE:
|
|
||||||
+ case MWAWDocument::MWAW_T_KALEIDAGRAPH:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDRAFT:
|
|
||||||
case MWAWDocument::MWAW_T_MACDRAW:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDRAWPRO:
|
|
||||||
case MWAWDocument::MWAW_T_MACPAINT:
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTFILE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTMULTIPLAN:
|
|
||||||
+ case MWAWDocument::MWAW_T_OVERVUE:
|
|
||||||
case MWAWDocument::MWAW_T_PAGEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_PIXELPAINT:
|
|
||||||
case MWAWDocument::MWAW_T_READYSETGO:
|
|
||||||
case MWAWDocument::MWAW_T_RAGTIME:
|
|
||||||
+ case MWAWDocument::MWAW_T_SUPERPAINT:
|
|
||||||
+ case MWAWDocument::MWAW_T_SYMPOSIUM:
|
|
||||||
+ case MWAWDocument::MWAW_T_TRAPEZE:
|
|
||||||
+ case MWAWDocument::MWAW_T_WINGZ:
|
|
||||||
case MWAWDocument::MWAW_T_XPRESS:
|
|
||||||
+ case MWAWDocument::MWAW_T_4DIMENSION:
|
|
||||||
+
|
|
||||||
case MWAWDocument::MWAW_T_RESERVED1:
|
|
||||||
case MWAWDocument::MWAW_T_RESERVED2:
|
|
||||||
case MWAWDocument::MWAW_T_RESERVED3:
|
|
||||||
@@ -151,7 +180,8 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
|
|
||||||
|
|
||||||
void MWAWImportFilter::doRegisterHandlers( OdtGenerator &rGenerator )
|
|
||||||
{
|
|
||||||
- rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWObject);
|
|
||||||
+ rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
|
|
||||||
+ rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
OUString MWAWImportFilter_getImplementationName ()
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
|||||||
From 5e17fa55feb165966fbae7dedd797a841f95a5ee Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Fri, 30 May 2014 12:29:40 +0200
|
|
||||||
Subject: [PATCH 2/5] generalize this for Zip too
|
|
||||||
|
|
||||||
Change-Id: I9ca0676f056fe3f09821c208ff095beb1f3c19ac
|
|
||||||
(cherry picked from commit aa81b089d3da838129ca44badc60a6489af11d84)
|
|
||||||
---
|
|
||||||
writerperfect/source/common/WPXSvInputStream.cxx | 24 ++++++++++++++++++------
|
|
||||||
1 file changed, 18 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
index e5cf65b..c9ff75a 100644
|
|
||||||
--- a/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
@@ -83,6 +83,20 @@ typedef struct
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
|
|
||||||
+rtl::OUString lcl_normalizeSubStreamPath(const rtl::OUString &rPath)
|
|
||||||
+{
|
|
||||||
+ // accept paths which begin by '/'
|
|
||||||
+ // TODO: maybe this should to a full normalization
|
|
||||||
+ if (rPath.startsWith("/") && rPath.getLength() >= 2)
|
|
||||||
+ return rPath.copy(1);
|
|
||||||
+ return rPath;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+namespace
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
const rtl::OUString concatPath(const rtl::OUString &lhs, const rtl::OUString &rhs)
|
|
||||||
{
|
|
||||||
if (lhs.isEmpty())
|
|
||||||
@@ -174,10 +188,7 @@ void OLEStorageImpl::initialize(SvStream *const pStream)
|
|
||||||
|
|
||||||
SotStorageStreamRef OLEStorageImpl::getStream(const rtl::OUString &rPath)
|
|
||||||
{
|
|
||||||
- rtl::OUString aPath(rPath);
|
|
||||||
- // accept paths which begin by '/'
|
|
||||||
- if (aPath.startsWith("/") && aPath.getLength() >= 2)
|
|
||||||
- aPath=rPath.copy(1);
|
|
||||||
+ const rtl::OUString aPath(lcl_normalizeSubStreamPath(rPath));
|
|
||||||
NameMap_t::iterator aIt = maNameMap.find(aPath);
|
|
||||||
|
|
||||||
// For the while don't return stream in this situation.
|
|
||||||
@@ -324,7 +335,8 @@ void ZipStorageImpl::initialize()
|
|
||||||
|
|
||||||
Reference<XInputStream> ZipStorageImpl::getStream(const rtl::OUString &rPath)
|
|
||||||
{
|
|
||||||
- NameMap_t::iterator aIt = maNameMap.find(rPath);
|
|
||||||
+ const rtl::OUString aPath(lcl_normalizeSubStreamPath(rPath));
|
|
||||||
+ NameMap_t::iterator aIt = maNameMap.find(aPath);
|
|
||||||
|
|
||||||
// For the while don't return stream in this situation.
|
|
||||||
// Later, given how libcdr's zip stream implementation behaves,
|
|
||||||
@@ -333,7 +345,7 @@ Reference<XInputStream> ZipStorageImpl::getStream(const rtl::OUString &rPath)
|
|
||||||
return Reference<XInputStream>();
|
|
||||||
|
|
||||||
if (!maStreams[aIt->second].xStream.is())
|
|
||||||
- maStreams[aIt->second].xStream = createStream(rPath);
|
|
||||||
+ maStreams[aIt->second].xStream = createStream(aPath);
|
|
||||||
|
|
||||||
return maStreams[aIt->second].xStream;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,721 +0,0 @@
|
|||||||
From f458e912d88059a1b129e91bf4d15c03baf3346d Mon Sep 17 00:00:00 2001
|
|
||||||
From: osnola <alonso@loria.fr>
|
|
||||||
Date: Wed, 28 May 2014 18:09:57 +0200
|
|
||||||
Subject: [PATCH 03/18] Add new libmwaw drawing format...
|
|
||||||
|
|
||||||
Change-Id: I7fa7a46143126bdf27cf7cb30245dbcb244645ef
|
|
||||||
(cherry picked from commit 0e17d7bb8acdbc0c36406a352c37f5cb0a987ced)
|
|
||||||
---
|
|
||||||
.../config/fragments/filters/Beagle_Works_Draw.xcu | 29 ++++
|
|
||||||
.../config/fragments/filters/ClarisWorks_Draw.xcu | 30 ++++
|
|
||||||
.../config/fragments/filters/Great_Works_Draw.xcu | 29 ++++
|
|
||||||
.../config/fragments/filters/MacPaint_Draw.xcu | 30 ++++
|
|
||||||
.../config/fragments/filters/Mac_Works_Draw.xcu | 30 ++++
|
|
||||||
.../config/fragments/filters/SuperPaint_Draw.xcu | 30 ++++
|
|
||||||
.../config/fragments/types/draw_Beagle_Works.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/draw_ClarisWorks.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/draw_Great_Works.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/draw_MacPaint.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/draw_Mac_Works.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/draw_SuperPaint.xcu | 29 ++++
|
|
||||||
writerperfect/source/draw/MWAWDrawImportFilter.cxx | 191 +++++++++++++++++++++
|
|
||||||
writerperfect/source/draw/MWAWDrawImportFilter.hxx | 53 ++++++
|
|
||||||
14 files changed, 596 insertions(+)
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/Beagle_Works_Draw.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/ClarisWorks_Draw.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/Great_Works_Draw.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/MacPaint_Draw.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/Mac_Works_Draw.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/SuperPaint_Draw.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/draw_Beagle_Works.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/draw_ClarisWorks.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/draw_Great_Works.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/draw_MacPaint.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/draw_Mac_Works.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/draw_SuperPaint.xcu
|
|
||||||
create mode 100644 writerperfect/source/draw/MWAWDrawImportFilter.cxx
|
|
||||||
create mode 100644 writerperfect/source/draw/MWAWDrawImportFilter.hxx
|
|
||||||
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu b/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..57b5879
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+
|
|
||||||
+<node oor:name="Beagle_Works_Draw" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags">
|
|
||||||
+ <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FilterService">
|
|
||||||
+ <value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">BeagleWorks/WordPerfect Works v1 Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion">
|
|
||||||
+ <value>0</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Type">
|
|
||||||
+ <value>draw_Beagle_Works</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="DocumentService">
|
|
||||||
+ <value>com.sun.star.drawing.DrawingDocument</value>
|
|
||||||
+ </prop>
|
|
||||||
+</node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/ClarisWorks_Draw.xcu b/filter/source/config/fragments/filters/ClarisWorks_Draw.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..f4924b7
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/ClarisWorks_Draw.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="ClarisWorks_Draw" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">ClarisWorks/AppleWorks Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>draw_ClarisWorks</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Great_Works_Draw.xcu b/filter/source/config/fragments/filters/Great_Works_Draw.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..4bb0667
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/Great_Works_Draw.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+
|
|
||||||
+<node oor:name="Great_Works_Draw" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags">
|
|
||||||
+ <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FilterService">
|
|
||||||
+ <value>com.sun.star.comp.Draaw.MWAWDrawImportFilter</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">GreatWorks Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion">
|
|
||||||
+ <value>0</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Type">
|
|
||||||
+ <value>draw_Great_Works</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="DocumentService">
|
|
||||||
+ <value>com.sun.star.drawing.DrawingDocument</value>
|
|
||||||
+ </prop>
|
|
||||||
+</node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/MacPaint_Draw.xcu b/filter/source/config/fragments/filters/MacPaint_Draw.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..80f8021
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/MacPaint_Draw.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="MacPaint_Draw" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">MacPaint (v1)</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>draw_MacPaint</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Mac_Works_Draw.xcu b/filter/source/config/fragments/filters/Mac_Works_Draw.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..1c02f3f
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/Mac_Works_Draw.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="Mac_Works_Draw" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">Microsoft Works for Mac Document (v1 - v4)</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>draw_Mac_Works</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/SuperPaint_Draw.xcu b/filter/source/config/fragments/filters/SuperPaint_Draw.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..ccac863
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/SuperPaint_Draw.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="SuperPaint_Draw" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">SuperPaint (v1)</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>draw_SuperPaint</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_Beagle_Works.xcu b/filter/source/config/fragments/types/draw_Beagle_Works.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..177ad97
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_Beagle_Works.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+
|
|
||||||
+<node oor:name="draw_Beagle_Works" oor:op="replace">
|
|
||||||
+ <prop oor:name="DetectService">
|
|
||||||
+ <value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Extensions">
|
|
||||||
+ <value>dummy</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="MediaType">
|
|
||||||
+ <value></value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Preferred">
|
|
||||||
+ <value>true</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="PreferredFilter">
|
|
||||||
+ <value>Beagle_Works_Draw</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>BeagleWorks/WordPerfect Works Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+</node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_ClarisWorks.xcu b/filter/source/config/fragments/types/draw_ClarisWorks.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..74672eb
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_ClarisWorks.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="draw_ClarisWorks" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value>cwk</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"><value>application/clarisworks</value></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>Claris_Works_Draw</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>ClarisWorks/AppleWorks Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_Great_Works.xcu b/filter/source/config/fragments/types/draw_Great_Works.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..f9aeb07
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_Great_Works.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+
|
|
||||||
+<node oor:name="draw_Great_Works" oor:op="replace">
|
|
||||||
+ <prop oor:name="DetectService">
|
|
||||||
+ <value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Extensions">
|
|
||||||
+ <value>dummy</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="MediaType">
|
|
||||||
+ <value></value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Preferred">
|
|
||||||
+ <value>true</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="PreferredFilter">
|
|
||||||
+ <value>Great_Works_Draw</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>GreatWorks Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+</node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_MacPaint.xcu b/filter/source/config/fragments/types/draw_MacPaint.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..5811ea5
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_MacPaint.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="draw_MacPaint" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>MacPaint_Draw</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>MacPaint (v1)</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_Mac_Works.xcu b/filter/source/config/fragments/types/draw_Mac_Works.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..79ef12c
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_Mac_Works.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="draw_Mac_Works" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>Mac_Works_Draw</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>Microsoft Works for Mac Document (v1 - v4)</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_SuperPaint.xcu b/filter/source/config/fragments/types/draw_SuperPaint.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..6dbd4a9
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_SuperPaint.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="draw_SuperPaint" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>SuperPaint_Draw</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>SuperPaint (v1)</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..feddcdb
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
|
|
||||||
@@ -0,0 +1,191 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/* MWAWDrawImportFilter: Sets up the filter, and calls DocumentCollector
|
|
||||||
+ * to do the actual filtering
|
|
||||||
+ *
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <com/sun/star/uno/Reference.h>
|
|
||||||
+#include <cppuhelper/supportsservice.hxx>
|
|
||||||
+
|
|
||||||
+#include <libmwaw/libmwaw.hxx>
|
|
||||||
+#include <libodfgen/libodfgen.hxx>
|
|
||||||
+
|
|
||||||
+#include "MWAWDrawImportFilter.hxx"
|
|
||||||
+
|
|
||||||
+using com::sun::star::uno::Sequence;
|
|
||||||
+using com::sun::star::uno::Reference;
|
|
||||||
+using com::sun::star::uno::Any;
|
|
||||||
+using com::sun::star::uno::XInterface;
|
|
||||||
+using com::sun::star::uno::Exception;
|
|
||||||
+using com::sun::star::uno::RuntimeException;
|
|
||||||
+using com::sun::star::uno::XComponentContext;
|
|
||||||
+
|
|
||||||
+static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
|
|
||||||
+{
|
|
||||||
+ OdgGenerator exporter;
|
|
||||||
+ exporter.addDocumentHandler(pHandler, streamType);
|
|
||||||
+ return MWAWDocument::decodeGraphic(data, &exporter);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
|
|
||||||
+{
|
|
||||||
+ OdsGenerator exporter;
|
|
||||||
+ exporter.addDocumentHandler(pHandler, streamType);
|
|
||||||
+ return MWAWDocument::decodeSpreadsheet(data, &exporter);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+bool MWAWDrawImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
|
|
||||||
+{
|
|
||||||
+ return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+bool MWAWDrawImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
|
|
||||||
+{
|
|
||||||
+ rTypeName = "";
|
|
||||||
+
|
|
||||||
+ MWAWDocument::Type docType = MWAWDocument::MWAW_T_UNKNOWN;
|
|
||||||
+ MWAWDocument::Kind docKind = MWAWDocument::MWAW_K_UNKNOWN;
|
|
||||||
+ const MWAWDocument::Confidence confidence = MWAWDocument::isFileFormatSupported(&rInput, docType, docKind);
|
|
||||||
+
|
|
||||||
+ if (confidence == MWAWDocument::MWAW_C_EXCELLENT)
|
|
||||||
+ {
|
|
||||||
+ if ( docKind == MWAWDocument::MWAW_K_DRAW || docKind == MWAWDocument::MWAW_K_PAINT )
|
|
||||||
+ {
|
|
||||||
+ switch (docType)
|
|
||||||
+ {
|
|
||||||
+ case MWAWDocument::MWAW_T_BEAGLEWORKS:
|
|
||||||
+ rTypeName = "draw_Beagle_Works";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_CLARISWORKS:
|
|
||||||
+ rTypeName = "draw_ClarisWorks";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_GREATWORKS:
|
|
||||||
+ rTypeName = "draw_Great_Works";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_MACPAINT:
|
|
||||||
+ rTypeName = "draw_MacPaint";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTWORKS:
|
|
||||||
+ rTypeName = "draw_Mac_Works";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_SUPERPAINT:
|
|
||||||
+ rTypeName = "draw_SuperPaint";
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ case MWAWDocument::MWAW_T_ACTA:
|
|
||||||
+ case MWAWDocument::MWAW_T_ADOBEILLUSTRATOR:
|
|
||||||
+ case MWAWDocument::MWAW_T_CLARISRESOLVE:
|
|
||||||
+ case MWAWDocument::MWAW_T_DBASE:
|
|
||||||
+ case MWAWDocument::MWAW_T_DOCMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_EDOC:
|
|
||||||
+ case MWAWDocument::MWAW_T_FAMILYTREEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_FILEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_FOXBASE:
|
|
||||||
+ case MWAWDocument::MWAW_T_FRAMEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_FULLIMPACT:
|
|
||||||
+ case MWAWDocument::MWAW_T_FULLPAINT:
|
|
||||||
+ case MWAWDocument::MWAW_T_FULLWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_INFOGENIE:
|
|
||||||
+ case MWAWDocument::MWAW_T_KALEIDAGRAPH:
|
|
||||||
+ case MWAWDocument::MWAW_T_HANMACWORDJ:
|
|
||||||
+ case MWAWDocument::MWAW_T_HANMACWORDK:
|
|
||||||
+ case MWAWDocument::MWAW_T_LIGHTWAYTEXT:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDOC:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDRAFT:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDRAW:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDRAWPRO:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACWRITEPRO:
|
|
||||||
+ case MWAWDocument::MWAW_T_MARINERWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MINDWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTFILE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTMULTIPLAN:
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTWORD:
|
|
||||||
+ case MWAWDocument::MWAW_T_MORE:
|
|
||||||
+ case MWAWDocument::MWAW_T_NISUSWRITER:
|
|
||||||
+ case MWAWDocument::MWAW_T_OVERVUE:
|
|
||||||
+ case MWAWDocument::MWAW_T_PAGEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_PIXELPAINT:
|
|
||||||
+ case MWAWDocument::MWAW_T_RAGTIME:
|
|
||||||
+ case MWAWDocument::MWAW_T_READYSETGO:
|
|
||||||
+ case MWAWDocument::MWAW_T_SYMPOSIUM:
|
|
||||||
+ case MWAWDocument::MWAW_T_TEACHTEXT:
|
|
||||||
+ case MWAWDocument::MWAW_T_TEXEDIT:
|
|
||||||
+ case MWAWDocument::MWAW_T_TRAPEZE:
|
|
||||||
+ case MWAWDocument::MWAW_T_WINGZ:
|
|
||||||
+ case MWAWDocument::MWAW_T_WRITENOW:
|
|
||||||
+ case MWAWDocument::MWAW_T_WRITERPLUS:
|
|
||||||
+ case MWAWDocument::MWAW_T_XPRESS:
|
|
||||||
+ case MWAWDocument::MWAW_T_ZWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_4DIMENSION:
|
|
||||||
+
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED1:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED2:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED3:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED4:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED5:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED6:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED7:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED8:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED9:
|
|
||||||
+ case MWAWDocument::MWAW_T_UNKNOWN:
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return !rTypeName.isEmpty();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void MWAWDrawImportFilter::doRegisterHandlers( OdgGenerator &rGenerator )
|
|
||||||
+{
|
|
||||||
+ rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
|
|
||||||
+ rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+OUString MWAWDrawImportFilter_getImplementationName ()
|
|
||||||
+throw (RuntimeException)
|
|
||||||
+{
|
|
||||||
+ return OUString ( "com.sun.star.comp.Draw.MWAWDrawImportFilter" );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames( )
|
|
||||||
+throw (RuntimeException)
|
|
||||||
+{
|
|
||||||
+ Sequence < OUString > aRet(2);
|
|
||||||
+ OUString *pArray = aRet.getArray();
|
|
||||||
+ pArray[0] = "com.sun.star.document.ImportFilter";
|
|
||||||
+ pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
|
|
||||||
+ return aRet;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+Reference< XInterface > SAL_CALL MWAWDrawImportFilter_createInstance( const Reference< XComponentContext > &rContext)
|
|
||||||
+throw( Exception )
|
|
||||||
+{
|
|
||||||
+ return (cppu::OWeakObject *) new MWAWDrawImportFilter( rContext );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// XServiceInfo
|
|
||||||
+OUString SAL_CALL MWAWDrawImportFilter::getImplementationName( )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return MWAWDrawImportFilter_getImplementationName();
|
|
||||||
+}
|
|
||||||
+sal_Bool SAL_CALL MWAWDrawImportFilter::supportsService( const OUString &rServiceName )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return cppu::supportsService( this, rServiceName );
|
|
||||||
+}
|
|
||||||
+Sequence< OUString > SAL_CALL MWAWDrawImportFilter::getSupportedServiceNames( )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return MWAWDrawImportFilter_getSupportedServiceNames();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.hxx b/writerperfect/source/draw/MWAWDrawImportFilter.hxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..173629e
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.hxx
|
|
||||||
@@ -0,0 +1,53 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/*
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef _MWAWDRAWIMPORTFILTER_HXX
|
|
||||||
+#define _MWAWDRAWIMPORTFILTER_HXX
|
|
||||||
+
|
|
||||||
+#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
||||||
+#include <com/sun/star/uno/XComponentContext.hpp>
|
|
||||||
+
|
|
||||||
+#include "ImportFilterBase.hxx"
|
|
||||||
+
|
|
||||||
+/* This component will be instantiated for both import or export. Whether it calls
|
|
||||||
+ * setSourceDocument or setTargetDocument determines which Impl function the filter
|
|
||||||
+ * member calls */
|
|
||||||
+class MWAWDrawImportFilter : public writerperfect::draw::ImportFilterBase
|
|
||||||
+{
|
|
||||||
+public:
|
|
||||||
+ MWAWDrawImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
|
|
||||||
+ : writerperfect::draw::ImportFilterBase( rxContext ) {}
|
|
||||||
+
|
|
||||||
+ // XServiceInfo
|
|
||||||
+ virtual OUString SAL_CALL getImplementationName( )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+ virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+
|
|
||||||
+private:
|
|
||||||
+ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
|
|
||||||
+ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
|
|
||||||
+ virtual void doRegisterHandlers( OdgGenerator &rGenerator ) SAL_OVERRIDE;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+OUString MWAWDrawImportFilter_getImplementationName()
|
|
||||||
+throw ( ::com::sun::star::uno::RuntimeException );
|
|
||||||
+
|
|
||||||
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames( )
|
|
||||||
+throw ( ::com::sun::star::uno::RuntimeException );
|
|
||||||
+
|
|
||||||
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
|
|
||||||
+SAL_CALL MWAWDrawImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
|
|
||||||
+throw ( ::com::sun::star::uno::Exception );
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From 576a7210e52b7b3dec8cb6476c8cd44d9bf5dbb1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Fri, 30 May 2014 12:43:22 +0200
|
|
||||||
Subject: [PATCH 3/5] reading from a stream must start at the beginning
|
|
||||||
|
|
||||||
Change-Id: I0c668244fffcda04a8fe34ef629754f5935cab4b
|
|
||||||
(cherry picked from commit ee016fbbe3f3af67b2b8b6fb516bf523a0e704ff)
|
|
||||||
---
|
|
||||||
writerperfect/source/common/WPXSvInputStream.cxx | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
index c9ff75a..b5786bf 100644
|
|
||||||
--- a/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
|
|
||||||
@@ -468,6 +468,8 @@ WPXSvInputStreamImpl::WPXSvInputStreamImpl( Reference< XInputStream > xStream )
|
|
||||||
try
|
|
||||||
{
|
|
||||||
mnLength = mxSeekable->getLength();
|
|
||||||
+ if (0 < mxSeekable->getPosition())
|
|
||||||
+ mxSeekable->seek(0);
|
|
||||||
}
|
|
||||||
catch ( ... )
|
|
||||||
{
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
From f841951b0244d2c8c1430fae03de005a84fe565d Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,163 +0,0 @@
|
|||||||
From 660d48599ce3c5a23838a441e1bd51c3f2b8dc20 Mon Sep 17 00:00:00 2001
|
|
||||||
From: osnola <alonso@loria.fr>
|
|
||||||
Date: Wed, 28 May 2014 18:13:06 +0200
|
|
||||||
Subject: [PATCH 04/18] add new libmwaw drawing formats (forgotten files)
|
|
||||||
|
|
||||||
Change-Id: Ib9ecd643a552063e2a09874776b3ea0f30e8440a
|
|
||||||
(cherry picked from commit ba0b63869ace532720bd7c13099e62c478d8cc31)
|
|
||||||
---
|
|
||||||
filter/Configuration_filter.mk | 17 +++++++++++++++--
|
|
||||||
writerperfect/Library_wpftdraw.mk | 2 ++
|
|
||||||
writerperfect/source/draw/ImportFilterBase.cxx | 6 ++++++
|
|
||||||
writerperfect/source/draw/ImportFilterBase.hxx | 3 +++
|
|
||||||
writerperfect/source/draw/wpftdraw.component | 4 ++++
|
|
||||||
writerperfect/source/draw/wpftdraw_genericfilter.cxx | 5 +++++
|
|
||||||
6 files changed, 35 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
|
|
||||||
index fcc989b..9783f50 100644
|
|
||||||
--- a/filter/Configuration_filter.mk
|
|
||||||
+++ b/filter/Configuration_filter.mk
|
|
||||||
@@ -599,10 +599,17 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/s
|
|
||||||
draw8_template \
|
|
||||||
draw_WordPerfect_Graphics \
|
|
||||||
draw_Visio_Document \
|
|
||||||
- draw_Publisher_Document \
|
|
||||||
+ draw_Publisher_Document \
|
|
||||||
draw_CorelDraw_Document \
|
|
||||||
draw_Corel_Presentation_Exchange \
|
|
||||||
draw_Freehand_Document \
|
|
||||||
+ draw_Visio_Document \
|
|
||||||
+ draw_Beagle_Works \
|
|
||||||
+ draw_ClarisWorks \
|
|
||||||
+ draw_Great_Works \
|
|
||||||
+ draw_Mac_Works \
|
|
||||||
+ draw_MacPaint \
|
|
||||||
+ draw_SuperPaint \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.xcu,filter/source/config/fragments/filters,\
|
|
||||||
@@ -613,10 +620,16 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.xcu,filt
|
|
||||||
draw8_template \
|
|
||||||
WordPerfectGraphics \
|
|
||||||
VisioDocument \
|
|
||||||
- PublisherDocument \
|
|
||||||
+ PublisherDocument \
|
|
||||||
CorelDrawDocument \
|
|
||||||
CorelPresentationExchange \
|
|
||||||
FreehandDocument \
|
|
||||||
+ Beagle_Works_Draw \
|
|
||||||
+ ClarisWorks_Draw \
|
|
||||||
+ Great_Works_Draw \
|
|
||||||
+ Mac_Works_Draw \
|
|
||||||
+ MacPaint_Draw \
|
|
||||||
+ SuperPaint_Draw \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fragments/filters,\
|
|
||||||
diff --git a/writerperfect/Library_wpftdraw.mk b/writerperfect/Library_wpftdraw.mk
|
|
||||||
index 807afc9..01a1ebe 100644
|
|
||||||
--- a/writerperfect/Library_wpftdraw.mk
|
|
||||||
+++ b/writerperfect/Library_wpftdraw.mk
|
|
||||||
@@ -40,6 +40,7 @@ $(eval $(call gb_Library_use_externals,wpftdraw,\
|
|
||||||
cdr \
|
|
||||||
freehand \
|
|
||||||
mspub \
|
|
||||||
+ mwaw \
|
|
||||||
odfgen \
|
|
||||||
revenge \
|
|
||||||
visio \
|
|
||||||
@@ -58,6 +59,7 @@ $(eval $(call gb_Library_add_exception_objects,wpftdraw,\
|
|
||||||
writerperfect/source/draw/FreehandImportFilter \
|
|
||||||
writerperfect/source/draw/ImportFilterBase \
|
|
||||||
writerperfect/source/draw/MSPUBImportFilter \
|
|
||||||
+ writerperfect/source/draw/MWAWDrawImportFilter \
|
|
||||||
writerperfect/source/draw/VisioImportFilter \
|
|
||||||
writerperfect/source/draw/WPGImportFilter \
|
|
||||||
writerperfect/source/draw/wpftdraw_genericfilter \
|
|
||||||
diff --git a/writerperfect/source/draw/ImportFilterBase.cxx b/writerperfect/source/draw/ImportFilterBase.cxx
|
|
||||||
index 6fc09b2..fc6c8ee 100644
|
|
||||||
--- a/writerperfect/source/draw/ImportFilterBase.cxx
|
|
||||||
+++ b/writerperfect/source/draw/ImportFilterBase.cxx
|
|
||||||
@@ -95,6 +95,8 @@ throw (RuntimeException, std::exception)
|
|
||||||
OdgGenerator exporter;
|
|
||||||
exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML);
|
|
||||||
|
|
||||||
+ doRegisterHandlers(exporter);
|
|
||||||
+
|
|
||||||
return doImportDocument(input, exporter);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -170,6 +172,10 @@ throw (Exception, RuntimeException, std::exception)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+void ImportFilterImpl::doRegisterHandlers( OdgGenerator & )
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/writerperfect/source/draw/ImportFilterBase.hxx b/writerperfect/source/draw/ImportFilterBase.hxx
|
|
||||||
index 56a1808..f326d98 100644
|
|
||||||
--- a/writerperfect/source/draw/ImportFilterBase.hxx
|
|
||||||
+++ b/writerperfect/source/draw/ImportFilterBase.hxx
|
|
||||||
@@ -39,6 +39,8 @@ namespace xml { namespace sax {
|
|
||||||
}
|
|
||||||
} } }
|
|
||||||
|
|
||||||
+class OdgGenerator;
|
|
||||||
+
|
|
||||||
namespace writerperfect
|
|
||||||
{
|
|
||||||
namespace draw
|
|
||||||
@@ -80,6 +82,7 @@ public:
|
|
||||||
private:
|
|
||||||
virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) = 0;
|
|
||||||
virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) = 0;
|
|
||||||
+ virtual void doRegisterHandlers( OdgGenerator &rGenerator );
|
|
||||||
|
|
||||||
private:
|
|
||||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
|
|
||||||
diff --git a/writerperfect/source/draw/wpftdraw.component b/writerperfect/source/draw/wpftdraw.component
|
|
||||||
index d524116..cc65f3c 100644
|
|
||||||
--- a/writerperfect/source/draw/wpftdraw.component
|
|
||||||
+++ b/writerperfect/source/draw/wpftdraw.component
|
|
||||||
@@ -25,6 +25,10 @@
|
|
||||||
<service name="com.sun.star.document.ImportFilter"/>
|
|
||||||
<service name="com.sun.star.document.ExtendedTypeDetection"/>
|
|
||||||
</implementation>
|
|
||||||
+ <implementation name="com.sun.star.comp.Draw.MWAWDrawImportFilter">
|
|
||||||
+ <service name="com.sun.star.document.ImportFilter"/>
|
|
||||||
+ <service name="com.sun.star.document.ExtendedTypeDetection"/>
|
|
||||||
+ </implementation>
|
|
||||||
<implementation name="com.sun.star.comp.Draw.VisioImportFilter">
|
|
||||||
<service name="com.sun.star.document.ImportFilter"/>
|
|
||||||
<service name="com.sun.star.document.ExtendedTypeDetection"/>
|
|
||||||
diff --git a/writerperfect/source/draw/wpftdraw_genericfilter.cxx b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
|
|
||||||
index 43cabc1..821ac7c 100644
|
|
||||||
--- a/writerperfect/source/draw/wpftdraw_genericfilter.cxx
|
|
||||||
+++ b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
#include "CDRImportFilter.hxx"
|
|
||||||
#include "CMXImportFilter.hxx"
|
|
||||||
#include "MSPUBImportFilter.hxx"
|
|
||||||
+#include "MWAWDrawImportFilter.hxx"
|
|
||||||
#include "FreehandImportFilter.hxx"
|
|
||||||
#include "VisioImportFilter.hxx"
|
|
||||||
#include "WPGImportFilter.hxx"
|
|
||||||
@@ -53,6 +54,10 @@ static cppu::ImplementationEntry const services[] = {
|
|
||||||
&MSPUBImportFilter_getImplementationName,
|
|
||||||
&MSPUBImportFilter_getSupportedServiceNames,
|
|
||||||
&cppu::createSingleComponentFactory, 0, 0 },
|
|
||||||
+ { &MWAWDrawImportFilter_createInstance,
|
|
||||||
+ &MWAWDrawImportFilter_getImplementationName,
|
|
||||||
+ &MWAWDrawImportFilter_getSupportedServiceNames,
|
|
||||||
+ &cppu::createSingleComponentFactory, 0, 0 },
|
|
||||||
{ &VisioImportFilter_createInstance,
|
|
||||||
&VisioImportFilter_getImplementationName,
|
|
||||||
&VisioImportFilter_getSupportedServiceNames,
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
From 6f0f3ab008092c7a84fa1712b3c4ea736b0d2159 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From 32aacfc76f7b57978d54bb12f80ad6112a186af7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Fri, 30 May 2014 13:29:16 +0200
|
|
||||||
Subject: [PATCH 4/5] fix filter names
|
|
||||||
|
|
||||||
Change-Id: I691d8d43ef12f5863627d1d4bef64dbd9d633e86
|
|
||||||
(cherry picked from commit 2999a87db65767b26a161b60a2e80f5afd76ef52)
|
|
||||||
---
|
|
||||||
filter/source/config/fragments/types/calc_ClarisWorks.xcu | 2 +-
|
|
||||||
filter/source/config/fragments/types/draw_ClarisWorks.xcu | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_ClarisWorks.xcu b/filter/source/config/fragments/types/calc_ClarisWorks.xcu
|
|
||||||
index fe73b41..105bae4 100644
|
|
||||||
--- a/filter/source/config/fragments/types/calc_ClarisWorks.xcu
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_ClarisWorks.xcu
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
<prop oor:name="Extensions"><value>cwk</value></prop>
|
|
||||||
<prop oor:name="MediaType"><value>application/clarisworks</value></prop>
|
|
||||||
<prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
- <prop oor:name="PreferredFilter"><value>Claris_Works_Calc</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>ClarisWorks_Calc</value></prop>
|
|
||||||
<prop oor:name="UIName">
|
|
||||||
<value>ClarisWorks/AppleWorks Document</value>
|
|
||||||
</prop>
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_ClarisWorks.xcu b/filter/source/config/fragments/types/draw_ClarisWorks.xcu
|
|
||||||
index 74672eb..9581d21 100644
|
|
||||||
--- a/filter/source/config/fragments/types/draw_ClarisWorks.xcu
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_ClarisWorks.xcu
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
<prop oor:name="Extensions"><value>cwk</value></prop>
|
|
||||||
<prop oor:name="MediaType"><value>application/clarisworks</value></prop>
|
|
||||||
<prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
- <prop oor:name="PreferredFilter"><value>Claris_Works_Draw</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>ClarisWorks_Draw</value></prop>
|
|
||||||
<prop oor:name="UIName">
|
|
||||||
<value>ClarisWorks/AppleWorks Document</value>
|
|
||||||
</prop>
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From b8370ed2010002a500a5371a5f258c716b71eca5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Fri, 30 May 2014 13:30:31 +0200
|
|
||||||
Subject: [PATCH 5/5] add dummy extension
|
|
||||||
|
|
||||||
Change-Id: Ic76efa716237f197c1c73a9752f6680be49570f6
|
|
||||||
(cherry picked from commit 2b6f2beec6ceffbde287ebef295eb27bb7f35d00)
|
|
||||||
---
|
|
||||||
filter/source/config/fragments/types/calc_Mac_Wingz.xcu | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_Mac_Wingz.xcu b/filter/source/config/fragments/types/calc_Mac_Wingz.xcu
|
|
||||||
index 357a189..bde4eac 100644
|
|
||||||
--- a/filter/source/config/fragments/types/calc_Mac_Wingz.xcu
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_Mac_Wingz.xcu
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
<node oor:name="calc_Mac_Wingz" oor:op="replace" >
|
|
||||||
<prop oor:name="DetectService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
<prop oor:name="URLPattern"/>
|
|
||||||
- <prop oor:name="Extensions"><value></value></prop>
|
|
||||||
+ <prop oor:name="Extensions"><value>dummy</value></prop>
|
|
||||||
<prop oor:name="MediaType"></prop>
|
|
||||||
<prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
<prop oor:name="PreferredFilter"><value>Mac_Wingz_Calc</value></prop>
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
|||||||
From 12d52250462435b19d1873af7bd064d3e64b1c4c Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,48 +0,0 @@
|
|||||||
From eab69b534b5fdfcd520fd5832aa2d184bba2fa26 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 13:03:31 +0200
|
|
||||||
Subject: [PATCH 06/18] fix return value for libe-book import filter
|
|
||||||
|
|
||||||
Change-Id: Idd84489a3123d506166a24ff5c85a4e7f75ee676
|
|
||||||
(cherry picked from commit 5fde8e38c127a872a66b8029b69aff55b01d6d88)
|
|
||||||
---
|
|
||||||
writerperfect/source/writer/EBookImportFilter.cxx | 17 +++++++++++------
|
|
||||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/writerperfect/source/writer/EBookImportFilter.cxx b/writerperfect/source/writer/EBookImportFilter.cxx
|
|
||||||
index 3003768..efe5334 100644
|
|
||||||
--- a/writerperfect/source/writer/EBookImportFilter.cxx
|
|
||||||
+++ b/writerperfect/source/writer/EBookImportFilter.cxx
|
|
||||||
@@ -28,18 +28,23 @@ using libebook::EBOOKDocument;
|
|
||||||
|
|
||||||
bool EBookImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator )
|
|
||||||
{
|
|
||||||
+ EBOOKDocument::Type type = EBOOKDocument::TYPE_UNKNOWN;
|
|
||||||
+
|
|
||||||
if (rFilterName == "FictionBook 2")
|
|
||||||
- return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_FICTIONBOOK2);
|
|
||||||
+ type = EBOOKDocument::TYPE_FICTIONBOOK2;
|
|
||||||
else if (rFilterName == "PalmDoc")
|
|
||||||
- return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PALMDOC);
|
|
||||||
+ type = EBOOKDocument::TYPE_PALMDOC;
|
|
||||||
else if (rFilterName == "Plucker eBook")
|
|
||||||
- return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PLUCKER);
|
|
||||||
+ type = EBOOKDocument::TYPE_PLUCKER;
|
|
||||||
else if (rFilterName == "eReader eBook")
|
|
||||||
- return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PEANUTPRESS);
|
|
||||||
+ type = EBOOKDocument::TYPE_PEANUTPRESS;
|
|
||||||
else if (rFilterName == "TealDoc")
|
|
||||||
- return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_TEALDOC);
|
|
||||||
+ type = EBOOKDocument::TYPE_TEALDOC;
|
|
||||||
else if (rFilterName == "zTXT")
|
|
||||||
- return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_ZTXT);
|
|
||||||
+ type = EBOOKDocument::TYPE_ZTXT;
|
|
||||||
+
|
|
||||||
+ if (EBOOKDocument::TYPE_UNKNOWN != type)
|
|
||||||
+ return EBOOKDocument::RESULT_OK == EBOOKDocument::parse(&rInput, &rGenerator, type);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@
|
|||||||
From 5a1b5883e57a61e487d306d8e7c379940d7667d3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
|||||||
From 0ac751a600e77d574aadca9e852040da5d7bbb41 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 13:31:54 +0200
|
|
||||||
Subject: [PATCH 07/18] parse zipped FictionBook 2 files again
|
|
||||||
|
|
||||||
Change-Id: I04eda7844a5557f834f3ada2cef991b0a181c8a0
|
|
||||||
(cherry picked from commit 2ac1d3949c383656e54d54556e52631cf4f45b71)
|
|
||||||
---
|
|
||||||
...01-parse-zipped-FictionBook-2-files-again.patch | 58 ++++++++++++++++++++++
|
|
||||||
external/libebook/UnpackedTarball_libebook.mk | 1 +
|
|
||||||
2 files changed, 59 insertions(+)
|
|
||||||
create mode 100644 external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch
|
|
||||||
|
|
||||||
diff --git a/external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch b/external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d068e79
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch
|
|
||||||
@@ -0,0 +1,58 @@
|
|
||||||
+From 5690c18cb2de1bf4f3cce3da8a2132303a0c731f Mon Sep 17 00:00:00 2001
|
|
||||||
+From: David Tardon <dtardon@redhat.com>
|
|
||||||
+Date: Thu, 29 May 2014 13:30:13 +0200
|
|
||||||
+Subject: [PATCH] parse zipped FictionBook 2 files again
|
|
||||||
+
|
|
||||||
+---
|
|
||||||
+ src/lib/EBOOKDocument.cpp | 28 +++++++++++++++++++++++++++-
|
|
||||||
+ 1 file changed, 27 insertions(+), 1 deletion(-)
|
|
||||||
+
|
|
||||||
+diff --git a/src/lib/EBOOKDocument.cpp b/src/lib/EBOOKDocument.cpp
|
|
||||||
+index 5b8e7ec..c4f9913 100644
|
|
||||||
+--- a/src/lib/EBOOKDocument.cpp
|
|
||||||
++++ b/src/lib/EBOOKDocument.cpp
|
|
||||||
+@@ -427,6 +427,25 @@ EBOOKAPI EBOOKDocument::Confidence EBOOKDocument::isSupported(librevenge::RVNGIn
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ #endif
|
|
||||||
++
|
|
||||||
++ // TODO: This needs improvement: zipped FictionBook 2 files can contain images too...
|
|
||||||
++ if (1 == input->subStreamCount())
|
|
||||||
++ {
|
|
||||||
++ const librevenge::RVNGString name(input->subStreamName(0));
|
|
||||||
++ const unsigned long size = name.size();
|
|
||||||
++ const char *const cName = name.cstr();
|
|
||||||
++ if (equal(cName + (size - 4), cName + size, ".fb2"))
|
|
||||||
++ {
|
|
||||||
++ const scoped_ptr<RVNGInputStream> fb2(input->getSubStreamById(0));
|
|
||||||
++ const Type xmlType = detectXML(fb2.get());
|
|
||||||
++ if (TYPE_FICTIONBOOK2 == xmlType)
|
|
||||||
++ {
|
|
||||||
++ if (type)
|
|
||||||
++ *type = xmlType;
|
|
||||||
++ return CONFIDENCE_EXCELLENT;
|
|
||||||
++ }
|
|
||||||
++ }
|
|
||||||
++ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Confidence confidence = CONFIDENCE_NONE;
|
|
||||||
+@@ -533,7 +552,14 @@ EBOOKAPI EBOOKDocument::Result EBOOKDocument::parse(librevenge::RVNGInputStream
|
|
||||||
+ #endif
|
|
||||||
+ case TYPE_FICTIONBOOK2 :
|
|
||||||
+ {
|
|
||||||
+- FB2Parser parser(input_.get());
|
|
||||||
++ RVNGInputStreamPtr_t fb2Input(input_);
|
|
||||||
++ // TODO: this needs to handle package with images too
|
|
||||||
++ if (input_->isStructured())
|
|
||||||
++ {
|
|
||||||
++ assert(1 == input->subStreamCount());
|
|
||||||
++ fb2Input.reset(input->getSubStreamById(0));
|
|
||||||
++ }
|
|
||||||
++ FB2Parser parser(fb2Input.get());
|
|
||||||
+ return parser.parse(document) ? RESULT_OK : RESULT_UNKNOWN_ERROR;
|
|
||||||
+ }
|
|
||||||
+ #if defined ENABLE_EXPERIMENTAL
|
|
||||||
+--
|
|
||||||
+1.9.3
|
|
||||||
+
|
|
||||||
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
|
|
||||||
index bcc098a..4986981 100644
|
|
||||||
--- a/external/libebook/UnpackedTarball_libebook.mk
|
|
||||||
+++ b/external/libebook/UnpackedTarball_libebook.mk
|
|
||||||
@@ -15,6 +15,7 @@ $(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 \
|
|
||||||
+ external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch \
|
|
||||||
))
|
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From efc4f596de77b8e723883348f13ff22efdba61aa Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From 78c555ce9d94218f74a319829cf88e79e02e1b62 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 13:33:04 +0200
|
|
||||||
Subject: [PATCH 08/18] re-enable libe-book integration test
|
|
||||||
|
|
||||||
Change-Id: I217183d55607f16c3b996b27b131953962afee96
|
|
||||||
(cherry picked from commit 5dfb6e74c68073eb1742c53393c683d5841de255)
|
|
||||||
---
|
|
||||||
writerperfect/qa/unit/WpftWriterFilterTest.cxx | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
|
|
||||||
index 2e60222..8028522 100644
|
|
||||||
--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx
|
|
||||||
+++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
|
|
||||||
@@ -32,7 +32,7 @@ WpftWriterFilterTest::WpftWriterFilterTest()
|
|
||||||
void WpftWriterFilterTest::test()
|
|
||||||
{
|
|
||||||
doTest("com.sun.star.comp.Writer.AbiWordImportFilter", "/writerperfect/qa/unit/data/writer/libabw/");
|
|
||||||
- // doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/writer/libe-book/");
|
|
||||||
+ doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/writer/libe-book/");
|
|
||||||
doTest("com.sun.star.comp.Writer.MSWorksImportFilter", "/writerperfect/qa/unit/data/writer/libwps/");
|
|
||||||
// doTest("com.sun.star.comp.Writer.MWAWImportFilter", "/writerperfect/qa/unit/data/writer/libmwaw/");
|
|
||||||
doTest("com.sun.star.comp.Writer.WordPerfectImportFilter", "/writerperfect/qa/unit/data/writer/libwpd/");
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 4daaa1f5f9c01cdadb9dbde8a646118426d9c5b2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From f43b8775a3d33269367e47ea081979971db85b58 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 15:10:33 +0200
|
|
||||||
Subject: [PATCH 09/18] use the right XML import service
|
|
||||||
|
|
||||||
Change-Id: I45637984f02e3363812ff8c9f0cbd3464786f4de
|
|
||||||
(cherry picked from commit 243e6a98d80ed896686b4486b4e675ffb2cc1f59)
|
|
||||||
---
|
|
||||||
writerperfect/source/impress/KeynoteImportFilter.cxx | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx
|
|
||||||
index 236e5d9..5edbfa9 100644
|
|
||||||
--- a/writerperfect/source/impress/KeynoteImportFilter.cxx
|
|
||||||
+++ b/writerperfect/source/impress/KeynoteImportFilter.cxx
|
|
||||||
@@ -133,7 +133,7 @@ throw (RuntimeException, std::exception)
|
|
||||||
// An XML import service: what we push sax messages to..
|
|
||||||
Reference < XDocumentHandler > xInternalHandler(
|
|
||||||
mxContext->getServiceManager()->createInstanceWithContext(
|
|
||||||
- "com.sun.star.comp.Draw.XMLOasisImporter", mxContext),
|
|
||||||
+ "com.sun.star.comp.Impress.XMLOasisImporter", mxContext),
|
|
||||||
css::uno::UNO_QUERY_THROW);
|
|
||||||
|
|
||||||
// The XImporter sets up an empty target document for XDocumentHandler to write to..
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,743 +0,0 @@
|
|||||||
From c9c8ad017f8e1c0509725f14370e85f7b70024e7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: osnola <alonso@loria.fr>
|
|
||||||
Date: Thu, 29 May 2014 10:26:28 +0200
|
|
||||||
Subject: [PATCH 10/18] Try to add support for WKS/WDB files...
|
|
||||||
|
|
||||||
Change-Id: I0ff1cd35be0e1546a156bc673770a920ad2ca444
|
|
||||||
(cherry picked from commit e1fa08fe92d7d3f89f5f75cb67f17bb491c42361)
|
|
||||||
---
|
|
||||||
Repository.mk | 1 +
|
|
||||||
filter/Configuration_filter.mk | 2 +
|
|
||||||
.../config/fragments/filters/MS_Works_Calc.xcu | 30 ++++
|
|
||||||
.../fragments/types/calc_MS_Works_Document.xcu | 29 ++++
|
|
||||||
writerperfect/Library_wpftcalc.mk | 56 +++++++
|
|
||||||
writerperfect/Module_writerperfect.mk | 1 +
|
|
||||||
writerperfect/source/calc/ImportFilterBase.cxx | 182 +++++++++++++++++++++
|
|
||||||
writerperfect/source/calc/ImportFilterBase.hxx | 103 ++++++++++++
|
|
||||||
.../source/calc/MSWorksCalcImportFilter.cxx | 91 +++++++++++
|
|
||||||
.../source/calc/MSWorksCalcImportFilter.hxx | 53 ++++++
|
|
||||||
writerperfect/source/calc/wpftcalc.component | 16 ++
|
|
||||||
.../source/calc/wpftcalc_genericfilter.cxx | 51 ++++++
|
|
||||||
12 files changed, 615 insertions(+)
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/MS_Works_Calc.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/calc_MS_Works_Document.xcu
|
|
||||||
create mode 100644 writerperfect/Library_wpftcalc.mk
|
|
||||||
create mode 100644 writerperfect/source/calc/ImportFilterBase.cxx
|
|
||||||
create mode 100644 writerperfect/source/calc/ImportFilterBase.hxx
|
|
||||||
create mode 100644 writerperfect/source/calc/MSWorksCalcImportFilter.cxx
|
|
||||||
create mode 100644 writerperfect/source/calc/MSWorksCalcImportFilter.hxx
|
|
||||||
create mode 100644 writerperfect/source/calc/wpftcalc.component
|
|
||||||
create mode 100644 writerperfect/source/calc/wpftcalc_genericfilter.cxx
|
|
||||||
|
|
||||||
diff --git a/Repository.mk b/Repository.mk
|
|
||||||
index 1e6745a..700d9f5 100644
|
|
||||||
--- a/Repository.mk
|
|
||||||
+++ b/Repository.mk
|
|
||||||
@@ -162,6 +162,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \
|
|
||||||
scd \
|
|
||||||
scfilt \
|
|
||||||
scui \
|
|
||||||
+ wpftcalc \
|
|
||||||
$(if $(ENABLE_OPENCL),scopencl) \
|
|
||||||
$(if $(ENABLE_COINMP)$(ENABLE_LPSOLVE),solver) \
|
|
||||||
$(if $(DISABLE_SCRIPTING),,vbaobj) \
|
|
||||||
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
|
|
||||||
index 9783f50..ebd9bf2 100644
|
|
||||||
--- a/filter/Configuration_filter.mk
|
|
||||||
+++ b/filter/Configuration_filter.mk
|
|
||||||
@@ -537,6 +537,7 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,filter/s
|
|
||||||
MS_Excel_2007_Binary \
|
|
||||||
calc_OOXML \
|
|
||||||
calc_OOXML_Template \
|
|
||||||
+ calc_MS_Works_Document \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.xcu,filter/source/config/fragments/filters,\
|
|
||||||
@@ -568,6 +569,7 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.xcu,filt
|
|
||||||
calc_MS_Excel_2007_Binary \
|
|
||||||
calc_OOXML \
|
|
||||||
calc_OOXML_Template \
|
|
||||||
+ MS_Works_Calc \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fragments/filters,\
|
|
||||||
diff --git a/filter/source/config/fragments/filters/MS_Works_Calc.xcu b/filter/source/config/fragments/filters/MS_Works_Calc.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..a8222a7
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/MS_Works_Calc.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="MS_Works_Calc" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Calc.MSWorksCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">Microsoft Works Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>calc_MS_Works_Document</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_MS_Works_Document.xcu b/filter/source/config/fragments/types/calc_MS_Works_Document.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d409be8
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_MS_Works_Document.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="calc_MS_Works_Document" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Calc.MSWorksCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>MS_Works_Calc</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>Microsoft Works Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/writerperfect/Library_wpftcalc.mk b/writerperfect/Library_wpftcalc.mk
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..2e69c3b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/Library_wpftcalc.mk
|
|
||||||
@@ -0,0 +1,56 @@
|
|
||||||
+# -*- 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/.
|
|
||||||
+#
|
|
||||||
+# This file incorporates work covered by the following license notice:
|
|
||||||
+#
|
|
||||||
+# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+# contributor license agreements. See the NOTICE file distributed
|
|
||||||
+# with this work for additional information regarding copyright
|
|
||||||
+# ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+# License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+# except in compliance with the License. You may obtain a copy of
|
|
||||||
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+#
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_Library_Library,wpftcalc))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_Library_set_componentfile,wpftcalc,writerperfect/source/calc/wpftcalc))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_Library_use_sdk_api,wpftcalc))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_Library_use_libraries,wpftcalc,\
|
|
||||||
+ comphelper \
|
|
||||||
+ cppu \
|
|
||||||
+ cppuhelper \
|
|
||||||
+ sal \
|
|
||||||
+ sot \
|
|
||||||
+ tl \
|
|
||||||
+ utl \
|
|
||||||
+ writerperfect \
|
|
||||||
+ xo \
|
|
||||||
+ $(gb_UWINAPI) \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_Library_use_externals,wpftcalc,\
|
|
||||||
+ odfgen \
|
|
||||||
+ revenge \
|
|
||||||
+ wps \
|
|
||||||
+ zlib \
|
|
||||||
+ lcms2 \
|
|
||||||
+ libxml2 \
|
|
||||||
+ icui18n \
|
|
||||||
+ icuuc \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_Library_add_exception_objects,wpftcalc,\
|
|
||||||
+ writerperfect/source/calc/ImportFilterBase \
|
|
||||||
+ writerperfect/source/calc/MSWorksCalcImportFilter \
|
|
||||||
+ writerperfect/source/calc/wpftcalc_genericfilter \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
+# vim: set noet sw=4 ts=4:
|
|
||||||
diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk
|
|
||||||
index 24decb4..37da37c 100644
|
|
||||||
--- a/writerperfect/Module_writerperfect.mk
|
|
||||||
+++ b/writerperfect/Module_writerperfect.mk
|
|
||||||
@@ -20,6 +20,7 @@
|
|
||||||
$(eval $(call gb_Module_Module,writerperfect))
|
|
||||||
|
|
||||||
$(eval $(call gb_Module_add_targets,writerperfect,\
|
|
||||||
+ Library_wpftcalc \
|
|
||||||
Library_wpftdraw \
|
|
||||||
Library_wpftimpress \
|
|
||||||
Library_wpftwriter \
|
|
||||||
diff --git a/writerperfect/source/calc/ImportFilterBase.cxx b/writerperfect/source/calc/ImportFilterBase.cxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..ef36746
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/calc/ImportFilterBase.cxx
|
|
||||||
@@ -0,0 +1,182 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/*
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <com/sun/star/beans/PropertyValue.hpp>
|
|
||||||
+#include <com/sun/star/io/XInputStream.hpp>
|
|
||||||
+#include <com/sun/star/uno/XComponentContext.hpp>
|
|
||||||
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
|
|
||||||
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
|
|
||||||
+#include <com/sun/star/xml/sax/InputSource.hpp>
|
|
||||||
+#include <com/sun/star/xml/sax/XParser.hpp>
|
|
||||||
+#include <com/sun/star/io/XSeekable.hpp>
|
|
||||||
+#include <com/sun/star/uno/Reference.h>
|
|
||||||
+
|
|
||||||
+#include <writerperfect/DocumentHandler.hxx>
|
|
||||||
+#include <writerperfect/WPXSvInputStream.hxx>
|
|
||||||
+
|
|
||||||
+#include <xmloff/attrlist.hxx>
|
|
||||||
+
|
|
||||||
+#include <libodfgen/libodfgen.hxx>
|
|
||||||
+
|
|
||||||
+#include "ImportFilterBase.hxx"
|
|
||||||
+
|
|
||||||
+namespace writerperfect
|
|
||||||
+{
|
|
||||||
+namespace calc
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+using com::sun::star::uno::Reference;
|
|
||||||
+using com::sun::star::io::XInputStream;
|
|
||||||
+using com::sun::star::io::XSeekable;
|
|
||||||
+using com::sun::star::uno::Sequence;
|
|
||||||
+using com::sun::star::uno::Any;
|
|
||||||
+using com::sun::star::uno::UNO_QUERY;
|
|
||||||
+using com::sun::star::uno::XInterface;
|
|
||||||
+using com::sun::star::uno::Exception;
|
|
||||||
+using com::sun::star::uno::RuntimeException;
|
|
||||||
+using com::sun::star::beans::PropertyValue;
|
|
||||||
+using com::sun::star::document::XFilter;
|
|
||||||
+using com::sun::star::document::XExtendedFilterDetection;
|
|
||||||
+using com::sun::star::document::XImporter;
|
|
||||||
+using com::sun::star::xml::sax::InputSource;
|
|
||||||
+using com::sun::star::xml::sax::XAttributeList;
|
|
||||||
+using com::sun::star::xml::sax::XDocumentHandler;
|
|
||||||
+using com::sun::star::xml::sax::XParser;
|
|
||||||
+
|
|
||||||
+using writerperfect::DocumentHandler;
|
|
||||||
+using writerperfect::WPXSvInputStream;
|
|
||||||
+
|
|
||||||
+ImportFilterImpl::ImportFilterImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
|
|
||||||
+ : mxContext( rxContext )
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+ImportFilterImpl::~ImportFilterImpl()
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+sal_Bool SAL_CALL ImportFilterImpl::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ sal_Int32 nLength = aDescriptor.getLength();
|
|
||||||
+ const PropertyValue *pValue = aDescriptor.getConstArray();
|
|
||||||
+ Reference < XInputStream > xInputStream;
|
|
||||||
+ for ( sal_Int32 i = 0 ; i < nLength; i++)
|
|
||||||
+ {
|
|
||||||
+ if ( pValue[i].Name == "InputStream" )
|
|
||||||
+ pValue[i].Value >>= xInputStream;
|
|
||||||
+ }
|
|
||||||
+ if ( !xInputStream.is() )
|
|
||||||
+ {
|
|
||||||
+ OSL_ASSERT( false );
|
|
||||||
+ return sal_False;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // An XML import service: what we push sax messages to..
|
|
||||||
+ Reference < XDocumentHandler > xInternalHandler(
|
|
||||||
+ mxContext->getServiceManager()->createInstanceWithContext(
|
|
||||||
+ "com.sun.star.comp.Calc.XMLOasisImporter", mxContext),
|
|
||||||
+ css::uno::UNO_QUERY_THROW);
|
|
||||||
+
|
|
||||||
+ // The XImporter sets up an empty target document for XDocumentHandler to write to..
|
|
||||||
+ Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
|
|
||||||
+ xImporter->setTargetDocument( mxDoc );
|
|
||||||
+
|
|
||||||
+ // OO Graphics Handler: abstract class to handle document SAX messages, concrete implementation here
|
|
||||||
+ // writes to in-memory target doc
|
|
||||||
+ DocumentHandler xHandler(xInternalHandler);
|
|
||||||
+
|
|
||||||
+ WPXSvInputStream input( xInputStream );
|
|
||||||
+
|
|
||||||
+ OdsGenerator exporter;
|
|
||||||
+ exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML);
|
|
||||||
+
|
|
||||||
+ doRegisterHandlers(exporter);
|
|
||||||
+
|
|
||||||
+ return doImportDocument(input, exporter);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void SAL_CALL ImportFilterImpl::cancel( )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// XImporter
|
|
||||||
+void SAL_CALL ImportFilterImpl::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
|
|
||||||
+throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ mxDoc = xDoc;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// XExtendedFilterDetection
|
|
||||||
+OUString SAL_CALL ImportFilterImpl::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
|
|
||||||
+throw( com::sun::star::uno::RuntimeException, std::exception )
|
|
||||||
+{
|
|
||||||
+ OUString sTypeName;
|
|
||||||
+ sal_Int32 nLength = Descriptor.getLength();
|
|
||||||
+ sal_Int32 location = nLength;
|
|
||||||
+ const PropertyValue *pValue = Descriptor.getConstArray();
|
|
||||||
+ Reference < XInputStream > xInputStream;
|
|
||||||
+ for ( sal_Int32 i = 0 ; i < nLength; i++)
|
|
||||||
+ {
|
|
||||||
+ if ( pValue[i].Name == "TypeName" )
|
|
||||||
+ location=i;
|
|
||||||
+ else if ( pValue[i].Name == "InputStream" )
|
|
||||||
+ pValue[i].Value >>= xInputStream;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!xInputStream.is())
|
|
||||||
+ return OUString();
|
|
||||||
+
|
|
||||||
+ WPXSvInputStream input( xInputStream );
|
|
||||||
+
|
|
||||||
+ if ( doDetectFormat( input, sTypeName ) )
|
|
||||||
+ {
|
|
||||||
+ assert (!sTypeName.isEmpty());
|
|
||||||
+
|
|
||||||
+ if ( location == nLength )
|
|
||||||
+ {
|
|
||||||
+ Descriptor.realloc(nLength+1);
|
|
||||||
+ Descriptor[location].Name = "TypeName";
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ Descriptor[location].Value <<=sTypeName;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return sTypeName;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+// XInitialization
|
|
||||||
+void SAL_CALL ImportFilterImpl::initialize( const Sequence< Any >& aArguments )
|
|
||||||
+throw (Exception, RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ Sequence < PropertyValue > aAnySeq;
|
|
||||||
+ sal_Int32 nLength = aArguments.getLength();
|
|
||||||
+ if ( nLength && ( aArguments[0] >>= aAnySeq ) )
|
|
||||||
+ {
|
|
||||||
+ const PropertyValue *pValue = aAnySeq.getConstArray();
|
|
||||||
+ nLength = aAnySeq.getLength();
|
|
||||||
+ for ( sal_Int32 i = 0 ; i < nLength; i++)
|
|
||||||
+ {
|
|
||||||
+ if ( pValue[i].Name == "Type" )
|
|
||||||
+ {
|
|
||||||
+ pValue[i].Value >>= msFilterName;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void ImportFilterImpl::doRegisterHandlers( OdsGenerator & )
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
diff --git a/writerperfect/source/calc/ImportFilterBase.hxx b/writerperfect/source/calc/ImportFilterBase.hxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d6ef454
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/calc/ImportFilterBase.hxx
|
|
||||||
@@ -0,0 +1,103 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/*
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef INCLUDED_WRITERPERFECT_SOURCE_CALC_IMPORTFILTERBASE_HXX
|
|
||||||
+#define INCLUDED_WRITERPERFECT_SOURCE_CALC_IMPORTFILTERBASE_HXX
|
|
||||||
+
|
|
||||||
+#include <librevenge/librevenge.h>
|
|
||||||
+
|
|
||||||
+#include <librevenge-stream/librevenge-stream.h>
|
|
||||||
+
|
|
||||||
+#include <com/sun/star/document/XFilter.hpp>
|
|
||||||
+#include <com/sun/star/document/XImporter.hpp>
|
|
||||||
+#include <com/sun/star/document/XExtendedFilterDetection.hpp>
|
|
||||||
+#include <com/sun/star/lang/XInitialization.hpp>
|
|
||||||
+#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
||||||
+#include <cppuhelper/implbase1.hxx>
|
|
||||||
+#include <cppuhelper/implbase4.hxx>
|
|
||||||
+
|
|
||||||
+namespace com { namespace sun { namespace star {
|
|
||||||
+namespace beans
|
|
||||||
+{
|
|
||||||
+ struct PropertyValue;
|
|
||||||
+}
|
|
||||||
+namespace lang
|
|
||||||
+{
|
|
||||||
+ class XComponent;
|
|
||||||
+}
|
|
||||||
+namespace uno
|
|
||||||
+{
|
|
||||||
+ class XComponentContext;
|
|
||||||
+}
|
|
||||||
+namespace xml { namespace sax {
|
|
||||||
+ class XDocumentHandler;
|
|
||||||
+}
|
|
||||||
+}
|
|
||||||
+} } }
|
|
||||||
+
|
|
||||||
+class OdsGenerator;
|
|
||||||
+
|
|
||||||
+namespace writerperfect
|
|
||||||
+{
|
|
||||||
+namespace calc
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+/* This component will be instantiated for both import or export. Whether it calls
|
|
||||||
+ * setSourceDocument or setTargetDocument determines which Impl function the filter
|
|
||||||
+ * member calls */
|
|
||||||
+class ImportFilterImpl : public cppu::WeakImplHelper4
|
|
||||||
+ <
|
|
||||||
+ com::sun::star::document::XFilter,
|
|
||||||
+ com::sun::star::document::XImporter,
|
|
||||||
+ com::sun::star::document::XExtendedFilterDetection,
|
|
||||||
+ com::sun::star::lang::XInitialization
|
|
||||||
+ >
|
|
||||||
+{
|
|
||||||
+public:
|
|
||||||
+ ImportFilterImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
|
|
||||||
+ virtual ~ImportFilterImpl();
|
|
||||||
+
|
|
||||||
+ // XFilter
|
|
||||||
+ virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+ virtual void SAL_CALL cancel( )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+
|
|
||||||
+ // XImporter
|
|
||||||
+ virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
|
|
||||||
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+
|
|
||||||
+ //XExtendedFilterDetection
|
|
||||||
+ virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
|
|
||||||
+ throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
|
|
||||||
+
|
|
||||||
+ // XInitialization
|
|
||||||
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
|
|
||||||
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+
|
|
||||||
+private:
|
|
||||||
+ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) = 0;
|
|
||||||
+ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator ) = 0;
|
|
||||||
+ virtual void doRegisterHandlers( OdsGenerator &rGenerator );
|
|
||||||
+
|
|
||||||
+private:
|
|
||||||
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
|
|
||||||
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
|
|
||||||
+ OUString msFilterName;
|
|
||||||
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/** A base class for import filters.
|
|
||||||
+ */
|
|
||||||
+typedef cppu::ImplInheritanceHelper1<ImportFilterImpl, com::sun::star::lang::XServiceInfo> ImportFilterBase;
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#endif // INCLUDED_WRITERPERFECT_SOURCE_CALC_IMPORTFILTERBASE_HXX
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..1c38f4c
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
|
|
||||||
@@ -0,0 +1,91 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/* MSWorksCalcImportFilter: Sets up the filter, and calls DocumentCollector
|
|
||||||
+ * to do the actual filtering
|
|
||||||
+ *
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <com/sun/star/uno/Reference.h>
|
|
||||||
+#include <cppuhelper/supportsservice.hxx>
|
|
||||||
+
|
|
||||||
+#include <libwps/libwps.h>
|
|
||||||
+
|
|
||||||
+#include "MSWorksCalcImportFilter.hxx"
|
|
||||||
+
|
|
||||||
+using com::sun::star::uno::Sequence;
|
|
||||||
+using com::sun::star::uno::Reference;
|
|
||||||
+using com::sun::star::uno::Any;
|
|
||||||
+using com::sun::star::uno::XInterface;
|
|
||||||
+using com::sun::star::uno::Exception;
|
|
||||||
+using com::sun::star::uno::RuntimeException;
|
|
||||||
+using com::sun::star::uno::XComponentContext;
|
|
||||||
+
|
|
||||||
+bool MSWorksCalcImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator )
|
|
||||||
+{
|
|
||||||
+ return libwps::WPS_OK == libwps::WPSDocument::parse(&rInput, &rGenerator);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+bool MSWorksCalcImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
|
|
||||||
+{
|
|
||||||
+ libwps::WPSKind kind = libwps::WPS_TEXT;
|
|
||||||
+ const libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&rInput, kind);
|
|
||||||
+
|
|
||||||
+ if ((kind == libwps::WPS_SPREADSHEET || kind == libwps::WPS_DATABASE) && (confidence == libwps::WPS_CONFIDENCE_EXCELLENT))
|
|
||||||
+ {
|
|
||||||
+ rTypeName = "calc_MS_Works_Document";
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return false;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void MSWorksCalcImportFilter::doRegisterHandlers( OdsGenerator & )
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+OUString MSWorksCalcImportFilter_getImplementationName ()
|
|
||||||
+throw (RuntimeException)
|
|
||||||
+{
|
|
||||||
+ return OUString ( "com.sun.star.comp.Calc.MSWorksCalcImportFilter" );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+Sequence< OUString > SAL_CALL MSWorksCalcImportFilter_getSupportedServiceNames( )
|
|
||||||
+throw (RuntimeException)
|
|
||||||
+{
|
|
||||||
+ Sequence < OUString > aRet(2);
|
|
||||||
+ OUString *pArray = aRet.getArray();
|
|
||||||
+ pArray[0] = "com.sun.star.document.ImportFilter";
|
|
||||||
+ pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
|
|
||||||
+ return aRet;
|
|
||||||
+}
|
|
||||||
+#undef SERVICE_NAME2
|
|
||||||
+#undef SERVICE_NAME1
|
|
||||||
+
|
|
||||||
+Reference< XInterface > SAL_CALL MSWorksCalcImportFilter_createInstance( const Reference< XComponentContext > & rContext)
|
|
||||||
+throw( Exception )
|
|
||||||
+{
|
|
||||||
+ return (cppu::OWeakObject *) new MSWorksCalcImportFilter( rContext );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// XServiceInfo
|
|
||||||
+OUString SAL_CALL MSWorksCalcImportFilter::getImplementationName( )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return MSWorksCalcImportFilter_getImplementationName();
|
|
||||||
+}
|
|
||||||
+sal_Bool SAL_CALL MSWorksCalcImportFilter::supportsService( const OUString &rServiceName )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return cppu::supportsService( this, rServiceName );
|
|
||||||
+}
|
|
||||||
+Sequence< OUString > SAL_CALL MSWorksCalcImportFilter::getSupportedServiceNames( )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return MSWorksCalcImportFilter_getSupportedServiceNames();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.hxx b/writerperfect/source/calc/MSWorksCalcImportFilter.hxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..2487c50
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.hxx
|
|
||||||
@@ -0,0 +1,53 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/*
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef _MSWORKSCALCIMPORTFILTER_HXX
|
|
||||||
+#define _MSWORKSCALCIMPORTFILTER_HXX
|
|
||||||
+
|
|
||||||
+#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
||||||
+#include <com/sun/star/uno/XComponentContext.hpp>
|
|
||||||
+
|
|
||||||
+#include "ImportFilterBase.hxx"
|
|
||||||
+
|
|
||||||
+/* This component will be instantiated for both import or export. Whether it calls
|
|
||||||
+ * setSourceDocument or setTargetDocument determines which Impl function the filter
|
|
||||||
+ * member calls */
|
|
||||||
+class MSWorksCalcImportFilter : public writerperfect::calc::ImportFilterBase
|
|
||||||
+{
|
|
||||||
+public:
|
|
||||||
+ MSWorksCalcImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
|
|
||||||
+ : writerperfect::calc::ImportFilterBase( rxContext ) {}
|
|
||||||
+
|
|
||||||
+ // XServiceInfo
|
|
||||||
+ virtual OUString SAL_CALL getImplementationName( )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+ virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+
|
|
||||||
+private:
|
|
||||||
+ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
|
|
||||||
+ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator ) SAL_OVERRIDE;
|
|
||||||
+ virtual void doRegisterHandlers( OdsGenerator &rGenerator ) SAL_OVERRIDE;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+OUString MSWorksCalcImportFilter_getImplementationName()
|
|
||||||
+throw ( ::com::sun::star::uno::RuntimeException );
|
|
||||||
+
|
|
||||||
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MSWorksCalcImportFilter_getSupportedServiceNames( )
|
|
||||||
+throw ( ::com::sun::star::uno::RuntimeException );
|
|
||||||
+
|
|
||||||
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
|
|
||||||
+SAL_CALL MSWorksCalcImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
|
|
||||||
+throw ( ::com::sun::star::uno::Exception );
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
diff --git a/writerperfect/source/calc/wpftcalc.component b/writerperfect/source/calc/wpftcalc.component
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..c2def1e
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/calc/wpftcalc.component
|
|
||||||
@@ -0,0 +1,16 @@
|
|
||||||
+<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
|
||||||
+ prefix="wpftcalc" xmlns="http://openoffice.org/2010/uno-components">
|
|
||||||
+ <implementation name="com.sun.star.comp.Calc.MSWorksCalcImportFilter">
|
|
||||||
+ <service name="com.sun.star.document.ImportFilter"/>
|
|
||||||
+ <service name="com.sun.star.document.ExtendedTypeDetection"/>
|
|
||||||
+ </implementation>
|
|
||||||
+</component>
|
|
||||||
diff --git a/writerperfect/source/calc/wpftcalc_genericfilter.cxx b/writerperfect/source/calc/wpftcalc_genericfilter.cxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..eecd0b0
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/calc/wpftcalc_genericfilter.cxx
|
|
||||||
@@ -0,0 +1,51 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/*
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/* genericfilter: mostly generic code for registering the filter */
|
|
||||||
+
|
|
||||||
+/* "This product is not manufactured, approved, or supported by
|
|
||||||
+ * Corel Corporation or Corel Corporation Limited."
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include "sal/config.h"
|
|
||||||
+
|
|
||||||
+#include "cppuhelper/factory.hxx"
|
|
||||||
+#include "cppuhelper/implementationentry.hxx"
|
|
||||||
+#include "sal/types.h"
|
|
||||||
+
|
|
||||||
+#include "MSWorksCalcImportFilter.hxx"
|
|
||||||
+
|
|
||||||
+namespace {
|
|
||||||
+
|
|
||||||
+static cppu::ImplementationEntry const services[] = {
|
|
||||||
+ { &MSWorksCalcImportFilter_createInstance, &MSWorksCalcImportFilter_getImplementationName,
|
|
||||||
+ &MSWorksCalcImportFilter_getSupportedServiceNames,
|
|
||||||
+ &cppu::createSingleComponentFactory, 0, 0 },
|
|
||||||
+ { 0, 0, 0, 0, 0, 0 } };
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL wpftcalc_component_getFactory(
|
|
||||||
+ char const * pImplName, void * pServiceManager, void * pRegistryKey)
|
|
||||||
+{
|
|
||||||
+ return cppu::component_getFactoryHelper(
|
|
||||||
+ pImplName, pServiceManager, pRegistryKey, services);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
|||||||
From 0dca001fd4cb1397137ae0e217950494bb86d6c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: osnola <alonso@loria.fr>
|
|
||||||
Date: Thu, 29 May 2014 14:29:45 +0200
|
|
||||||
Subject: [PATCH 11/18] Make the wdb/wks and GreatWorks(draw) work
|
|
||||||
|
|
||||||
Change-Id: I1a736a511e6007a4ed6413eb8d9b8e364d73f765
|
|
||||||
(cherry picked from commit eccfc72781dfa485c94b251e81718bdddd544606)
|
|
||||||
---
|
|
||||||
filter/source/config/fragments/filters/Great_Works_Draw.xcu | 2 +-
|
|
||||||
filter/source/config/fragments/types/calc_MS_Works_Document.xcu | 4 ++--
|
|
||||||
postprocess/Rdb_services.mk | 1 +
|
|
||||||
3 files changed, 4 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Great_Works_Draw.xcu b/filter/source/config/fragments/filters/Great_Works_Draw.xcu
|
|
||||||
index 4bb0667..8153102 100644
|
|
||||||
--- a/filter/source/config/fragments/filters/Great_Works_Draw.xcu
|
|
||||||
+++ b/filter/source/config/fragments/filters/Great_Works_Draw.xcu
|
|
||||||
@@ -12,7 +12,7 @@
|
|
||||||
<value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="FilterService">
|
|
||||||
- <value>com.sun.star.comp.Draaw.MWAWDrawImportFilter</value>
|
|
||||||
+ <value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value>
|
|
||||||
</prop>
|
|
||||||
<prop oor:name="UIName">
|
|
||||||
<value xml:lang="en-US">GreatWorks Document</value>
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_MS_Works_Document.xcu b/filter/source/config/fragments/types/calc_MS_Works_Document.xcu
|
|
||||||
index d409be8..8785a32 100644
|
|
||||||
--- a/filter/source/config/fragments/types/calc_MS_Works_Document.xcu
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_MS_Works_Document.xcu
|
|
||||||
@@ -18,8 +18,8 @@
|
|
||||||
<node oor:name="calc_MS_Works_Document" oor:op="replace" >
|
|
||||||
<prop oor:name="DetectService"><value>com.sun.star.comp.Calc.MSWorksCalcImportFilter</value></prop>
|
|
||||||
<prop oor:name="URLPattern"/>
|
|
||||||
- <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
- <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Extensions"><value>wks/wdb</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"></prop>
|
|
||||||
<prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
<prop oor:name="PreferredFilter"><value>MS_Works_Calc</value></prop>
|
|
||||||
<prop oor:name="UIName">
|
|
||||||
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
|
|
||||||
index 9ebe6d2..a1fe9bc 100644
|
|
||||||
--- a/postprocess/Rdb_services.mk
|
|
||||||
+++ b/postprocess/Rdb_services.mk
|
|
||||||
@@ -120,6 +120,7 @@ $(eval $(call gb_Rdb_add_components,services,\
|
|
||||||
writerperfect/source/draw/wpftdraw \
|
|
||||||
writerperfect/source/impress/wpftimpress \
|
|
||||||
writerperfect/source/writer/wpftwriter \
|
|
||||||
+ writerperfect/source/calc/wpftcalc \
|
|
||||||
$(if $(filter MACOSX,$(OS)), \
|
|
||||||
$(if $(filter 1060,$(MACOSX_SDK_VERSION)),, \
|
|
||||||
$(call gb_Helper_optional,AVMEDIA,avmedia/source/macavf/avmediaMacAVF) \
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,146 +0,0 @@
|
|||||||
From 6a79c9ce401e98c4fa90a870ed29770db3f9f9e2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 15:35:15 +0200
|
|
||||||
Subject: [PATCH 12/18] add writerperfect calc integration test
|
|
||||||
|
|
||||||
Change-Id: I3ce072f5f7d54b063988f8413251eab00f5321e4
|
|
||||||
(cherry picked from commit b6ea5de5eda77fa1bb0b7ee8248f001d58bae6be)
|
|
||||||
---
|
|
||||||
writerperfect/CppunitTest_writerperfect_calc.mk | 46 ++++++++++++++++++++++
|
|
||||||
writerperfect/Module_writerperfect.mk | 1 +
|
|
||||||
writerperfect/qa/unit/WpftCalcFilterTest.cxx | 43 ++++++++++++++++++++
|
|
||||||
.../qa/unit/data/calc/libwps/fail/.gitignore | 0
|
|
||||||
.../unit/data/calc/libwps/indeterminate/.gitignore | 0
|
|
||||||
.../qa/unit/data/calc/libwps/pass/.gitignore | 0
|
|
||||||
6 files changed, 90 insertions(+)
|
|
||||||
create mode 100644 writerperfect/CppunitTest_writerperfect_calc.mk
|
|
||||||
create mode 100644 writerperfect/qa/unit/WpftCalcFilterTest.cxx
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/calc/libwps/fail/.gitignore
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/calc/libwps/indeterminate/.gitignore
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/calc/libwps/pass/.gitignore
|
|
||||||
|
|
||||||
diff --git a/writerperfect/CppunitTest_writerperfect_calc.mk b/writerperfect/CppunitTest_writerperfect_calc.mk
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..1a05595
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/CppunitTest_writerperfect_calc.mk
|
|
||||||
@@ -0,0 +1,46 @@
|
|
||||||
+# -*- 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_CppunitTest_CppunitTest,writerperfect_calc))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_CppunitTest_use_externals,writerperfect_calc,\
|
|
||||||
+ boost_headers \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_CppunitTest_use_api,writerperfect_calc,\
|
|
||||||
+ offapi \
|
|
||||||
+ udkapi \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_CppunitTest_use_libraries,writerperfect_calc,\
|
|
||||||
+ comphelper \
|
|
||||||
+ cppu \
|
|
||||||
+ cppuhelper \
|
|
||||||
+ sal \
|
|
||||||
+ test \
|
|
||||||
+ ucbhelper \
|
|
||||||
+ unotest \
|
|
||||||
+ $(gb_UWINAPI) \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_CppunitTest_use_static_libraries,writerperfect_calc,\
|
|
||||||
+ writerperfect_importtestbase \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_CppunitTest_use_ure,writerperfect_calc))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_CppunitTest_use_rdb,writerperfect_calc,services))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_CppunitTest_use_configuration,writerperfect_calc))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_CppunitTest_add_exception_objects,writerperfect_calc,\
|
|
||||||
+ writerperfect/qa/unit/WpftCalcFilterTest \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
+# vim: set noet sw=4 ts=4:
|
|
||||||
diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk
|
|
||||||
index 37da37c..9c30697 100644
|
|
||||||
--- a/writerperfect/Module_writerperfect.mk
|
|
||||||
+++ b/writerperfect/Module_writerperfect.mk
|
|
||||||
@@ -32,6 +32,7 @@ $(eval $(call gb_Module_add_check_targets,writerperfect,\
|
|
||||||
))
|
|
||||||
|
|
||||||
$(eval $(call gb_Module_add_slowcheck_targets,writerperfect,\
|
|
||||||
+ CppunitTest_writerperfect_calc \
|
|
||||||
CppunitTest_writerperfect_draw \
|
|
||||||
CppunitTest_writerperfect_impress \
|
|
||||||
CppunitTest_writerperfect_writer \
|
|
||||||
diff --git a/writerperfect/qa/unit/WpftCalcFilterTest.cxx b/writerperfect/qa/unit/WpftCalcFilterTest.cxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..ba1ed1e
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/qa/unit/WpftCalcFilterTest.cxx
|
|
||||||
@@ -0,0 +1,43 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/*
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include "WpftImportTestBase.hxx"
|
|
||||||
+
|
|
||||||
+namespace
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+class WpftCalcFilterTest : public writerperfect::test::WpftImportTestBase
|
|
||||||
+{
|
|
||||||
+public:
|
|
||||||
+ WpftCalcFilterTest();
|
|
||||||
+
|
|
||||||
+ void test();
|
|
||||||
+
|
|
||||||
+ CPPUNIT_TEST_SUITE(WpftCalcFilterTest);
|
|
||||||
+ CPPUNIT_TEST(test);
|
|
||||||
+ CPPUNIT_TEST_SUITE_END();
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+WpftCalcFilterTest::WpftCalcFilterTest()
|
|
||||||
+ : writerperfect::test::WpftImportTestBase("private:factory/scalc")
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void WpftCalcFilterTest::test()
|
|
||||||
+{
|
|
||||||
+ doTest("com.sun.star.comp.Calc.MSWorksCalcImportFilter", "/writerperfect/qa/unit/data/calc/libwps/");
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+CPPUNIT_TEST_SUITE_REGISTRATION(WpftCalcFilterTest);
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+CPPUNIT_PLUGIN_IMPLEMENT();
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
diff --git a/writerperfect/qa/unit/data/calc/libwps/fail/.gitignore b/writerperfect/qa/unit/data/calc/libwps/fail/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
diff --git a/writerperfect/qa/unit/data/calc/libwps/indeterminate/.gitignore b/writerperfect/qa/unit/data/calc/libwps/indeterminate/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
diff --git a/writerperfect/qa/unit/data/calc/libwps/pass/.gitignore b/writerperfect/qa/unit/data/calc/libwps/pass/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,810 +0,0 @@
|
|||||||
From 9954bf0938e34361d4d785c4109de303d422a8c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: osnola <alonso@loria.fr>
|
|
||||||
Date: Thu, 29 May 2014 15:35:18 +0200
|
|
||||||
Subject: [PATCH 13/18] Add new libmwaw's database/spreadsheet formats...
|
|
||||||
|
|
||||||
Change-Id: If07a9e548e1db15b403126263f63d9d09575eb95
|
|
||||||
(cherry picked from commit 696c8edf7a7731ea4e0f3e4ec4dfeadac2f8ffad)
|
|
||||||
---
|
|
||||||
filter/Configuration_filter.mk | 12 ++
|
|
||||||
.../config/fragments/filters/Beagle_Works_Calc.xcu | 29 ++++
|
|
||||||
.../config/fragments/filters/ClarisWorks_Calc.xcu | 30 ++++
|
|
||||||
.../fragments/filters/Claris_Resolve_Calc.xcu | 30 ++++
|
|
||||||
.../config/fragments/filters/Great_Works_Calc.xcu | 29 ++++
|
|
||||||
.../config/fragments/filters/Mac_Wingz_Calc.xcu | 30 ++++
|
|
||||||
.../config/fragments/filters/Mac_Works_Calc.xcu | 30 ++++
|
|
||||||
.../config/fragments/types/calc_Beagle_Works.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/calc_ClarisWorks.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/calc_Claris_Resolve.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/calc_Great_Works.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/calc_Mac_Wingz.xcu | 29 ++++
|
|
||||||
.../config/fragments/types/calc_Mac_Works.xcu | 29 ++++
|
|
||||||
writerperfect/Library_wpftcalc.mk | 2 +
|
|
||||||
writerperfect/source/calc/MWAWCalcImportFilter.cxx | 191 +++++++++++++++++++++
|
|
||||||
writerperfect/source/calc/MWAWCalcImportFilter.hxx | 53 ++++++
|
|
||||||
writerperfect/source/calc/wpftcalc.component | 4 +
|
|
||||||
.../source/calc/wpftcalc_genericfilter.cxx | 4 +
|
|
||||||
18 files changed, 618 insertions(+)
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/Beagle_Works_Calc.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/ClarisWorks_Calc.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/Claris_Resolve_Calc.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/Great_Works_Calc.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/Mac_Wingz_Calc.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/filters/Mac_Works_Calc.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/calc_Beagle_Works.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/calc_ClarisWorks.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/calc_Claris_Resolve.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/calc_Great_Works.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/calc_Mac_Wingz.xcu
|
|
||||||
create mode 100644 filter/source/config/fragments/types/calc_Mac_Works.xcu
|
|
||||||
create mode 100644 writerperfect/source/calc/MWAWCalcImportFilter.cxx
|
|
||||||
create mode 100644 writerperfect/source/calc/MWAWCalcImportFilter.hxx
|
|
||||||
|
|
||||||
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
|
|
||||||
index ebd9bf2..825a899 100644
|
|
||||||
--- a/filter/Configuration_filter.mk
|
|
||||||
+++ b/filter/Configuration_filter.mk
|
|
||||||
@@ -538,6 +538,12 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,filter/s
|
|
||||||
calc_OOXML \
|
|
||||||
calc_OOXML_Template \
|
|
||||||
calc_MS_Works_Document \
|
|
||||||
+ calc_Beagle_Works \
|
|
||||||
+ calc_ClarisWorks \
|
|
||||||
+ calc_Claris_Resolve \
|
|
||||||
+ calc_Great_Works \
|
|
||||||
+ calc_Mac_Works \
|
|
||||||
+ calc_Mac_Wingz \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.xcu,filter/source/config/fragments/filters,\
|
|
||||||
@@ -570,6 +576,12 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.xcu,filt
|
|
||||||
calc_OOXML \
|
|
||||||
calc_OOXML_Template \
|
|
||||||
MS_Works_Calc \
|
|
||||||
+ Beagle_Works_Calc \
|
|
||||||
+ ClarisWorks_Calc \
|
|
||||||
+ Claris_Resolve_Calc \
|
|
||||||
+ Great_Works_Calc \
|
|
||||||
+ Mac_Wingz_Calc \
|
|
||||||
+ Mac_Works_Calc \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fragments/filters,\
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Beagle_Works_Calc.xcu b/filter/source/config/fragments/filters/Beagle_Works_Calc.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..3d70268
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/Beagle_Works_Calc.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+
|
|
||||||
+<node oor:name="Beagle_Works_Calc" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags">
|
|
||||||
+ <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FilterService">
|
|
||||||
+ <value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">BeagleWorks/WordPerfect Works v1 Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion">
|
|
||||||
+ <value>0</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Type">
|
|
||||||
+ <value>calc_Beagle_Works</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="DocumentService">
|
|
||||||
+ <value>com.sun.star.sheet.SpreadsheetDocument</value>
|
|
||||||
+ </prop>
|
|
||||||
+</node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/ClarisWorks_Calc.xcu b/filter/source/config/fragments/filters/ClarisWorks_Calc.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..77e6fdb
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/ClarisWorks_Calc.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="ClarisWorks_Calc" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">ClarisWorks/AppleWorks Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>calc_ClarisWorks</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Claris_Resolve_Calc.xcu b/filter/source/config/fragments/filters/Claris_Resolve_Calc.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..1db9dcc
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/Claris_Resolve_Calc.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="Claris_Resolve_Calc" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">ClarisResolve Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>calc_Claris_Resolve</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Great_Works_Calc.xcu b/filter/source/config/fragments/filters/Great_Works_Calc.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..89b68f8
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/Great_Works_Calc.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+
|
|
||||||
+<node oor:name="Great_Works_Calc" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags">
|
|
||||||
+ <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FilterService">
|
|
||||||
+ <value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">GreatWorks Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion">
|
|
||||||
+ <value>0</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Type">
|
|
||||||
+ <value>calc_Great_Works</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="DocumentService">
|
|
||||||
+ <value>com.sun.star.sheet.SpreadsheetDocument</value>
|
|
||||||
+ </prop>
|
|
||||||
+</node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Mac_Wingz_Calc.xcu b/filter/source/config/fragments/filters/Mac_Wingz_Calc.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e908c7e
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/Mac_Wingz_Calc.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="Mac_Wingz_Calc" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">Wingz for Mac Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>calc_Mac_Wingz</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/filters/Mac_Works_Calc.xcu b/filter/source/config/fragments/filters/Mac_Works_Calc.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..8db1b16
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/filters/Mac_Works_Calc.xcu
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="Mac_Works_Calc" oor:op="replace">
|
|
||||||
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
|
|
||||||
+ <prop oor:name="UIComponent"/>
|
|
||||||
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="UserData"><value></value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value xml:lang="en-US">Microsoft Works for Mac Document (v1 - v4)</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
|
|
||||||
+ <prop oor:name="Type"><value>calc_Mac_Works</value></prop>
|
|
||||||
+ <prop oor:name="TemplateName"/>
|
|
||||||
+ <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_Beagle_Works.xcu b/filter/source/config/fragments/types/calc_Beagle_Works.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..840e0a7
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_Beagle_Works.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+
|
|
||||||
+<node oor:name="calc_Beagle_Works" oor:op="replace">
|
|
||||||
+ <prop oor:name="DetectService">
|
|
||||||
+ <value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Extensions">
|
|
||||||
+ <value>dummy</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="MediaType">
|
|
||||||
+ <value></value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Preferred">
|
|
||||||
+ <value>true</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="PreferredFilter">
|
|
||||||
+ <value>Beagle_Works_Calc</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>BeagleWorks/WordPerfect Works Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+</node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_ClarisWorks.xcu b/filter/source/config/fragments/types/calc_ClarisWorks.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..fe73b41
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_ClarisWorks.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="calc_ClarisWorks" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value>cwk</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"><value>application/clarisworks</value></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>Claris_Works_Calc</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>ClarisWorks/AppleWorks Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_Claris_Resolve.xcu b/filter/source/config/fragments/types/calc_Claris_Resolve.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..309eb47
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_Claris_Resolve.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="calc_Claris_Resolve" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value>cwk</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"><value>application/clarisworks</value></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>Claris_Resolve_Calc</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>ClarisResolve Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_Great_Works.xcu b/filter/source/config/fragments/types/calc_Great_Works.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..f14480d
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_Great_Works.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+-->
|
|
||||||
+
|
|
||||||
+<node oor:name="calc_Great_Works" oor:op="replace">
|
|
||||||
+ <prop oor:name="DetectService">
|
|
||||||
+ <value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Extensions">
|
|
||||||
+ <value>dummy</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="MediaType">
|
|
||||||
+ <value></value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="Preferred">
|
|
||||||
+ <value>true</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="PreferredFilter">
|
|
||||||
+ <value>Great_Works_Calc</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>GreatWorks Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+</node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_Mac_Wingz.xcu b/filter/source/config/fragments/types/calc_Mac_Wingz.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..357a189
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_Mac_Wingz.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="calc_Mac_Wingz" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value></value></prop>
|
|
||||||
+ <prop oor:name="MediaType"></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>Mac_Wingz_Calc</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>Wingz for Mac Document</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/filter/source/config/fragments/types/calc_Mac_Works.xcu b/filter/source/config/fragments/types/calc_Mac_Works.xcu
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..9a9d373
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/filter/source/config/fragments/types/calc_Mac_Works.xcu
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+<!--
|
|
||||||
+ * 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/.
|
|
||||||
+ *
|
|
||||||
+ * This file incorporates work covered by the following license notice:
|
|
||||||
+ *
|
|
||||||
+ * Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
+ * contributor license agreements. See the NOTICE file distributed
|
|
||||||
+ * with this work for additional information regarding copyright
|
|
||||||
+ * ownership. The ASF licenses this file to you under the Apache
|
|
||||||
+ * License, Version 2.0 (the "License"); you may not use this file
|
|
||||||
+ * except in compliance with the License. You may obtain a copy of
|
|
||||||
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
+-->
|
|
||||||
+ <node oor:name="calc_Mac_Works" oor:op="replace" >
|
|
||||||
+ <prop oor:name="DetectService"><value>com.sun.star.comp.Calc.MWAWCalcImportFilter</value></prop>
|
|
||||||
+ <prop oor:name="URLPattern"/>
|
|
||||||
+ <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
+ <prop oor:name="PreferredFilter"><value>Mac_Works_Calc</value></prop>
|
|
||||||
+ <prop oor:name="UIName">
|
|
||||||
+ <value>Microsoft Works for Mac Document (v1 - v4)</value>
|
|
||||||
+ </prop>
|
|
||||||
+ <prop oor:name="ClipboardFormat"/>
|
|
||||||
+ </node>
|
|
||||||
diff --git a/writerperfect/Library_wpftcalc.mk b/writerperfect/Library_wpftcalc.mk
|
|
||||||
index 2e69c3b..e09c195 100644
|
|
||||||
--- a/writerperfect/Library_wpftcalc.mk
|
|
||||||
+++ b/writerperfect/Library_wpftcalc.mk
|
|
||||||
@@ -39,6 +39,7 @@ $(eval $(call gb_Library_use_libraries,wpftcalc,\
|
|
||||||
$(eval $(call gb_Library_use_externals,wpftcalc,\
|
|
||||||
odfgen \
|
|
||||||
revenge \
|
|
||||||
+ mwaw \
|
|
||||||
wps \
|
|
||||||
zlib \
|
|
||||||
lcms2 \
|
|
||||||
@@ -50,6 +51,7 @@ $(eval $(call gb_Library_use_externals,wpftcalc,\
|
|
||||||
$(eval $(call gb_Library_add_exception_objects,wpftcalc,\
|
|
||||||
writerperfect/source/calc/ImportFilterBase \
|
|
||||||
writerperfect/source/calc/MSWorksCalcImportFilter \
|
|
||||||
+ writerperfect/source/calc/MWAWCalcImportFilter \
|
|
||||||
writerperfect/source/calc/wpftcalc_genericfilter \
|
|
||||||
))
|
|
||||||
|
|
||||||
diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.cxx b/writerperfect/source/calc/MWAWCalcImportFilter.cxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..0f5101f
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/calc/MWAWCalcImportFilter.cxx
|
|
||||||
@@ -0,0 +1,191 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/* MWAWCalcImportFilter: Sets up the filter, and calls DocumentCollector
|
|
||||||
+ * to do the actual filtering
|
|
||||||
+ *
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <com/sun/star/uno/Reference.h>
|
|
||||||
+#include <cppuhelper/supportsservice.hxx>
|
|
||||||
+
|
|
||||||
+#include <libmwaw/libmwaw.hxx>
|
|
||||||
+#include <libodfgen/libodfgen.hxx>
|
|
||||||
+
|
|
||||||
+#include "MWAWCalcImportFilter.hxx"
|
|
||||||
+
|
|
||||||
+using com::sun::star::uno::Sequence;
|
|
||||||
+using com::sun::star::uno::Reference;
|
|
||||||
+using com::sun::star::uno::Any;
|
|
||||||
+using com::sun::star::uno::XInterface;
|
|
||||||
+using com::sun::star::uno::Exception;
|
|
||||||
+using com::sun::star::uno::RuntimeException;
|
|
||||||
+using com::sun::star::uno::XComponentContext;
|
|
||||||
+
|
|
||||||
+static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
|
|
||||||
+{
|
|
||||||
+ OdgGenerator exporter;
|
|
||||||
+ exporter.addDocumentHandler(pHandler, streamType);
|
|
||||||
+ return MWAWDocument::decodeGraphic(data, &exporter);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
|
|
||||||
+{
|
|
||||||
+ OdsGenerator exporter;
|
|
||||||
+ exporter.addDocumentHandler(pHandler, streamType);
|
|
||||||
+ return MWAWDocument::decodeSpreadsheet(data, &exporter);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+bool MWAWCalcImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator )
|
|
||||||
+{
|
|
||||||
+ return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+bool MWAWCalcImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
|
|
||||||
+{
|
|
||||||
+ rTypeName = "";
|
|
||||||
+
|
|
||||||
+ MWAWDocument::Type docType = MWAWDocument::MWAW_T_UNKNOWN;
|
|
||||||
+ MWAWDocument::Kind docKind = MWAWDocument::MWAW_K_UNKNOWN;
|
|
||||||
+ const MWAWDocument::Confidence confidence = MWAWDocument::isFileFormatSupported(&rInput, docType, docKind);
|
|
||||||
+
|
|
||||||
+ if (confidence == MWAWDocument::MWAW_C_EXCELLENT)
|
|
||||||
+ {
|
|
||||||
+ if ( docKind == MWAWDocument::MWAW_K_SPREADSHEET || docKind == MWAWDocument::MWAW_K_DATABASE )
|
|
||||||
+ {
|
|
||||||
+ switch (docType)
|
|
||||||
+ {
|
|
||||||
+ case MWAWDocument::MWAW_T_BEAGLEWORKS:
|
|
||||||
+ rTypeName = "calc_Beagle_Works";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_CLARISRESOLVE:
|
|
||||||
+ rTypeName = "calc_Claris_Resolve";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_CLARISWORKS:
|
|
||||||
+ rTypeName = "calc_ClarisWorks";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_GREATWORKS:
|
|
||||||
+ rTypeName = "calc_Great_Works";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTWORKS:
|
|
||||||
+ rTypeName = "calc_Mac_Works";
|
|
||||||
+ break;
|
|
||||||
+ case MWAWDocument::MWAW_T_WINGZ:
|
|
||||||
+ rTypeName = "calc_Mac_Wingz";
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ case MWAWDocument::MWAW_T_ACTA:
|
|
||||||
+ case MWAWDocument::MWAW_T_ADOBEILLUSTRATOR:
|
|
||||||
+ case MWAWDocument::MWAW_T_DBASE:
|
|
||||||
+ case MWAWDocument::MWAW_T_DOCMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_EDOC:
|
|
||||||
+ case MWAWDocument::MWAW_T_FAMILYTREEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_FILEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_FOXBASE:
|
|
||||||
+ case MWAWDocument::MWAW_T_FRAMEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_FULLIMPACT:
|
|
||||||
+ case MWAWDocument::MWAW_T_FULLPAINT:
|
|
||||||
+ case MWAWDocument::MWAW_T_FULLWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_INFOGENIE:
|
|
||||||
+ case MWAWDocument::MWAW_T_KALEIDAGRAPH:
|
|
||||||
+ case MWAWDocument::MWAW_T_HANMACWORDJ:
|
|
||||||
+ case MWAWDocument::MWAW_T_HANMACWORDK:
|
|
||||||
+ case MWAWDocument::MWAW_T_LIGHTWAYTEXT:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDOC:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDRAFT:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDRAW:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACDRAWPRO:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACPAINT:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MACWRITEPRO:
|
|
||||||
+ case MWAWDocument::MWAW_T_MARINERWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MINDWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTFILE:
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTMULTIPLAN:
|
|
||||||
+ case MWAWDocument::MWAW_T_MICROSOFTWORD:
|
|
||||||
+ case MWAWDocument::MWAW_T_MORE:
|
|
||||||
+ case MWAWDocument::MWAW_T_NISUSWRITER:
|
|
||||||
+ case MWAWDocument::MWAW_T_OVERVUE:
|
|
||||||
+ case MWAWDocument::MWAW_T_PAGEMAKER:
|
|
||||||
+ case MWAWDocument::MWAW_T_PIXELPAINT:
|
|
||||||
+ case MWAWDocument::MWAW_T_RAGTIME:
|
|
||||||
+ case MWAWDocument::MWAW_T_READYSETGO:
|
|
||||||
+ case MWAWDocument::MWAW_T_SUPERPAINT:
|
|
||||||
+ case MWAWDocument::MWAW_T_SYMPOSIUM:
|
|
||||||
+ case MWAWDocument::MWAW_T_TEACHTEXT:
|
|
||||||
+ case MWAWDocument::MWAW_T_TEXEDIT:
|
|
||||||
+ case MWAWDocument::MWAW_T_TRAPEZE:
|
|
||||||
+ case MWAWDocument::MWAW_T_WRITENOW:
|
|
||||||
+ case MWAWDocument::MWAW_T_WRITERPLUS:
|
|
||||||
+ case MWAWDocument::MWAW_T_XPRESS:
|
|
||||||
+ case MWAWDocument::MWAW_T_ZWRITE:
|
|
||||||
+ case MWAWDocument::MWAW_T_4DIMENSION:
|
|
||||||
+
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED1:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED2:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED3:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED4:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED5:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED6:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED7:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED8:
|
|
||||||
+ case MWAWDocument::MWAW_T_RESERVED9:
|
|
||||||
+ case MWAWDocument::MWAW_T_UNKNOWN:
|
|
||||||
+ default:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return !rTypeName.isEmpty();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void MWAWCalcImportFilter::doRegisterHandlers( OdsGenerator &rGenerator )
|
|
||||||
+{
|
|
||||||
+ rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
|
|
||||||
+ rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+OUString MWAWCalcImportFilter_getImplementationName ()
|
|
||||||
+throw (RuntimeException)
|
|
||||||
+{
|
|
||||||
+ return OUString ( "com.sun.star.comp.Calc.MWAWCalcImportFilter" );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+Sequence< OUString > SAL_CALL MWAWCalcImportFilter_getSupportedServiceNames( )
|
|
||||||
+throw (RuntimeException)
|
|
||||||
+{
|
|
||||||
+ Sequence < OUString > aRet(2);
|
|
||||||
+ OUString *pArray = aRet.getArray();
|
|
||||||
+ pArray[0] = "com.sun.star.document.ImportFilter";
|
|
||||||
+ pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
|
|
||||||
+ return aRet;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+Reference< XInterface > SAL_CALL MWAWCalcImportFilter_createInstance( const Reference< XComponentContext > &rContext)
|
|
||||||
+throw( Exception )
|
|
||||||
+{
|
|
||||||
+ return (cppu::OWeakObject *) new MWAWCalcImportFilter( rContext );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// XServiceInfo
|
|
||||||
+OUString SAL_CALL MWAWCalcImportFilter::getImplementationName( )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return MWAWCalcImportFilter_getImplementationName();
|
|
||||||
+}
|
|
||||||
+sal_Bool SAL_CALL MWAWCalcImportFilter::supportsService( const OUString &rServiceName )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return cppu::supportsService( this, rServiceName );
|
|
||||||
+}
|
|
||||||
+Sequence< OUString > SAL_CALL MWAWCalcImportFilter::getSupportedServiceNames( )
|
|
||||||
+throw (RuntimeException, std::exception)
|
|
||||||
+{
|
|
||||||
+ return MWAWCalcImportFilter_getSupportedServiceNames();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.hxx b/writerperfect/source/calc/MWAWCalcImportFilter.hxx
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..8062f6b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/writerperfect/source/calc/MWAWCalcImportFilter.hxx
|
|
||||||
@@ -0,0 +1,53 @@
|
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
+/*
|
|
||||||
+ * 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/.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef _MWAWCALCIMPORTFILTER_HXX
|
|
||||||
+#define _MWAWCALCIMPORTFILTER_HXX
|
|
||||||
+
|
|
||||||
+#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
||||||
+#include <com/sun/star/uno/XComponentContext.hpp>
|
|
||||||
+
|
|
||||||
+#include "ImportFilterBase.hxx"
|
|
||||||
+
|
|
||||||
+/* This component will be instantiated for both import or export. Whether it calls
|
|
||||||
+ * setSourceDocument or setTargetDocument determines which Impl function the filter
|
|
||||||
+ * member calls */
|
|
||||||
+class MWAWCalcImportFilter : public writerperfect::calc::ImportFilterBase
|
|
||||||
+{
|
|
||||||
+public:
|
|
||||||
+ MWAWCalcImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
|
|
||||||
+ : writerperfect::calc::ImportFilterBase( rxContext ) {}
|
|
||||||
+
|
|
||||||
+ // XServiceInfo
|
|
||||||
+ virtual OUString SAL_CALL getImplementationName( )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+ virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
|
|
||||||
+ throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
||||||
+
|
|
||||||
+private:
|
|
||||||
+ virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
|
|
||||||
+ virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator ) SAL_OVERRIDE;
|
|
||||||
+ virtual void doRegisterHandlers( OdsGenerator &rGenerator ) SAL_OVERRIDE;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+OUString MWAWCalcImportFilter_getImplementationName()
|
|
||||||
+throw ( ::com::sun::star::uno::RuntimeException );
|
|
||||||
+
|
|
||||||
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWCalcImportFilter_getSupportedServiceNames( )
|
|
||||||
+throw ( ::com::sun::star::uno::RuntimeException );
|
|
||||||
+
|
|
||||||
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
|
|
||||||
+SAL_CALL MWAWCalcImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
|
|
||||||
+throw ( ::com::sun::star::uno::Exception );
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
diff --git a/writerperfect/source/calc/wpftcalc.component b/writerperfect/source/calc/wpftcalc.component
|
|
||||||
index c2def1e..68c5f85 100644
|
|
||||||
--- a/writerperfect/source/calc/wpftcalc.component
|
|
||||||
+++ b/writerperfect/source/calc/wpftcalc.component
|
|
||||||
@@ -13,4 +13,8 @@
|
|
||||||
<service name="com.sun.star.document.ImportFilter"/>
|
|
||||||
<service name="com.sun.star.document.ExtendedTypeDetection"/>
|
|
||||||
</implementation>
|
|
||||||
+ <implementation name="com.sun.star.comp.Calc.MWAWCalcImportFilter">
|
|
||||||
+ <service name="com.sun.star.document.ImportFilter"/>
|
|
||||||
+ <service name="com.sun.star.document.ExtendedTypeDetection"/>
|
|
||||||
+ </implementation>
|
|
||||||
</component>
|
|
||||||
diff --git a/writerperfect/source/calc/wpftcalc_genericfilter.cxx b/writerperfect/source/calc/wpftcalc_genericfilter.cxx
|
|
||||||
index eecd0b0..2641010 100644
|
|
||||||
--- a/writerperfect/source/calc/wpftcalc_genericfilter.cxx
|
|
||||||
+++ b/writerperfect/source/calc/wpftcalc_genericfilter.cxx
|
|
||||||
@@ -30,6 +30,7 @@
|
|
||||||
#include "sal/types.h"
|
|
||||||
|
|
||||||
#include "MSWorksCalcImportFilter.hxx"
|
|
||||||
+#include "MWAWCalcImportFilter.hxx"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
@@ -37,6 +38,9 @@ static cppu::ImplementationEntry const services[] = {
|
|
||||||
{ &MSWorksCalcImportFilter_createInstance, &MSWorksCalcImportFilter_getImplementationName,
|
|
||||||
&MSWorksCalcImportFilter_getSupportedServiceNames,
|
|
||||||
&cppu::createSingleComponentFactory, 0, 0 },
|
|
||||||
+ { &MWAWCalcImportFilter_createInstance, &MWAWCalcImportFilter_getImplementationName,
|
|
||||||
+ &MWAWCalcImportFilter_getSupportedServiceNames,
|
|
||||||
+ &cppu::createSingleComponentFactory, 0, 0 },
|
|
||||||
{ 0, 0, 0, 0, 0, 0 } };
|
|
||||||
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
|||||||
From 78a54fa2b9726c09f6d393768e40f8452db4c8dd Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 17:09:36 +0200
|
|
||||||
Subject: [PATCH 14/18] fix detection of Keynote 3 documents
|
|
||||||
|
|
||||||
Change-Id: I1c3e6b2809ee8b63f6f4db886bf6358b668b505f
|
|
||||||
(cherry picked from commit 89e65184bc9e895085d21545c79f4089c9654c1f)
|
|
||||||
---
|
|
||||||
.../libetonyek/0001-fix-v.3-version-string.patch | 26 ++++++++++++++++++++++
|
|
||||||
external/libetonyek/UnpackedTarball_libetonyek.mk | 6 +++++
|
|
||||||
writerperfect/qa/unit/WpftImpressFilterTest.cxx | 2 +-
|
|
||||||
3 files changed, 33 insertions(+), 1 deletion(-)
|
|
||||||
create mode 100644 external/libetonyek/0001-fix-v.3-version-string.patch
|
|
||||||
|
|
||||||
diff --git a/external/libetonyek/0001-fix-v.3-version-string.patch b/external/libetonyek/0001-fix-v.3-version-string.patch
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d344259
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/external/libetonyek/0001-fix-v.3-version-string.patch
|
|
||||||
@@ -0,0 +1,26 @@
|
|
||||||
+From 16b7bf009a06ac48c69f94b778a09151aa20fa53 Mon Sep 17 00:00:00 2001
|
|
||||||
+From: David Tardon <dtardon@redhat.com>
|
|
||||||
+Date: Thu, 29 May 2014 17:04:05 +0200
|
|
||||||
+Subject: [PATCH] fix v.3 version string
|
|
||||||
+
|
|
||||||
+Change-Id: I689fd53bedeccb8d1cda5275832f36333fe1d108
|
|
||||||
+---
|
|
||||||
+ src/lib/KEY2Token.gperf | 2 +-
|
|
||||||
+ 1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
+
|
|
||||||
+diff --git a/src/lib/KEY2Token.gperf b/src/lib/KEY2Token.gperf
|
|
||||||
+index d1bf501..483ca97 100644
|
|
||||||
+--- a/src/lib/KEY2Token.gperf
|
|
||||||
++++ b/src/lib/KEY2Token.gperf
|
|
||||||
+@@ -25,7 +25,7 @@ struct Token
|
|
||||||
+ 1,_1
|
|
||||||
+ 2004102100,VERSION_STR_2
|
|
||||||
+ 2005092101,COMPATIBLE_VERSION_STR_3,
|
|
||||||
+-2005140600,VERSION_STR_3
|
|
||||||
++2005112100,VERSION_STR_3
|
|
||||||
+ 72007061400,VERSION_STR_4
|
|
||||||
+ 92008102400,VERSION_STR_5
|
|
||||||
+ BGBuildChunk,BGBuildChunk
|
|
||||||
+--
|
|
||||||
+1.9.3
|
|
||||||
+
|
|
||||||
diff --git a/external/libetonyek/UnpackedTarball_libetonyek.mk b/external/libetonyek/UnpackedTarball_libetonyek.mk
|
|
||||||
index 52e6a95..4655cbb 100644
|
|
||||||
--- a/external/libetonyek/UnpackedTarball_libetonyek.mk
|
|
||||||
+++ b/external/libetonyek/UnpackedTarball_libetonyek.mk
|
|
||||||
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libetonyek))
|
|
||||||
|
|
||||||
$(eval $(call gb_UnpackedTarball_set_tarball,libetonyek,$(ETONYEK_TARBALL)))
|
|
||||||
|
|
||||||
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libetonyek,1))
|
|
||||||
+
|
|
||||||
+$(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
|
|
||||||
+ external/libetonyek/0001-fix-v.3-version-string.patch \
|
|
||||||
+))
|
|
||||||
+
|
|
||||||
# vim: set noet sw=4 ts=4:
|
|
||||||
diff --git a/writerperfect/qa/unit/WpftImpressFilterTest.cxx b/writerperfect/qa/unit/WpftImpressFilterTest.cxx
|
|
||||||
index f148c8f..531da4f 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/impress/libetonyek/");
|
|
||||||
+ doTest("org.libreoffice.comp.Impress.KeynoteImportFilter", "/writerperfect/qa/unit/data/impress/libetonyek/");
|
|
||||||
}
|
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(WpftImpressFilterTest);
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From dbced7129da1412bf282327491584cc78601c6c7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 17:13:33 +0200
|
|
||||||
Subject: [PATCH 15/18] enable integration test for libmwaw calc import
|
|
||||||
|
|
||||||
Change-Id: I9ff3ed6b74d93483a2157087707c5ec47888dd6a
|
|
||||||
(cherry picked from commit 64a9f9968a6aa801af183a142c490943702a2d68)
|
|
||||||
---
|
|
||||||
writerperfect/qa/unit/WpftCalcFilterTest.cxx | 1 +
|
|
||||||
writerperfect/qa/unit/data/calc/libmwaw/fail/.gitignore | 0
|
|
||||||
writerperfect/qa/unit/data/calc/libmwaw/indeterminate/.gitignore | 0
|
|
||||||
writerperfect/qa/unit/data/calc/libmwaw/pass/.gitignore | 0
|
|
||||||
4 files changed, 1 insertion(+)
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/calc/libmwaw/fail/.gitignore
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/calc/libmwaw/indeterminate/.gitignore
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/calc/libmwaw/pass/.gitignore
|
|
||||||
|
|
||||||
diff --git a/writerperfect/qa/unit/WpftCalcFilterTest.cxx b/writerperfect/qa/unit/WpftCalcFilterTest.cxx
|
|
||||||
index ba1ed1e..6af5c04 100644
|
|
||||||
--- a/writerperfect/qa/unit/WpftCalcFilterTest.cxx
|
|
||||||
+++ b/writerperfect/qa/unit/WpftCalcFilterTest.cxx
|
|
||||||
@@ -31,6 +31,7 @@ WpftCalcFilterTest::WpftCalcFilterTest()
|
|
||||||
|
|
||||||
void WpftCalcFilterTest::test()
|
|
||||||
{
|
|
||||||
+ doTest("com.sun.star.comp.Calc.MWAWCalcImportFilter", "/writerperfect/qa/unit/data/calc/libmwaw/");
|
|
||||||
doTest("com.sun.star.comp.Calc.MSWorksCalcImportFilter", "/writerperfect/qa/unit/data/calc/libwps/");
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/writerperfect/qa/unit/data/calc/libmwaw/fail/.gitignore b/writerperfect/qa/unit/data/calc/libmwaw/fail/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
diff --git a/writerperfect/qa/unit/data/calc/libmwaw/indeterminate/.gitignore b/writerperfect/qa/unit/data/calc/libmwaw/indeterminate/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
diff --git a/writerperfect/qa/unit/data/calc/libmwaw/pass/.gitignore b/writerperfect/qa/unit/data/calc/libmwaw/pass/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From 017986c8c34ee8f59fed6ee92c1b663a48cd429c Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 17:14:22 +0200
|
|
||||||
Subject: [PATCH 16/18] enable integration test for libmwaw draw import
|
|
||||||
|
|
||||||
Change-Id: I2109b948971776f06c3574ad6e7a9bebc33a40b3
|
|
||||||
(cherry picked from commit e120b369f10207f4057ebeae92c1ee25f08e4904)
|
|
||||||
---
|
|
||||||
writerperfect/qa/unit/WpftDrawFilterTest.cxx | 1 +
|
|
||||||
writerperfect/qa/unit/data/draw/libmwaw/fail/.gitignore | 0
|
|
||||||
writerperfect/qa/unit/data/draw/libmwaw/indeterminate/.gitignore | 0
|
|
||||||
writerperfect/qa/unit/data/draw/libmwaw/pass/.gitignore | 0
|
|
||||||
4 files changed, 1 insertion(+)
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/draw/libmwaw/fail/.gitignore
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/draw/libmwaw/indeterminate/.gitignore
|
|
||||||
create mode 100644 writerperfect/qa/unit/data/draw/libmwaw/pass/.gitignore
|
|
||||||
|
|
||||||
diff --git a/writerperfect/qa/unit/WpftDrawFilterTest.cxx b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
|
|
||||||
index 3de83ac..3b0b0ef 100644
|
|
||||||
--- a/writerperfect/qa/unit/WpftDrawFilterTest.cxx
|
|
||||||
+++ b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
|
|
||||||
@@ -35,6 +35,7 @@ void WpftDrawFilterTest::test()
|
|
||||||
doTest("com.sun.star.comp.Draw.CMXImportFilter", "/writerperfect/qa/unit/data/draw/libcdr-cmx/");
|
|
||||||
doTest("com.sun.star.comp.Draw.FreehandImportFilter", "/writerperfect/qa/unit/data/draw/libfreehand/");
|
|
||||||
doTest("com.sun.star.comp.Draw.MSPUBImportFilter", "/writerperfect/qa/unit/data/draw/libmspub/");
|
|
||||||
+ doTest("com.sun.star.comp.Draw.MWAWDrawImportFilter", "/writerperfect/qa/unit/data/draw/libmwaw/");
|
|
||||||
doTest("com.sun.star.comp.Draw.VisioImportFilter", "/writerperfect/qa/unit/data/draw/libvisio/");
|
|
||||||
doTest("com.sun.star.comp.Draw.WPGImportFilter", "/writerperfect/qa/unit/data/draw/libwpg/");
|
|
||||||
}
|
|
||||||
diff --git a/writerperfect/qa/unit/data/draw/libmwaw/fail/.gitignore b/writerperfect/qa/unit/data/draw/libmwaw/fail/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
diff --git a/writerperfect/qa/unit/data/draw/libmwaw/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libmwaw/indeterminate/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
diff --git a/writerperfect/qa/unit/data/draw/libmwaw/pass/.gitignore b/writerperfect/qa/unit/data/draw/libmwaw/pass/.gitignore
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e69de29
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,61 +0,0 @@
|
|||||||
From da20023bf585f7c937ab7f5927f1425d25a79a50 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Tardon <dtardon@redhat.com>
|
|
||||||
Date: Thu, 29 May 2014 19:24:21 +0200
|
|
||||||
Subject: [PATCH 18/18] fix copypasta
|
|
||||||
|
|
||||||
Change-Id: I397426edff584b29210b4df925677893cda35cc7
|
|
||||||
(cherry picked from commit 8dd624128bf12e013c17b3b24c0b24135296bb8e)
|
|
||||||
---
|
|
||||||
filter/source/config/fragments/types/draw_MacPaint.xcu | 4 ++--
|
|
||||||
filter/source/config/fragments/types/draw_Mac_Works.xcu | 4 ++--
|
|
||||||
filter/source/config/fragments/types/draw_SuperPaint.xcu | 4 ++--
|
|
||||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_MacPaint.xcu b/filter/source/config/fragments/types/draw_MacPaint.xcu
|
|
||||||
index 5811ea5..4cadffd 100644
|
|
||||||
--- a/filter/source/config/fragments/types/draw_MacPaint.xcu
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_MacPaint.xcu
|
|
||||||
@@ -18,8 +18,8 @@
|
|
||||||
<node oor:name="draw_MacPaint" oor:op="replace" >
|
|
||||||
<prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
<prop oor:name="URLPattern"/>
|
|
||||||
- <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
- <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Extensions"><value>dummy</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"></prop>
|
|
||||||
<prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
<prop oor:name="PreferredFilter"><value>MacPaint_Draw</value></prop>
|
|
||||||
<prop oor:name="UIName">
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_Mac_Works.xcu b/filter/source/config/fragments/types/draw_Mac_Works.xcu
|
|
||||||
index 79ef12c..15dea54 100644
|
|
||||||
--- a/filter/source/config/fragments/types/draw_Mac_Works.xcu
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_Mac_Works.xcu
|
|
||||||
@@ -18,8 +18,8 @@
|
|
||||||
<node oor:name="draw_Mac_Works" oor:op="replace" >
|
|
||||||
<prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
<prop oor:name="URLPattern"/>
|
|
||||||
- <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
- <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Extensions"><value>dummy</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"></prop>
|
|
||||||
<prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
<prop oor:name="PreferredFilter"><value>Mac_Works_Draw</value></prop>
|
|
||||||
<prop oor:name="UIName">
|
|
||||||
diff --git a/filter/source/config/fragments/types/draw_SuperPaint.xcu b/filter/source/config/fragments/types/draw_SuperPaint.xcu
|
|
||||||
index 6dbd4a9..6f7e349 100644
|
|
||||||
--- a/filter/source/config/fragments/types/draw_SuperPaint.xcu
|
|
||||||
+++ b/filter/source/config/fragments/types/draw_SuperPaint.xcu
|
|
||||||
@@ -18,8 +18,8 @@
|
|
||||||
<node oor:name="draw_SuperPaint" oor:op="replace" >
|
|
||||||
<prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
|
|
||||||
<prop oor:name="URLPattern"/>
|
|
||||||
- <prop oor:name="Extensions"><value>wps</value></prop>
|
|
||||||
- <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
|
|
||||||
+ <prop oor:name="Extensions"><value>dummy</value></prop>
|
|
||||||
+ <prop oor:name="MediaType"></prop>
|
|
||||||
<prop oor:name="Preferred"><value>true</value></prop>
|
|
||||||
<prop oor:name="PreferredFilter"><value>SuperPaint_Draw</value></prop>
|
|
||||||
<prop oor:name="UIName">
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
Loading…
Reference in new issue