[Libreoffice-commits] core.git: config_host.mk.in configure.ac download.lst external/libebook external/Module_external.mk filter/Configuration_filter.mk filter/source Makefile.fetch RepositoryExternal.mk writerperfect/Library_wpftwriter.mk writerperfect/source writerperfect/util

David Tardon dtardon at redhat.com
Sun Nov 10 22:53:14 PST 2013


 Makefile.fetch                                                  |    1 
 RepositoryExternal.mk                                           |   35 +
 config_host.mk.in                                               |    3 
 configure.ac                                                    |    5 
 download.lst                                                    |    2 
 external/Module_external.mk                                     |    1 
 external/libebook/ExternalProject_libebook.mk                   |   45 +
 external/libebook/Makefile                                      |    7 
 external/libebook/Module_libebook.mk                            |   17 
 external/libebook/README                                        |    1 
 external/libebook/UnpackedTarball_libebook.mk                   |   14 
 filter/Configuration_filter.mk                                  |   14 
 filter/source/config/fragments/filters/BroadBand_eBook.xcu      |   29 +
 filter/source/config/fragments/filters/FictionBook_2.xcu        |   29 +
 filter/source/config/fragments/filters/PalmDoc.xcu              |   29 +
 filter/source/config/fragments/filters/Plucker_eBook.xcu        |   29 +
 filter/source/config/fragments/filters/TealDoc.xcu              |   29 +
 filter/source/config/fragments/filters/eReader_eBook.xcu        |   29 +
 filter/source/config/fragments/filters/zTXT.xcu                 |   29 +
 filter/source/config/fragments/types/writer_BroadBand_eBook.xcu |   29 +
 filter/source/config/fragments/types/writer_FictionBook_2.xcu   |   29 +
 filter/source/config/fragments/types/writer_PalmDoc.xcu         |   29 +
 filter/source/config/fragments/types/writer_Plucker_eBook.xcu   |   29 +
 filter/source/config/fragments/types/writer_TealDoc.xcu         |   29 +
 filter/source/config/fragments/types/writer_eReader_eBook.xcu   |   29 +
 filter/source/config/fragments/types/writer_zTXT.xcu            |   29 +
 writerperfect/Library_wpftwriter.mk                             |    6 
 writerperfect/source/writer/EBookImportFilter.cxx               |  253 ++++++++++
 writerperfect/source/writer/EBookImportFilter.hxx               |   88 +++
 writerperfect/source/writer/wpftwriter_genericfilter.cxx        |    4 
 writerperfect/util/wpftwriter.component                         |    4 
 31 files changed, 906 insertions(+)

New commits:
commit 316be1b6f18963b39aab7729bf93fc9c86519e33
Author: David Tardon <dtardon at redhat.com>
Date:   Sat Nov 9 15:52:36 2013 +0100

    bundle libebook
    
    Change-Id: I05d96875b9d1deb87dadd63f446080a6fe3494a9
    Reviewed-on: https://gerrit.libreoffice.org/6630
    Tested-by: LibreOffice gerrit bot <gerrit at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/Makefile.fetch b/Makefile.fetch
