summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-04-19 12:12:29 +0200
committerDavid Tardon <dtardon@redhat.com>2012-04-19 13:33:18 +0200
commitabd74a8ef0ef260f901b1a03ca4dd47644e5fd46 (patch)
tree006496763a227dcefde2ce96bc3a4c3ad88520f0 /sdext
parent6d9a524352948695e9395226c7568980fd4d5f12 (diff)
convert pdfimport to passive registration
Diffstat (limited to 'sdext')
-rw-r--r--sdext/Extension_pdfimport.mk2
-rw-r--r--sdext/Library_pdfimport.mk2
-rw-r--r--sdext/Module_sdext.mk1
-rw-r--r--sdext/Rdb_pdfimport.mk34
-rw-r--r--sdext/source/pdfimport/manifest.xml4
-rw-r--r--sdext/source/pdfimport/pdfimport.component19
-rw-r--r--sdext/source/pdfimport/services.cxx30
7 files changed, 60 insertions, 32 deletions
diff --git a/sdext/Extension_pdfimport.mk b/sdext/Extension_pdfimport.mk
index b2a7786ec69f..0ecdff1630d2 100644
--- a/sdext/Extension_pdfimport.mk
+++ b/sdext/Extension_pdfimport.mk
@@ -31,6 +31,8 @@ $(eval $(call gb_Extension_Extension,pdfimport,sdext/source/pdfimport))
$(eval $(call gb_Extension_set_platform,pdfimport,$(sdext_PLATFORM)))
+$(eval $(call gb_Extension_add_file,pdfimport,components.rdb,$(call gb_Rdb_get_target,pdfimport)))
+
$(eval $(call gb_Extension_add_files,pdfimport,,\
$(call gb_Executable_get_target,xpdfimport) \
$(call gb_Library_get_target,pdfimport) \
diff --git a/sdext/Library_pdfimport.mk b/sdext/Library_pdfimport.mk
index 01d14318ebb9..9e54d907b436 100644
--- a/sdext/Library_pdfimport.mk
+++ b/sdext/Library_pdfimport.mk
@@ -27,6 +27,8 @@
$(eval $(call gb_Library_Library,pdfimport))
+$(eval $(call gb_Library_set_componentfile,pdfimport,sdext/source/pdfimport/pdfimport))
+
$(eval $(call gb_Library_use_api,pdfimport,\
offapi \
udkapi \
diff --git a/sdext/Module_sdext.mk b/sdext/Module_sdext.mk
index 8362da275b6f..8d45d0288b11 100644
--- a/sdext/Module_sdext.mk
+++ b/sdext/Module_sdext.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_Module_add_targets,sdext,\
Executable_xpdfimport \
Extension_pdfimport \
Library_pdfimport \
+ Rdb_pdfimport \
StaticLibrary_pdfimport_s \
))
diff --git a/sdext/Rdb_pdfimport.mk b/sdext/Rdb_pdfimport.mk
new file mode 100644
index 000000000000..65334272ae97
--- /dev/null
+++ b/sdext/Rdb_pdfimport.mk
@@ -0,0 +1,34 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
+# (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Rdb_Rdb,pdfimport))
+
+$(eval $(call gb_Rdb_add_components,pdfimport,\
+ sdext/source/pdfimport/pdfimport \
+))
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sdext/source/pdfimport/manifest.xml b/sdext/source/pdfimport/manifest.xml
index 5a0aaa5e96ac..2264a20158c9 100644
--- a/sdext/source/pdfimport/manifest.xml
+++ b/sdext/source/pdfimport/manifest.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native"
- manifest:full-path="pdfimport.uno@SHARED_EXTENSION@"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-components;platform=@PLATFORM@"
+ manifest:full-path="components.rdb"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.executable"
manifest:full-path="xpdfimport@EXEC_EXTENSION@"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
diff --git a/sdext/source/pdfimport/pdfimport.component b/sdext/source/pdfimport/pdfimport.component
new file mode 100644
index 000000000000..1392302f358a
--- /dev/null
+++ b/sdext/source/pdfimport/pdfimport.component
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<component xmlns="http://openoffice.org/2010/uno-components"
+ loader="com.sun.star.loader.SharedLibrary">
+ <implementation name="com.sun.star.comp.documents.HybridPDFImport">
+ <service name="com.sun.star.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.documents.WriterPDFImport">
+ <service name="com.sun.star.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.documents.DrawPDFImport">
+ <service name="com.sun.star.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.documents.ImpressPDFImport">
+ <service name="com.sun.star.document.ImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.documents.PDFDetector">
+ <service name="com.sun.star.document.ImportFilter"/>
+ </implementation>
+</component>
diff --git a/sdext/source/pdfimport/services.cxx b/sdext/source/pdfimport/services.cxx
index e15d9a5f78ee..7e4da4b2132c 100644
--- a/sdext/source/pdfimport/services.cxx
+++ b/sdext/source/pdfimport/services.cxx
@@ -119,36 +119,6 @@ namespace
}
}
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL
-component_writeInfo(
- SAL_UNUSED_PARAMETER void* /*pServiceManager*/, void* pRegistryKey )
-{
- Reference< XRegistryKey > xRootKey( static_cast< XRegistryKey* >( pRegistryKey ) );
-
- ::rtl::OUString sRootKey( "/", 1, RTL_TEXTENCODING_ASCII_US );
-
- const ComponentDescription* pComponents = lcl_getComponents();
- while ( pComponents->pAsciiServiceName != NULL )
- {
- ::rtl::OUString sMainKeyName( sRootKey );
- sMainKeyName += ::rtl::OUString::createFromAscii( pComponents->pAsciiImplementationName );
- sMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
-
- try
- {
- Reference< XRegistryKey > xNewKey( xRootKey->createKey( sMainKeyName ) );
- xNewKey->createKey( ::rtl::OUString::createFromAscii( pComponents->pAsciiServiceName ) );
- }
- catch( Exception& )
- {
- OSL_FAIL( "OModule::writeComponentInfos: something went wrong while creating the keys!" );
- return sal_False;
- }
- ++pComponents;
- }
- return sal_True;
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
SAL_UNUSED_PARAMETER void* /*pServiceManager*/,