[Libreoffice-commits] core.git: 2 commits - bin/get-bugzilla-attachments-by-mimetype config_host.mk.in configure.ac download.lst external/libpagemaker external/Module_external.mk filter/Configuration_filter.mk filter/source RepositoryExternal.mk writerperfect/Library_wpftdraw.mk writerperfect/qa writerperfect/source

David Tardon dtardon at redhat.com
Fri Jun 27 01:40:38 PDT 2014


 RepositoryExternal.mk                                            |   33 +++
 bin/get-bugzilla-attachments-by-mimetype                         |   15 -
 config_host.mk.in                                                |    3 
 configure.ac                                                     |    5 
 download.lst                                                     |    2 
 external/Module_external.mk                                      |    1 
 external/libpagemaker/ExternalProject_libpagemaker.mk            |   41 ++++
 external/libpagemaker/Makefile                                   |    7 
 external/libpagemaker/Module_libpagemaker.mk                     |   17 ++
 external/libpagemaker/README                                     |    1 
 external/libpagemaker/UnpackedTarball_libpagemaker.mk            |   14 +
 filter/Configuration_filter.mk                                   |    2 
 filter/source/config/fragments/filters/PageMakerDocument.xcu     |   13 +
 filter/source/config/fragments/types/draw_PageMaker_Document.xcu |   12 +
 writerperfect/Library_wpftdraw.mk                                |    2 
 writerperfect/qa/unit/data/draw/libpagemaker/pass/shapes.pmd     |binary
 writerperfect/source/draw/PageMakerImportFilter.cxx              |   83 ++++++++++
 writerperfect/source/draw/PageMakerImportFilter.hxx              |   49 +++++
 writerperfect/source/draw/wpftdraw.component                     |    4 
 writerperfect/source/draw/wpftdraw_genericfilter.cxx             |    5 
 20 files changed, 302 insertions(+), 7 deletions(-)

New commits:
commit bba28baf8bbf9749b94d63f1f23c2e32353394b4
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Jun 26 21:26:35 2014 +0200

    download PageMaker files
    
    Change-Id: I739f5f9b6f0e6a97832136812b289ae27cfaae37

diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype
index 31ba07d..c48bbc8 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -398,6 +398,7 @@ mimetypes = {
     'application/x-t602': '602',
     'application/x-fictionbook+xml': 'fb2',
     'application/x-abiword': 'abw',
+    'application/x-pagemaker': 'pmd',
 # binfilter
     'application/x-starcalc': 'sdc',
     'application/vnd.stardivision.calc': 'sdc5',
commit 516fb340b1842a5deec3de61e47bb5a7ec5c1980
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Jun 26 21:26:11 2014 +0200

    integrate libpagemaker
    
    Change-Id: I077d7c9a41793abdf5f001386f44ac407f94a6d3

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index e69f625..39ca2d85 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1910,6 +1910,39 @@ endef
 endif # SYSTEM_MSPUB
 
 
+ifneq ($(SYSTEM_PAGEMAKER),)
+
+define gb_LinkTarget__use_pagemaker
+$(call gb_LinkTarget_set_include,$(1),\
+	$$(INCLUDE) \
+    $(PAGEMAKER_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
+
+endef
+gb_ExternalProject__use_pagemaker :=
+
+else # !SYSTEM_PAGEMAKER
+
+define gb_LinkTarget__use_pagemaker
+$(call gb_LinkTarget_set_include,$(1),\
+	-I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
+	$$(INCLUDE) \
+)
+$(call gb_LinkTarget_add_libs,$(1),\
+	$(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
+)
+$(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
+
+endef
+define gb_ExternalProject__use_pagemaker
+$(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
+
+endef
+
+endif # SYSTEM_PAGEMAKER
+
+
 ifneq ($(SYSTEM_VISIO),)
 
 define gb_LinkTarget__use_visio
diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype
index ce967e2..31ba07d 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -29,20 +29,20 @@ import stat
 import sys
 import threading, Queue
 try:
-    from urllib.request import urlopen
+from urllib.request import urlopen
 except:
-    from urllib import urlopen
+from urllib import urlopen
 try:
-    import xmlrpc.client as xmlrpclib
+import xmlrpc.client as xmlrpclib
 except:
-    import xmlrpclib
+import xmlrpclib
 from xml.dom import minidom
 from xml.sax.saxutils import escape
 
 def urlopen_retry(url):
-    maxretries = 3
-    for i in range(maxretries + 1):
-        try:
+maxretries = 3
+for i in range(maxretries + 1):
+    try:
             return urlopen(url)
         except IOError as e:
             print("caught IOError: " + str(e))
diff --git a/config_host.mk.in b/config_host.mk.in
index b7e5b6c..72e1f8c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -434,6 +434,8 @@ export OS_FOR_BUILD=@OS_FOR_BUILD@
 export OUTPATH=@OUTPATH@
 export PATH=@LO_PATH@
 export LIBO_PATH_SEPARATOR=@P_SEP@
+export PAGEMAKER_CFLAGS=$(gb_SPACE)@PAGEMAKER_CFLAGS@
+export PAGEMAKER_LIBS=$(gb_SPACE)@PAGEMAKER_LIBS@
 export PERL=@PERL@
 export PKGFORMAT=@PKGFORMAT@
 export PKGMK=@PKGMK@
@@ -551,6 +553,7 @@ export SYSTEM_ODBC_HEADERS=@SYSTEM_ODBC_HEADERS@
 export SYSTEM_ODFGEN=@SYSTEM_ODFGEN@
 export SYSTEM_OPENLDAP=@SYSTEM_OPENLDAP@
 export SYSTEM_OPENSSL=@SYSTEM_OPENSSL@
+export SYSTEM_PAGEMAKER=@SYSTEM_PAGEMAKER@
 export SYSTEM_POPPLER=@SYSTEM_POPPLER@
 export SYSTEM_POSTGRESQL=@SYSTEM_POSTGRESQL@
 export SYSTEM_PYTHON=@SYSTEM_PYTHON@
diff --git a/configure.ac b/configure.ac
index 3f43208..108cb14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7771,6 +7771,11 @@ dnl ===================================================================
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
 
 dnl ===================================================================
+dnl Check for system libpagemaker
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libpagemaker],[PAGEMAKER],[libpagemaker-0.0])
+
+dnl ===================================================================
 dnl Check for system libvisio
 dnl ===================================================================
 libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.1])
diff --git a/download.lst b/download.lst
index 28f2df3..3614789 100644
--- a/download.lst
+++ b/download.lst
@@ -110,6 +110,8 @@ export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
 export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
 export OPENSSL_TARBALL := 8d6d684a9430d5cc98a62a5d8fbda8cf-openssl-1.0.1h.tar.gz
 export ORCUS_TARBALL := 7681383be6ce489d84c1c74f4e7f9643-liborcus-0.7.0.tar.bz2
+export PAGEMAKER_MD5SUM := f4e44d2b3a67b5d5a18dce50366156f4
+export PAGEMAKER_TARBALL := libpagemaker-0.0.0.tar.bz2
 export PIXMAN_TARBALL := c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
 export PNG_MD5SUM := 5266905cef49d1224437465ad4d67fd9
 export PNG_TARBALL := libpng-1.5.18.tar.gz
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 7049278..2592bca 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
 	$(call gb_Helper_optional,OPENLDAP,openldap) \
 	$(call gb_Helper_optional,OPENSSL,openssl) \
 	$(call gb_Helper_optional,ORCUS,liborcus) \
+	$(call gb_Helper_optional,PAGEMAKER,libpagemaker) \
 	$(call gb_Helper_optional,POPPLER,poppler) \
 	$(call gb_Helper_optional,POSTGRESQL,postgresql) \
 	$(call gb_Helper_optional,PYTHON,python3) \
diff --git a/external/libpagemaker/ExternalProject_libpagemaker.mk b/external/libpagemaker/ExternalProject_libpagemaker.mk
new file mode 100644
index 0000000..f2bd4cf
--- /dev/null
+++ b/external/libpagemaker/ExternalProject_libpagemaker.mk
@@ -0,0 +1,41 @@
+# -*- 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,libpagemaker))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libpagemaker,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libpagemaker,\
+	build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libpagemaker,\
+	boost_headers \
+	revenge \
+))
+
+$(call gb_ExternalProject_get_state_target,libpagemaker,build) :
+	$(call gb_ExternalProject_run,build,\
+		export PKG_CONFIG="" \
+		&& ./configure \
+			--with-pic \
+			--enable-static \
+			--disable-shared \
+			--without-docs \
+			--disable-tools \
+			--disable-debug \
+			--disable-werror \
+			--disable-weffc \
+			$(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \
+			CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side))" \
+			$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+		&& $(MAKE) \
+	)
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libpagemaker/Makefile b/external/libpagemaker/Makefile
new file mode 100644
index 0000000..e4968cf
--- /dev/null
+++ b/external/libpagemaker/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/libpagemaker/Module_libpagemaker.mk b/external/libpagemaker/Module_libpagemaker.mk
new file mode 100644
index 0000000..4888775
--- /dev/null
+++ b/external/libpagemaker/Module_libpagemaker.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,libpagemaker))
+
+$(eval $(call gb_Module_add_targets,libpagemaker,\
+	ExternalProject_libpagemaker \
+	UnpackedTarball_libpagemaker \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libpagemaker/README b/external/libpagemaker/README
new file mode 100644
index 0000000..e60dbd7
--- /dev/null
+++ b/external/libpagemaker/README
@@ -0,0 +1 @@
+Library parsing Adobe PageMaker documents.
diff --git a/external/libpagemaker/UnpackedTarball_libpagemaker.mk b/external/libpagemaker/UnpackedTarball_libpagemaker.mk
new file mode 100644
index 0000000..fec1c03
--- /dev/null
+++ b/external/libpagemaker/UnpackedTarball_libpagemaker.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,libpagemaker))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libpagemaker,$(PAGEMAKER_TARBALL)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 57d6940..e035464 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -624,6 +624,7 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/s
 	draw_Mac_Works \
 	draw_MacPaint \
 	draw_SuperPaint \
