summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/tdoc
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/tdoc
parent7a54dffcfbdb0d2e004ad070c35f511cee6642b5 (diff)
sb129: #i113189# change UNO components to use passive registration
Diffstat (limited to 'ucb/source/ucp/tdoc')
-rw-r--r--ucb/source/ucp/tdoc/makefile.mk8
-rw-r--r--ucb/source/ucp/tdoc/tdoc_services.cxx62
-rw-r--r--ucb/source/ucp/tdoc/ucptdoc1.component37
3 files changed, 45 insertions, 62 deletions
diff --git a/ucb/source/ucp/tdoc/makefile.mk b/ucb/source/ucp/tdoc/makefile.mk
index 83e9599eed72..82c76b34b206 100644
--- a/ucb/source/ucp/tdoc/makefile.mk
+++ b/ucb/source/ucp/tdoc/makefile.mk
@@ -92,3 +92,11 @@ DEF1NAME=$(SHL1TARGET)
.INCLUDE: target.mk
+
+ALLTAR : $(MISC)/ucptdoc1.component
+
+$(MISC)/ucptdoc1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ ucptdoc1.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt ucptdoc1.component
diff --git a/ucb/source/ucp/tdoc/tdoc_services.cxx b/ucb/source/ucp/tdoc/tdoc_services.cxx
index 6f9641d5159b..fc34fd78b1a4 100644
--- a/ucb/source/ucp/tdoc/tdoc_services.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_services.cxx
@@ -39,45 +39,6 @@ using namespace com::sun::star;
using namespace tdoc_ucp;
//=========================================================================
-static 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;
-}
-
-//=========================================================================
extern "C" void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
@@ -85,29 +46,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
}
//=========================================================================
-extern "C" sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/, void * pRegistryKey )
-{
- return pRegistryKey &&
-
- //////////////////////////////////////////////////////////////////////
- // Transient Documents Content Provider.
- //////////////////////////////////////////////////////////////////////
-
- writeInfo( pRegistryKey,
- ContentProvider::getImplementationName_Static(),
- ContentProvider::getSupportedServiceNames_Static() ) &&
-
- //////////////////////////////////////////////////////////////////////
- // Transient Documents Document Content Factory.
- //////////////////////////////////////////////////////////////////////
-
- writeInfo( pRegistryKey,
- DocumentContentFactory::getImplementationName_Static(),
- DocumentContentFactory::getSupportedServiceNames_Static() );
-}
-
-//=========================================================================
extern "C" void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
diff --git a/ucb/source/ucp/tdoc/ucptdoc1.component b/ucb/source/ucp/tdoc/ucptdoc1.component
new file mode 100644
index 000000000000..8ba1471bd933
--- /dev/null
+++ b/ucb/source/ucp/tdoc/ucptdoc1.component
@@ -0,0 +1,37 @@
+<?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.TransientDocumentsContentProvider">
+ <service name="com.sun.star.ucb.TransientDocumentsContentProvider"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.ucb.TransientDocumentsDocumentContentFactory">
+ <service name="com.sun.star.frame.TransientDocumentsDocumentContentFactory"/>
+ </implementation>
+</component>