summaryrefslogtreecommitdiff
path: root/UnoControls
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
commit5dbc43ead1b7ff5fa0c1f6756a9ca6062c48d033 (patch)
tree5edda4f51842da35f56ef41ca0b6ce8d98f14d01 /UnoControls
parentec38ffb43215161d6f0f8769f870e76850c8161c (diff)
sb129: #i113189# change UNO components to use passive registration
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/prj/d.lst1
-rw-r--r--UnoControls/source/base/registercontrols.cxx100
-rw-r--r--UnoControls/util/ctl.component43
-rw-r--r--UnoControls/util/makefile.mk8
4 files changed, 52 insertions, 100 deletions
diff --git a/UnoControls/prj/d.lst b/UnoControls/prj/d.lst
index 5f65d3c80717..370fc0c9fc46 100644
--- a/UnoControls/prj/d.lst
+++ b/UnoControls/prj/d.lst
@@ -3,3 +3,4 @@
..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
+..\%__SRC%\misc\ctl.component %_DEST%\xml%_EXT%\ctl.component
diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx
index 686c7578b88d..6a10f42b8fb8 100644
--- a/UnoControls/source/base/registercontrols.cxx
+++ b/UnoControls/source/base/registercontrols.cxx
@@ -93,59 +93,6 @@ using namespace ::com::sun::star::registry ;
}
//******************************************************************************************************************************
-#define COMPONENT_INFO(CLASS) \
- \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[start]\n" ) \
- try \
- { \
- /* Set default result of follow operations !!! */ \
- bReturn = sal_False ; \
- \
- /* Do the follow only, if given key is valid ! */ \
- if ( xKey.is () ) \
- { \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txkey is valid ...\n" ) \
- /* Build new keyname */ \
- sKeyName = OUString::createFromAscii( "/" ) ; \
- sKeyName += CLASS::impl_getStaticImplementationName() ; \
- sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \
- \
- /* Create new key with new name. */ \
- xNewKey = xKey->createKey( sKeyName ); \
- \
- /* If this new key valid ... */ \
- if ( xNewKey.is () ) \
- { \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txNewkey is valid ...\n" ) \
- /* Get information about supported services. */ \
- seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \
- pArray = seqServiceNames.getArray() ; \
- nLength = seqServiceNames.getLength() ; \
- nCounter = 0 ; \
- \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tloop ..." ) \
- /* Then set this information on this key. */ \
- for ( nCounter = 0; nCounter < nLength; ++nCounter ) \
- { \
- xNewKey->createKey( pArray [nCounter] ); \
- } \
- AS_DBG_OUT ( " OK\n" ) \
- \
- /* Result of this operations = OK. */ \
- bReturn = sal_True ; \
- } \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xNewKey\n" ) \
- } \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xKey\n" ) \
- } \
- catch( InvalidRegistryException& ) \
- { \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tInvalidRegistryException detected!!!\n" ) \
- bReturn = sal_False ; \
- } \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[end]\n" )
-
-//******************************************************************************************************************************
#define CREATEFACTORY_ONEINSTANCE(CLASS) \
\
AS_DBG_OUT ( "\tCREATEFACTORY_ONEINSTANCE():\t[start]\n" ) \
@@ -218,53 +165,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_
}
//______________________________________________________________________________________________________________
-// write component info to registry
-//______________________________________________________________________________________________________________
-
-extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ ,
- void* pRegistryKey )
-{
- AS_DBG_OUT ( "component_writeInfo():\t[start]\n" )
-
- // Set default return value for this operation - if it failed.
- sal_Bool bReturn = sal_False ;
-
- if ( pRegistryKey != NULL )
- {
- AS_DBG_OUT ( "component_writeInfo():\t\tpRegistryKey is valid ... enter scope\n" )
-
- // Define variables for following macros!
- // bReturn is set automaticly.
- Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ;
- Reference< XRegistryKey > xNewKey ;
- Sequence< OUString > seqServiceNames ;
- const OUString* pArray ;
- sal_Int32 nLength ;
- sal_Int32 nCounter ;
- OUString sKeyName ;
-
- //=============================================================================
- // Add new macro line to register new services.
- //
- // !!! ATTENTION !!!
- // Write no ";" at end of line! (see macro)
- //=============================================================================
- COMPONENT_INFO ( FrameControl )
- COMPONENT_INFO ( ProgressBar )
- COMPONENT_INFO ( ProgressMonitor )
- COMPONENT_INFO ( StatusIndicator )
- //=============================================================================
-
- AS_DBG_OUT ( "component_writeInfo():\t\t... leave pRegistryKey scope\n" )
- }
-
- AS_DBG_OUT ( "component_writeInfo():\t[end]\n" )
-
- // Return with result of this operation.
- return bReturn ;
-}
-
-//______________________________________________________________________________________________________________
// create right component factory
//______________________________________________________________________________________________________________
diff --git a/UnoControls/util/ctl.component b/UnoControls/util/ctl.component
new file mode 100644
index 000000000000..32901f529c8b
--- /dev/null
+++ b/UnoControls/util/ctl.component
@@ -0,0 +1,43 @@
+<?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="stardiv.UnoControls.FrameControl">
+ <service name="com.sun.star.frame.FrameControl"/>
+ </implementation>
+ <implementation name="stardiv.UnoControls.ProgressBar">
+ <service name="com.sun.star.awt.XProgressBar"/>
+ </implementation>
+ <implementation name="stardiv.UnoControls.ProgressMonitor">
+ <service name="com.sun.star.awt.XProgressMonitor"/>
+ </implementation>
+ <implementation name="stardiv.UnoControls.StatusIndicator">
+ <service name="com.sun.star.task.XStatusIndicator"/>
+ </implementation>
+</component>
diff --git a/UnoControls/util/makefile.mk b/UnoControls/util/makefile.mk
index aacddb23c0ad..73617d24452c 100644
--- a/UnoControls/util/makefile.mk
+++ b/UnoControls/util/makefile.mk
@@ -59,3 +59,11 @@ SHL1LIBS= $(LIB1TARGET)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/ctl.component
+
+$(MISC)/ctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ ctl.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt ctl.component