From 5dbc43ead1b7ff5fa0c1f6756a9ca6062c48d033 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- UnoControls/prj/d.lst | 1 + UnoControls/source/base/registercontrols.cxx | 100 --------------------------- UnoControls/util/ctl.component | 43 ++++++++++++ UnoControls/util/makefile.mk | 8 +++ 4 files changed, 52 insertions(+), 100 deletions(-) create mode 100644 UnoControls/util/ctl.component (limited to 'UnoControls') 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 @@ -92,59 +92,6 @@ using namespace ::com::sun::star::registry ; return Reference< XInterface >( *(OWeakObject*)(new CLASS( rServiceManager )) ); \ } -//****************************************************************************************************************************** -#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) \ \ @@ -217,53 +164,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_ *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -//______________________________________________________________________________________________________________ -// 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 @@ + + + + + + + + + + + + + + + + + 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 -- cgit From 9c5ef3ce000e45a71438f337c3972d253e5e04cd Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 22 Oct 2010 10:37:46 +0200 Subject: sb131: #i115124# $(XSLTPROC) implies LIBXSLT:libxslt --- UnoControls/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'UnoControls') diff --git a/UnoControls/prj/build.lst b/UnoControls/prj/build.lst index de5d7fd81d33..775cb902f5ca 100644 --- a/UnoControls/prj/build.lst +++ b/UnoControls/prj/build.lst @@ -1,4 +1,4 @@ -us UnoControls : cppuhelper offuh tools NULL +us UnoControls : LIBXSLT:libxslt cppuhelper offuh tools NULL us UnoControls usr1 - all us_mkout NULL us UnoControls\source\base nmake - all us_base NULL us UnoControls\source\controls nmake - all us_ctrls NULL -- cgit