+	draw_PageMaker_Document \
 )
 
 $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.xcu,filter/source/config/fragments/filters,\
@@ -645,6 +646,7 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.xcu,filt
 	Mac_Works_Draw \
 	MacPaint_Draw \
 	SuperPaint_Draw \
+	PageMakerDocument \
 )
 
 $(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fragments/filters,\
diff --git a/filter/source/config/fragments/filters/PageMakerDocument.xcu b/filter/source/config/fragments/filters/PageMakerDocument.xcu
new file mode 100644
index 0000000..72f3994
--- /dev/null
+++ b/filter/source/config/fragments/filters/PageMakerDocument.xcu
@@ -0,0 +1,13 @@
+    <node oor:name="PageMaker Document" oor:op="replace">
+        <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
+        <prop oor:name="UIComponent"/>
+        <prop oor:name="FilterService"><value>org.libreoffice.comp.Draw.PageMakerImportFilter</value></prop>
+        <prop oor:name="UserData"><value></value></prop>
+        <prop oor:name="UIName">
+            <value xml:lang="en-US">Adobe PageMaker</value>
+        </prop>
+        <prop oor:name="FileFormatVersion"><value>0</value></prop>
+        <prop oor:name="Type"><value>draw_PageMaker_Document</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_PageMaker_Document.xcu b/filter/source/config/fragments/types/draw_PageMaker_Document.xcu
new file mode 100644
index 0000000..0ec1bf2
--- /dev/null
+++ b/filter/source/config/fragments/types/draw_PageMaker_Document.xcu
@@ -0,0 +1,12 @@
+        <node oor:name="draw_PageMaker_Document" oor:op="replace" >
+            <prop oor:name="DetectService"><value>org.libreoffice.comp.Draw.PageMakerImportFilter</value></prop>
+            <prop oor:name="URLPattern"/>
+            <prop oor:name="Extensions"><value>p65 pm pm6 pmd</value></prop>
+            <prop oor:name="MediaType"><value>application/x-pagemaker</value></prop>
+            <prop oor:name="Preferred"><value>true</value></prop>
+            <prop oor:name="PreferredFilter"><value>PageMaker Document</value></prop>
+            <prop oor:name="UIName">
+                <value>Adobe PageMaker</value>
+            </prop>
+            <prop oor:name="ClipboardFormat"/>
+        </node>
diff --git a/writerperfect/Library_wpftdraw.mk b/writerperfect/Library_wpftdraw.mk
index 01a1ebe..973431c 100644
--- a/writerperfect/Library_wpftdraw.mk
+++ b/writerperfect/Library_wpftdraw.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_externals,wpftdraw,\
 	mspub \
 	mwaw \
 	odfgen \
+	pagemaker \
 	revenge \
 	visio \
 	wpg \
@@ -60,6 +61,7 @@ $(eval $(call gb_Library_add_exception_objects,wpftdraw,\
 	writerperfect/source/draw/ImportFilterBase \
 	writerperfect/source/draw/MSPUBImportFilter \
 	writerperfect/source/draw/MWAWDrawImportFilter \
+	writerperfect/source/draw/PageMakerImportFilter \
 	writerperfect/source/draw/VisioImportFilter \
 	writerperfect/source/draw/WPGImportFilter \
 	writerperfect/source/draw/wpftdraw_genericfilter \
diff --git a/writerperfect/qa/unit/data/draw/libpagemaker/fail/.gitignore b/writerperfect/qa/unit/data/draw/libpagemaker/fail/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/writerperfect/qa/unit/data/draw/libpagemaker/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libpagemaker/indeterminate/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/writerperfect/qa/unit/data/draw/libpagemaker/pass/shapes.pmd b/writerperfect/qa/unit/data/draw/libpagemaker/pass/shapes.pmd
new file mode 100644
index 0000000..40e7df8
Binary files /dev/null and b/writerperfect/qa/unit/data/draw/libpagemaker/pass/shapes.pmd differ
diff --git a/writerperfect/source/draw/PageMakerImportFilter.cxx b/writerperfect/source/draw/PageMakerImportFilter.cxx
new file mode 100644
index 0000000..a43cfae
--- /dev/null
+++ b/writerperfect/source/draw/PageMakerImportFilter.cxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* PageMakerImportFilter: Sets up the filter, and calls OdgExporter
+ * to do the actual filtering
+ *
+ * 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 <libodfgen/libodfgen.hxx>
+
+#include <libpagemaker/libpagemaker.h>
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <cppuhelper/supportsservice.hxx>
+
+#include "PageMakerImportFilter.hxx"
+
+using com::sun::star::uno::Reference;
+using com::sun::star::uno::Exception;
+using com::sun::star::uno::RuntimeException;
+using com::sun::star::uno::Sequence;
+using com::sun::star::uno::XComponentContext;
+using com::sun::star::uno::XInterface;
+
+bool PageMakerImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+{
+    return libpagemaker::PMDocument::parse(&rInput, &rGenerator);
+}
+
+bool PageMakerImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+{
+    if (libpagemaker::PMDocument::isSupported(&rInput))
+    {
+        rTypeName = "draw_PageMaker_Document";
+        return true;
+    }
+
+    return false;
+}
+
+OUString PageMakerImportFilter_getImplementationName ()
+throw (RuntimeException)
+{
+    return OUString( "org.libreoffice.comp.Draw.PageMakerImportFilter" );
+}
+
+Sequence< OUString > SAL_CALL PageMakerImportFilter_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 PageMakerImportFilter_createInstance( const Reference< XComponentContext > & rContext)
+throw( Exception )
+{
+    return (cppu::OWeakObject *) new PageMakerImportFilter( rContext );
+}
+
+// XServiceInfo
+OUString SAL_CALL PageMakerImportFilter::getImplementationName(  )
+throw (RuntimeException, std::exception)
+{
+    return PageMakerImportFilter_getImplementationName();
+}
+sal_Bool SAL_CALL PageMakerImportFilter::supportsService( const OUString &rServiceName )
+throw (RuntimeException, std::exception)
+{
+    return cppu::supportsService( this, rServiceName );
+}
+Sequence< OUString > SAL_CALL PageMakerImportFilter::getSupportedServiceNames(  )
+throw (RuntimeException, std::exception)
+{
+    return PageMakerImportFilter_getSupportedServiceNames();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/PageMakerImportFilter.hxx b/writerperfect/source/draw/PageMakerImportFilter.hxx
new file mode 100644
index 0000000..cc9ef99
--- /dev/null
+++ b/writerperfect/source/draw/PageMakerImportFilter.hxx
@@ -0,0 +1,49 @@
+/* -*- 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 _PAGEMAKERIMPORTFILTER_HXX
+#define _PAGEMAKERIMPORTFILTER_HXX
+
+#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 PageMakerImportFilter : public writerperfect::draw::ImportFilterBase
+{
+public:
+    PageMakerImportFilter( 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;
+};
+
+OUString PageMakerImportFilter_getImplementationName()
+throw ( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::uno::Sequence< OUString > SAL_CALL PageMakerImportFilter_getSupportedServiceNames(  )
+throw ( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+SAL_CALL PageMakerImportFilter_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/draw/wpftdraw.component b/writerperfect/source/draw/wpftdraw.component
index cc65f3c..efc5673 100644
--- a/writerperfect/source/draw/wpftdraw.component
+++ b/writerperfect/source/draw/wpftdraw.component
@@ -37,4 +37,8 @@
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
+  <implementation name="org.libreoffice.comp.Draw.PageMakerImportFilter">
+    <service name="com.sun.star.document.ImportFilter"/>
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+  </implementation>
 </component>
diff --git a/writerperfect/source/draw/wpftdraw_genericfilter.cxx b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
index 821ac7c..e800141 100644
--- a/writerperfect/source/draw/wpftdraw_genericfilter.cxx
+++ b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
@@ -33,6 +33,7 @@
 #include "CMXImportFilter.hxx"
 #include "MSPUBImportFilter.hxx"
 #include "MWAWDrawImportFilter.hxx"
+#include "PageMakerImportFilter.hxx"
 #include "FreehandImportFilter.hxx"
 #include "VisioImportFilter.hxx"
 #include "WPGImportFilter.hxx"
@@ -50,6 +51,10 @@ static cppu::ImplementationEntry const services[] = {
       &FreehandImportFilter_getImplementationName,
       &FreehandImportFilter_getSupportedServiceNames,
       &cppu::createSingleComponentFactory, 0, 0 },
+    { &PageMakerImportFilter_createInstance,
+      &PageMakerImportFilter_getImplementationName,
+      &PageMakerImportFilter_getSupportedServiceNames,
+      &cppu::createSingleComponentFactory, 0, 0 },
     { &MSPUBImportFilter_createInstance,
       &MSPUBImportFilter_getImplementationName,
       &MSPUBImportFilter_getSupportedServiceNames,


More information about the Libreoffice-commits mailing list