index 81acd0f..752a934 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -76,6 +76,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
 	$(foreach item, \
 		$(call fetch_Optional,LIBATOMIC_OPS,LIBATOMIC_OPS_TARBALL) \
 		$(call fetch_Optional,CDR,CDR_TARBALL) \
+		$(call fetch_Optional,EBOOK,EBOOK_TARBALL) \
 		$(call fetch_Optional,FREEHAND,FREEHAND_TARBALL) \
 		$(call fetch_Optional,ETONYEK,ETONYEK_TARBALL) \
 		$(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 4228803..1fd0850 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1402,6 +1402,41 @@ endef
 endif # SYSTEM_CDR
 
 
+ifeq ($(SYSTEM_EBOOK),YES)
+
+define gb_LinkTarget__use_ebook
+$(call gb_LinkTarget_set_include,$(1),\
+	$$(INCLUDE) \
+    $(EBOOK_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
+
+endef
+
+gb_ExternalProject__use_ebook :=
+
+else # !SYSTEM_EBOOK
+
+define gb_LinkTarget__use_ebook
+$(call gb_LinkTarget_set_include,$(1),\
+	$(EBOOK_CFLAGS) \
+	$$(INCLUDE) \
+)
+$(call gb_LinkTarget_add_libs,$(1),\
+	$(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.0$(gb_StaticLibrary_PLAINEXT) \
+)
+$(call gb_LinkTarget_use_external_project,$(1),libebook)
+
+endef
+
+define gb_ExternalProject__use_ebook
+$(call gb_ExternalProject_use_external_project,$(1),libebook)
+
+endef
+
+endif # SYSTEM_EBOOK
+
+
 ifeq ($(SYSTEM_ETONYEK),YES)
 
 define gb_LinkTarget__use_etonyek
diff --git a/config_host.mk.in b/config_host.mk.in
index 1ec3268..30df49c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -102,6 +102,8 @@ export DOCDIR=@DOCDIR@
 export DOXYGEN=@DOXYGEN@
 export DO_FETCH_TARBALLS=@DO_FETCH_TARBALLS@
 export DPKG=@DPKG@
+export EBOOK_CFLAGS=$(gb_SPACE)@EBOOK_CFLAGS@
+export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@
 export ENABLE_AVAHI=@ENABLE_AVAHI@
 export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
 export ENABLE_CORETEXT=@ENABLE_CORETEXT@
@@ -504,6 +506,7 @@ export SYSTEM_JPEG=@SYSTEM_JPEG@
 export SYSTEM_LCMS2=@SYSTEM_LCMS2@
 export SYSTEM_CDR=@SYSTEM_CDR@
 export SYSTEM_CMIS=@SYSTEM_CMIS@
+export SYSTEM_EBOOK=@SYSTEM_EBOOK@
 export SYSTEM_ETONYEK=@SYSTEM_ETONYEK@
 export SYSTEM_FREEHAND=@SYSTEM_FREEHAND@
 export SYSTEM_LIBATOMIC_OPS=@SYSTEM_LIBATOMIC_OPS@
diff --git a/configure.ac b/configure.ac
index 6f57983..817e4da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7655,6 +7655,11 @@ fi
 AC_SUBST(SYSTEM_EXPAT)
 
 dnl ===================================================================
+dnl Check for system libebook
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.0],["-I${WORKDIR}/UnpackedTarball/libebook/inc"],["-L${WORKDIR}/UnpackedTarball/libebook/src/lib/.libs -le-book-0.0"])
+
+dnl ===================================================================
 dnl Check for system libetonyek
 dnl ===================================================================
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.0],["-I${WORKDIR}/UnpackedTarball/libetonyek/inc"],["-L${WORKDIR}/UnpackedTarball/libetonyek/src/lib/.libs -letonyek-0.0"])
diff --git a/download.lst b/download.lst
index 554358d..7714de1 100644
--- a/download.lst
+++ b/download.lst
@@ -1,5 +1,7 @@
 CDR_MD5SUM := d88f9b94df880d2c05be943b000ca112
 export CDR_TARBALL := libcdr-0.0.14.tar.bz2
+EBOOK_MD5SUM := 74524e1eecc8ab3ac2e8e8a8bb75d6e4
+export EBOOK_TARBALL := libe-book-0.0.1.tar.bz2
 ETONYEK_MD5SUM := 040e0d7ce0cc0eb3a016964699d54a6c
 export ETONYEK_TARBALL := libetonyek-0.0.1.tar.bz2
 FREEHAND_MD5SUM := 496dd00028afcc19f896b01394769043
diff --git a/external/Module_external.mk b/external/Module_external.mk
index d2225dd..8ea0f11 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
 	$(call gb_Helper_optional,CPPUNIT,cppunit) \
 	$(call gb_Helper_optional,CT2N,ct2n) \
 	$(call gb_Helper_optional,CURL,curl) \
+	$(call gb_Helper_optional,EBOOK,libebook) \
 	$(call gb_Helper_optional,EPM,epm) \
 	$(call gb_Helper_optional,ETONYEK,libetonyek) \
 	$(call gb_Helper_optional,EXPAT,expat) \
diff --git a/external/libebook/ExternalProject_libebook.mk b/external/libebook/ExternalProject_libebook.mk
new file mode 100644
index 0000000..dbb7d2b
--- /dev/null
+++ b/external/libebook/ExternalProject_libebook.mk
@@ -0,0 +1,45 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,libebook))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libebook,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libebook,\
+	build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libebook,\
+	boost_headers \
+	icu \
+	libxml2 \
+	wpd \
+	zlib \
+))
+
+$(call gb_ExternalProject_get_state_target,libebook,build) :
+	$(call gb_ExternalProject_run,build,\
+		export PKG_CONFIG="" \
+		&& ./configure \
+			--with-pic \
+			--enable-static \
+			--disable-shared \
+			--without-docs \
+			--disable-debug \
+			--disable-werror \
+			--disable-weffc \
+			CXXFLAGS="$(if $(filter NO,$(SYSTEM_BOOST)),-I$(call gb_UnpackedTarball_get_dir,boost),$(BOOST_CPPFLAGS))" \
+			XML_CFLAGS="$(if $(filter NO,$(SYSTEM_LIBXML)),-I$(call gb_UnpackedTarball_get_dir,xml2)/include,$(LIBXML_CFLAGS))" \
+			XML_LIBS="$(LIBXML_LIBS)" \
+			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+		&& cd src/lib \
+		&& $(MAKE) $(if $(VERBOSE)$(verbose),V=1) \
+	)
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libebook/Makefile b/external/libebook/Makefile
new file mode 100644
index 0000000..e4968cf
--- /dev/null
+++ b/external/libebook/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libebook/Module_libebook.mk b/external/libebook/Module_libebook.mk
new file mode 100644
index 0000000..cbc74f1
--- /dev/null
+++ b/external/libebook/Module_libebook.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,libebook))
+
+$(eval $(call gb_Module_add_targets,libebook,\
+	ExternalProject_libebook \
+	UnpackedTarball_libebook \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libebook/README b/external/libebook/README
new file mode 100644
index 0000000..440db7d
--- /dev/null
+++ b/external/libebook/README
@@ -0,0 +1 @@
+Library for import of various non-HTML reflowable e-book formats.
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
new file mode 100644
index 0000000..555837b
--- /dev/null
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,libebook))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libebook,$(EBOOK_TARBALL)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 4f7af96..bace597 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -357,6 +357,13 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter
 	writer_OOXML \
 	writer_OOXML_Template \
 	writer_layout_dump_xml \
