summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/package
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-09-10 13:10:07 +0200
committersb <sb@openoffice.org>2010-09-10 13:10:07 +0200
commit9551bf5a1ee5c9275a26f8ec4021e0b7f5665176 (patch)
tree9c440724c8563bf927448d91c542469f1e18964b /ucb/source/ucp/package
parent7a54dffcfbdb0d2e004ad070c35f511cee6642b5 (diff)
sb129: #i113189# change UNO components to use passive registration
Diffstat (limited to 'ucb/source/ucp/package')
-rw-r--r--ucb/source/ucp/package/makefile.mk8
-rw-r--r--ucb/source/ucp/package/pkgservices.cxx59
-rw-r--r--ucb/source/ucp/package/ucppkg1.component34
3 files changed, 42 insertions, 59 deletions
diff --git a/ucb/source/ucp/package/makefile.mk b/ucb/source/ucp/package/makefile.mk
index a8cdf7430703..b78150aed2cb 100644
--- a/ucb/source/ucp/package/makefile.mk
+++ b/ucb/source/ucp/package/makefile.mk
@@ -87,3 +87,11 @@ DEF1NAME=$(SHL1TARGET)
.ENDIF # L10N_framework
.INCLUDE: target.mk
+
+ALLTAR : $(MISC)/ucppkg1.component
+
+$(MISC)/ucppkg1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ ucppkg1.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt ucppkg1.component
diff --git a/ucb/source/ucp/package/pkgservices.cxx b/ucb/source/ucp/package/pkgservices.cxx
index 251ce8c78dd1..ad4af686d2d6 100644
--- a/ucb/source/ucp/package/pkgservices.cxx
+++ b/ucb/source/ucp/package/pkgservices.cxx
@@ -34,50 +34,6 @@
using namespace com::sun::star;
-namespace {
-
-//=========================================================================
-sal_Bool writeInfo(
- void * pRegistryKey,
- const rtl::OUString & rImplementationName,
- uno::Sequence< rtl::OUString > const & rServiceNames )
-{
- rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) );
- aKeyName += rImplementationName;
- aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" );
-
- uno::Reference< registry::XRegistryKey > xKey;
- try
- {
- xKey = static_cast< registry::XRegistryKey * >(
- pRegistryKey )->createKey( aKeyName );
- }
- catch ( registry::InvalidRegistryException const & )
- {
- }
-
- if ( !xKey.is() )
- return sal_False;
-
- sal_Bool bSuccess = sal_True;
-
- for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n )
- {
- try
- {
- xKey->createKey( rServiceNames[ n ] );
- }
- catch ( registry::InvalidRegistryException const & )
- {
- bSuccess = sal_False;
- break;
- }
- }
- return bSuccess;
-}
-
-} // namespace
-
//=========================================================================
extern "C" void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
@@ -86,21 +42,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
}
//=========================================================================
-extern "C" sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/, void * pRegistryKey )
-{
- return pRegistryKey &&
-
- //////////////////////////////////////////////////////////////////////
- // Write info into registry.
- //////////////////////////////////////////////////////////////////////
-
- writeInfo( pRegistryKey,
- ::package_ucp::ContentProvider::getImplementationName_Static(),
- ::package_ucp::ContentProvider::getSupportedServiceNames_Static() );
-}
-
-//=========================================================================
extern "C" void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
diff --git a/ucb/source/ucp/package/ucppkg1.component b/ucb/source/ucp/package/ucppkg1.component
new file mode 100644
index 000000000000..a2e2418b5602
--- /dev/null
+++ b/ucb/source/ucp/package/ucppkg1.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.ucb.PackageContentProvider">
+ <service name="com.sun.star.ucb.PackageContentProvider"/>
+ </implementation>
+</component>