+	writer_BroadBand_eBook \
+	writer_eReader_eBook \
+	writer_FictionBook_2 \
+	writer_PalmDoc \
+	writer_Plucker_eBook \
+	writer_TealDoc \
+	writer_zTXT \
 )
 
 $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters.xcu,filter/source/config/fragments/filters,\
@@ -407,6 +414,13 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters.xcu,fi
 	OOXML_Text \
 	OOXML_Text_Template \
 	writer_layout_dump \
+	BroadBand_eBook \
+	eReader_eBook \
+	FictionBook_2 \
+	PalmDoc \
+	Plucker_eBook \
+	TealDoc \
+	zTXT \
 )
 
 $(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fragments/filters,\
diff --git a/filter/source/config/fragments/filters/BroadBand_eBook.xcu b/filter/source/config/fragments/filters/BroadBand_eBook.xcu
new file mode 100644
index 0000000..128dc29
--- /dev/null
+++ b/filter/source/config/fragments/filters/BroadBand_eBook.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="BroadBand eBook" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">BroadBand eBook</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_BroadBand_eBook</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/FictionBook_2.xcu b/filter/source/config/fragments/filters/FictionBook_2.xcu
new file mode 100644
index 0000000..d4e9ecd
--- /dev/null
+++ b/filter/source/config/fragments/filters/FictionBook_2.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="FictionBook 2" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">FictionBook 2.0</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_FictionBook_2</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/PalmDoc.xcu b/filter/source/config/fragments/filters/PalmDoc.xcu
new file mode 100644
index 0000000..2f2bc33
--- /dev/null
+++ b/filter/source/config/fragments/filters/PalmDoc.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="PalmDoc" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">PalmDoc eBook</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_PalmDoc</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/Plucker_eBook.xcu b/filter/source/config/fragments/filters/Plucker_eBook.xcu
new file mode 100644
index 0000000..d953b12
--- /dev/null
+++ b/filter/source/config/fragments/filters/Plucker_eBook.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="Plucker eBook" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">Plucker eBook</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_Plucker_eBook</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/TealDoc.xcu b/filter/source/config/fragments/filters/TealDoc.xcu
new file mode 100644
index 0000000..749b00d
--- /dev/null
+++ b/filter/source/config/fragments/filters/TealDoc.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="TealDoc" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">TealDoc eBook</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_TealDoc</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/eReader_eBook.xcu b/filter/source/config/fragments/filters/eReader_eBook.xcu
new file mode 100644
index 0000000..306866c
--- /dev/null
+++ b/filter/source/config/fragments/filters/eReader_eBook.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="eReader eBook" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">eReader eBook</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_eReader_eBook</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/zTXT.xcu b/filter/source/config/fragments/filters/zTXT.xcu
new file mode 100644
index 0000000..0b7a051
--- /dev/null
+++ b/filter/source/config/fragments/filters/zTXT.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="zTXT" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="x-default">zTXT eBook</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>writer_zTXT</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.text.TextDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_BroadBand_eBook.xcu b/filter/source/config/fragments/types/writer_BroadBand_eBook.xcu
new file mode 100644
index 0000000..129f330
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_BroadBand_eBook.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="writer_BroadBand_eBook" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>lrf</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value>application/x-sony-bbeb</value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>BroadBand eBook</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>BroadBand eBook</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_FictionBook_2.xcu b/filter/source/config/fragments/types/writer_FictionBook_2.xcu
new file mode 100644
index 0000000..3b49a61
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_FictionBook_2.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="writer_FictionBook_2" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>fb2 zip</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value>text/xml</value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>FictionBook 2</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>FictionBook 2.0</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_PalmDoc.xcu b/filter/source/config/fragments/types/writer_PalmDoc.xcu
new file mode 100644
index 0000000..8f91f7e
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_PalmDoc.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="writer_PalmDoc" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>pdb</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value>application/vnd.palm</value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>PalmDoc</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>PalmDoc eBook</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_Plucker_eBook.xcu b/filter/source/config/fragments/types/writer_Plucker_eBook.xcu
new file mode 100644
index 0000000..000d872
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_Plucker_eBook.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="writer_Plucker_eBook" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>pdb</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value>application/prs.plucker</value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>Plucker eBook</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>Plucker eBook</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_TealDoc.xcu b/filter/source/config/fragments/types/writer_TealDoc.xcu
new file mode 100644
index 0000000..26c13da
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_TealDoc.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="writer_TealDoc" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>pdb</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value>application/vnd.palm</value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>TealDoc</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>TealDoc eBook</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_eReader_eBook.xcu b/filter/source/config/fragments/types/writer_eReader_eBook.xcu
new file mode 100644
index 0000000..e090872
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_eReader_eBook.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="writer_eReader_eBook" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>pdb</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value>application/vnd.palm</value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>eReader eBook</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>eReader eBook</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/writer_zTXT.xcu b/filter/source/config/fragments/types/writer_zTXT.xcu
new file mode 100644
index 0000000..95cbc08
--- /dev/null
+++ b/filter/source/config/fragments/types/writer_zTXT.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="writer_zTXT" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>org.libreoffice.comp.Writer.EBookImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>pdb</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value>application/vnd.palm</value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>zTXT</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>zTXT eBook</value>
+    </prop>
+</node>
diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk
index 6f5dafa..cc69e9d 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -49,7 +49,12 @@ $(eval $(call gb_Library_use_static_libraries,wpftwriter,\
 
 $(eval $(call gb_Library_use_externals,wpftwriter,\
 	boost_headers \
+	ebook \
 	etonyek \
+	icui18n \
+	icudata \
+	icuuc \
+	libxml2 \
 	mwaw \
 	odfgen \
 	wps \
@@ -59,6 +64,7 @@ $(eval $(call gb_Library_use_externals,wpftwriter,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,wpftwriter,\
+	writerperfect/source/writer/EBookImportFilter \
 	writerperfect/source/writer/MSWorksImportFilter \
 	writerperfect/source/writer/MWAWImportFilter \
 	writerperfect/source/writer/WordPerfectImportFilter \
diff --git a/writerperfect/source/writer/EBookImportFilter.cxx b/writerperfect/source/writer/EBookImportFilter.cxx
new file mode 100644
index 0000000..aa02329
--- /dev/null
+++ b/writerperfect/source/writer/EBookImportFilter.cxx
@@ -0,0 +1,253 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* EBookImportFilter: 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 <osl/diagnose.h>
+#include <rtl/tencinfo.h>
+
+#include <com/sun/star/io/XInputStream.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 <cppuhelper/supportsservice.hxx>
+
+#include <xmloff/attrlist.hxx>
+#include <ucbhelper/content.hxx>
+
+#include <libe-book/libe-book.h>
+
+#include <libodfgen/libodfgen.hxx>
+
+#include "common/DocumentHandler.hxx"
+#include "common/WPXSvStream.hxx"
+#include "EBookImportFilter.hxx"
+
+#include <iostream>
+
+using namespace ::com::sun::star::uno;
+using com::sun::star::uno::Sequence;
+using com::sun::star::uno::Reference;
+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::ucb::XCommandEnvironment;
+
+using com::sun::star::io::XInputStream;
+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;
+
+
+sal_Bool SAL_CALL EBookImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+throw (RuntimeException)
+{
+    SAL_INFO("writerperfect", "EBookImportFilter::importImpl");
+
+    sal_Int32 nLength = aDescriptor.getLength();
+    const PropertyValue *pValue = aDescriptor.getConstArray();
+    Reference < XInputStream > xInputStream;
+    rtl::OUString sFilterName;
+    for ( sal_Int32 i = 0 ; i < nLength; i++)
+    {
+        if ( pValue[i].Name == "FilterName" )
+            pValue[i].Value >>= sFilterName;
+        else if ( pValue[i].Name == "InputStream" )
+            pValue[i].Value >>= xInputStream;
+    }
+    if ( sFilterName.isEmpty() )
+    {
+        OSL_ASSERT( 0 );
+        return sal_False;
+    }
+    if ( !xInputStream.is() )
+    {
+        OSL_ASSERT( 0 );
+        return sal_False;
+    }
+
+    // An XML import service: what we push sax messages to..
+    Reference < XDocumentHandler > xInternalHandler(
+        mxContext->getServiceManager()->createInstanceWithContext(
+            "com.sun.star.comp.Writer.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 Document Handler: abstract class to handle document SAX messages, concrete implementation here
+    // writes to in-memory target doc
+    DocumentHandler xHandler(xInternalHandler);
+
+    WPXSvInputStream input( xInputStream );
+
+    OdtGenerator collector(&xHandler, ODF_FLAT_XML);
+
+    if (sFilterName == "FictionBook 2")
+        return libebook::FB2Document::parse(&input, &collector);
+    else if (sFilterName == "PalmDoc")
+        return libebook::PDBDocument::parse(&input, &collector);
+    else if (sFilterName == "Plucker eBook")
+        return libebook::PLKRDocument::parse(&input, &collector);
+    else if (sFilterName == "eReader eBook")
+        return libebook::PMLDocument::parse(&input, &collector);
+    else if (sFilterName == "TealDoc")
+        return libebook::TDDocument::parse(&input, &collector);
+    else if (sFilterName == "zTXT")
+        return libebook::ZTXTDocument::parse(&input, &collector);
+
+    return sal_False;
+}
+
+sal_Bool SAL_CALL EBookImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+throw (RuntimeException)
+{
+    SAL_INFO("writerperfect", "EBookImportFilter::filter");
+    return importImpl ( aDescriptor );
+}
+void SAL_CALL EBookImportFilter::cancel(  )
+throw (RuntimeException)
+{
+    SAL_INFO("writerperfect", "EBookImportFilter::cancel");
+}
+
+// XImporter
+void SAL_CALL EBookImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
+throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
+{
+    SAL_INFO("writerperfect", "EBookImportFilter::getTargetDocument");
+    mxDoc = xDoc;
+}
+
+// XExtendedFilterDetection
+OUString SAL_CALL EBookImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
+throw( com::sun::star::uno::RuntimeException )
+{
+    SAL_INFO("writerperfect", "EBookImportFilter::detect");
+
+    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 (libebook::FB2Document::isSupported(&input))
+        sTypeName = "writer_FictionBook_2";
+    else if (libebook::PDBDocument::isSupported(&input))
+        sTypeName = "writer_PalmDoc";
+    else if (libebook::PLKRDocument::isSupported(&input))
+        sTypeName = "writer_Plucker_eBook";
+    else if (libebook::PMLDocument::isSupported(&input))
+        sTypeName = "writer_eReader_eBook";
+    else if (libebook::TDDocument::isSupported(&input))
+        sTypeName = "writer_TealDoc";
+    else if (libebook::ZTXTDocument::isSupported(&input))
+        sTypeName = "writer_zTXT";
+
+    if (!sTypeName.isEmpty())
+    {
+        if ( location == nLength )
+        {
+            Descriptor.realloc(nLength+1);
+            Descriptor[location].Name = "TypeName";
+        }
+
+        Descriptor[location].Value <<=sTypeName;
+    }
+
+    return sTypeName;
+}
+
+
+// XInitialization
+void SAL_CALL EBookImportFilter::initialize( const Sequence< Any >& aArguments )
+throw (Exception, RuntimeException)
+{
+    SAL_INFO("writerperfect", "EBookImportFilter::initialize");
+    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;
+            }
+        }
+    }
+}
+OUString EBookImportFilter_getImplementationName ()
+throw (RuntimeException)
+{
+    return OUString (  "org.libreoffice.comp.Writer.EBookImportFilter"  );
+}
+
+Sequence< OUString > SAL_CALL EBookImportFilter_getSupportedServiceNames(  )
+throw (RuntimeException)
+{
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  OUString ( "com.sun.star.document.ImportFilter" );
+    pArray[1] =  OUString ( "com.sun.star.document.ExtendedTypeDetection" );
+    return aRet;
+}
+#undef SERVICE_NAME2
+#undef SERVICE_NAME1
+
+Reference< XInterface > SAL_CALL EBookImportFilter_createInstance( const Reference< XComponentContext > & rContext)
+throw( Exception )
+{
+    return (cppu::OWeakObject *) new EBookImportFilter( rContext );
+}
+
+// XServiceInfo
+OUString SAL_CALL EBookImportFilter::getImplementationName(  )
+throw (RuntimeException)
+{
+    return EBookImportFilter_getImplementationName();
+}
+sal_Bool SAL_CALL EBookImportFilter::supportsService( const OUString &rServiceName )
+throw (RuntimeException)
+{
+    return cppu::supportsService( this, rServiceName );
+}
+Sequence< OUString > SAL_CALL EBookImportFilter::getSupportedServiceNames(  )
+throw (RuntimeException)
+{
+    return EBookImportFilter_getSupportedServiceNames();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/EBookImportFilter.hxx b/writerperfect/source/writer/EBookImportFilter.hxx
new file mode 100644
index 0000000..3e844d7
--- /dev/null
+++ b/writerperfect/source/writer/EBookImportFilter.hxx
@@ -0,0 +1,88 @@
+/* -*- 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 EBOOKIMPORTFILTER_HXX
+#define EBOOKIMPORTFILTER_HXX
+
+#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 <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <cppuhelper/implbase5.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 EBookImportFilter : public cppu::WeakImplHelper5
+    <
+    com::sun::star::document::XFilter,
+    com::sun::star::document::XImporter,
+    com::sun::star::document::XExtendedFilterDetection,
+    com::sun::star::lang::XInitialization,
+    com::sun::star::lang::XServiceInfo
+    >
+{
+protected:
+    ::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;
+
+    sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
+    throw (::com::sun::star::uno::RuntimeException);
+
+public:
+    EBookImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
+        : mxContext( rxContext ) {}
+    virtual ~EBookImportFilter() {}
+
+    // 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);
+    virtual void SAL_CALL cancel(  )
+    throw (::com::sun::star::uno::RuntimeException);
+
+    // 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);
+
+    //XExtendedFilterDetection
+    virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
+    throw( com::sun::star::uno::RuntimeException );
+
+    // 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);
+
+    // XServiceInfo
+    virtual OUString SAL_CALL getImplementationName(  )
+    throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+    throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  )
+    throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+OUString EBookImportFilter_getImplementationName()
+throw ( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::uno::Sequence< OUString > SAL_CALL EBookImportFilter_getSupportedServiceNames(  )
+throw ( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+SAL_CALL EBookImportFilter_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/writer/wpftwriter_genericfilter.cxx b/writerperfect/source/writer/wpftwriter_genericfilter.cxx
index 0361dd2..e163f5d 100644
--- a/writerperfect/source/writer/wpftwriter_genericfilter.cxx
+++ b/writerperfect/source/writer/wpftwriter_genericfilter.cxx
@@ -31,6 +31,7 @@
 #include "cppuhelper/implementationentry.hxx"
 #include "sal/types.h"
 
+#include "EBookImportFilter.hxx"
 #include "WordPerfectImportFilter.hxx"
 #include "MSWorksImportFilter.hxx"
 #include "MWAWImportFilter.hxx"
@@ -47,6 +48,9 @@ static cppu::ImplementationEntry const services[] = {
     { &MWAWImportFilter_createInstance, &MWAWImportFilter_getImplementationName,
       &MWAWImportFilter_getSupportedServiceNames,
       &cppu::createSingleComponentFactory, 0, 0 },
+    { &EBookImportFilter_createInstance, &EBookImportFilter_getImplementationName,
+      &EBookImportFilter_getSupportedServiceNames,
+      &cppu::createSingleComponentFactory, 0, 0 },
     { 0, 0, 0, 0, 0, 0 } };
 
 }
diff --git a/writerperfect/util/wpftwriter.component b/writerperfect/util/wpftwriter.component
index f243d5c..e36d867 100644
--- a/writerperfect/util/wpftwriter.component
+++ b/writerperfect/util/wpftwriter.component
@@ -30,4 +30,8 @@
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
     <service name="com.sun.star.document.ImportFilter"/>
   </implementation>
+  <implementation name="org.libreoffice.comp.Writer.EBookImportFilter">
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+    <service name="com.sun.star.document.ImportFilter"/>
+  </implementation>
 </component>


More information about the Libreoffice-commits mailing list