From a3c8a0ed0c5c6be1cb5c940750222f6381608bd7 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 --- dtrans/prj/d.lst | 5 ++++ dtrans/source/cnttype/exports.dxp | 1 - dtrans/source/cnttype/mctfentry.cxx | 29 ---------------------- dtrans/source/generic/dtrans.component | 37 ++++++++++++++++++++++++++++ dtrans/source/generic/dtrans.cxx | 37 ---------------------------- dtrans/source/generic/exports.dxp | 1 - dtrans/source/generic/makefile.mk | 8 ++++++ dtrans/source/os2/clipb/Os2Service.cxx | 22 ----------------- dtrans/source/os2/clipb/exports.dxp | 1 - dtrans/source/win32/clipb/exports.dxp | 1 - dtrans/source/win32/clipb/wcbentry.cxx | 29 ---------------------- dtrans/source/win32/dnd/dndentry.cxx | 33 ------------------------- dtrans/source/win32/dnd/exports.dxp | 1 - dtrans/source/win32/ftransl/exports.dxp | 1 - dtrans/source/win32/ftransl/ftranslentry.cxx | 29 ---------------------- dtrans/util/dnd.component | 37 ++++++++++++++++++++++++++++ dtrans/util/exports.dxp | 1 - dtrans/util/ftransl.component | 34 +++++++++++++++++++++++++ dtrans/util/makefile.mk | 29 ++++++++++++++++++++++ dtrans/util/mcnttype.component | 34 +++++++++++++++++++++++++ dtrans/util/sysdtrans.component | 34 +++++++++++++++++++++++++ 21 files changed, 218 insertions(+), 186 deletions(-) create mode 100644 dtrans/source/generic/dtrans.component create mode 100644 dtrans/util/dnd.component create mode 100644 dtrans/util/ftransl.component create mode 100644 dtrans/util/mcnttype.component create mode 100644 dtrans/util/sysdtrans.component (limited to 'dtrans') diff --git a/dtrans/prj/d.lst b/dtrans/prj/d.lst index a1a7c2e95480..955aa075f24b 100644 --- a/dtrans/prj/d.lst +++ b/dtrans/prj/d.lst @@ -7,3 +7,8 @@ ..\source\win32\ftransl\ftransl.xml %_DEST%\xml%_EXT%\ftransl.xml ..\source\cnttype\mcnttype.xml %_DEST%\xml%_EXT%\mcnttype.xml ..\source\generic\dtrans.xml %_DEST%\xml%_EXT%\dtrans.xml +..\%__SRC%\misc\dnd.component %_DEST%\xml%_EXT%\dnd.component +..\%__SRC%\misc\dtrans.component %_DEST%\xml%_EXT%\dtrans.component +..\%__SRC%\misc\ftransl.component %_DEST%\xml%_EXT%\ftransl.component +..\%__SRC%\misc\mcnttype.component %_DEST%\xml%_EXT%\mcnttype.component +..\%__SRC%\misc\sysdtrans.component %_DEST%\xml%_EXT%\sysdtrans.component diff --git a/dtrans/source/cnttype/exports.dxp b/dtrans/source/cnttype/exports.dxp index 028ac4175990..f0e1c69934bc 100644 --- a/dtrans/source/cnttype/exports.dxp +++ b/dtrans/source/cnttype/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dtrans/source/cnttype/mctfentry.cxx b/dtrans/source/cnttype/mctfentry.cxx index 095c9ed186ce..3d2e41201887 100644 --- a/dtrans/source/cnttype/mctfentry.cxx +++ b/dtrans/source/cnttype/mctfentry.cxx @@ -99,35 +99,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//------------------------------------------------------------------------- -// component_writeInfo - to register a UNO-Service -// to register a UNO-Service use: regcomp -register -r *.rdb -c *.dll -// to view the registry use: regview *.rdb /SERVICES/ServiceName -// (you must use the full services name e.g. com.sun.star.frame.FilePicker -//------------------------------------------------------------------------- - -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_False; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( MIMECONTENTTYPEFACTORY_REGKEY_NAME ) ) ); - bRetVal = sal_True; - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "InvalidRegistryException caught"); - bRetVal = sal_False; - } - } - - return bRetVal; -} - //---------------------------------------------------------------------- // component_getFactory // returns a factory to create XFilePicker-Services diff --git a/dtrans/source/generic/dtrans.component b/dtrans/source/generic/dtrans.component new file mode 100644 index 000000000000..69034f716907 --- /dev/null +++ b/dtrans/source/generic/dtrans.component @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/dtrans/source/generic/dtrans.cxx b/dtrans/source/generic/dtrans.cxx index 1e69158a6a12..4b39298f97c2 100644 --- a/dtrans/source/generic/dtrans.cxx +++ b/dtrans/source/generic/dtrans.cxx @@ -52,43 +52,6 @@ void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvType //================================================================================================== -sal_Bool SAL_CALL component_writeInfo(void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - Reference< XRegistryKey > xNewKey( - reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString::createFromAscii("/" CLIPBOARDMANAGER_IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) ); - - const Sequence< OUString > & rSNL = ClipboardManager_getSupportedServiceNames(); - const OUString * pArray = rSNL.getConstArray(); - sal_Int32 nPos; - for ( nPos = rSNL.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( - OUString::createFromAscii("/" GENERIC_CLIPBOARD_IMPLEMENTATION_NAME "/UNO/SERVICES" ) ); - - const Sequence< OUString > & rSNL2 = GenericClipboard_getSupportedServiceNames(); - pArray = rSNL2.getConstArray(); - for ( nPos = rSNL2.getLength(); nPos--; ) - xNewKey->createKey( pArray[nPos] ); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return sal_False; -} - -//================================================================================================== - void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, diff --git a/dtrans/source/generic/exports.dxp b/dtrans/source/generic/exports.dxp index 9630d7e06768..f0e1c69934bc 100644 --- a/dtrans/source/generic/exports.dxp +++ b/dtrans/source/generic/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dtrans/source/generic/makefile.mk b/dtrans/source/generic/makefile.mk index e015400c32d9..2518b86a2d92 100644 --- a/dtrans/source/generic/makefile.mk +++ b/dtrans/source/generic/makefile.mk @@ -65,3 +65,11 @@ DEF1EXPORTFILE= exports.dxp .ENDIF # L10N_framework .INCLUDE : target.mk + +ALLTAR : $(MISC)/dtrans.component + +$(MISC)/dtrans.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dtrans.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dtrans.component diff --git a/dtrans/source/os2/clipb/Os2Service.cxx b/dtrans/source/os2/clipb/Os2Service.cxx index cc3e1e9a9b94..0c3e299f0299 100644 --- a/dtrans/source/os2/clipb/Os2Service.cxx +++ b/dtrans/source/os2/clipb/Os2Service.cxx @@ -56,28 +56,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_False; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( OS2_CLIPBOARD_REGKEY_NAME ) ) ); - bRetVal = sal_True; - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "InvalidRegistryException caught"); - bRetVal = sal_False; - } - } - - return bRetVal; -} - void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* pRegistryKey ) { void* pRet = 0; diff --git a/dtrans/source/os2/clipb/exports.dxp b/dtrans/source/os2/clipb/exports.dxp index f72beb0fcb31..926e49f5f1a5 100644 --- a/dtrans/source/os2/clipb/exports.dxp +++ b/dtrans/source/os2/clipb/exports.dxp @@ -1,4 +1,3 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dtrans/source/win32/clipb/exports.dxp b/dtrans/source/win32/clipb/exports.dxp index f72beb0fcb31..926e49f5f1a5 100644 --- a/dtrans/source/win32/clipb/exports.dxp +++ b/dtrans/source/win32/clipb/exports.dxp @@ -1,4 +1,3 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx index 986e7b4c4db7..653d97194efc 100644 --- a/dtrans/source/win32/clipb/wcbentry.cxx +++ b/dtrans/source/win32/clipb/wcbentry.cxx @@ -97,35 +97,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//------------------------------------------------------------------------- -// component_writeInfo - to register a UNO-Service -// to register a UNO-Service use: regcomp -register -r *.rdb -c *.dll -// to view the registry use: regview *.rdb /SERVICES/ServiceName -// (you must use the full services name e.g. com.sun.star.frame.FilePicker -//------------------------------------------------------------------------- - -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_False; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( WINCLIPBOARD_REGKEY_NAME ) ) ); - bRetVal = sal_True; - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "InvalidRegistryException caught"); - bRetVal = sal_False; - } - } - - return bRetVal; -} - //---------------------------------------------------------------------- // component_getFactory // returns a factory to create XFilePicker-Services diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx index 2ea9b7746def..d37fa07ba3bd 100644 --- a/dtrans/source/win32/dnd/dndentry.cxx +++ b/dtrans/source/win32/dnd/dndentry.cxx @@ -72,39 +72,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//------------------------------------------------------------------------- -// component_writeInfo - to register a UNO-Service -// to register a UNO-Service use: regcomp -register -r *.rdb -c *.dll -// to view the registry use: regview *.rdb /SERVICES/ServiceName -// (you must use the full services name e.g. com.sun.star.frame.FilePicker -//------------------------------------------------------------------------- - -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_False; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( DNDSOURCE_REGKEY_NAME ) ) ); - bRetVal = sal_True; - - pXNewKey= static_cast< XRegistryKey* >( pRegistryKey ); - pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( DNDTARGET_REGKEY_NAME ) ) ); - bRetVal = sal_True; - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "InvalidRegistryException caught"); - bRetVal = sal_False; - } - } - - return bRetVal; -} - //---------------------------------------------------------------------- // component_getFactory // returns a factory to create XFilePicker-Services diff --git a/dtrans/source/win32/dnd/exports.dxp b/dtrans/source/win32/dnd/exports.dxp index 028ac4175990..f0e1c69934bc 100644 --- a/dtrans/source/win32/dnd/exports.dxp +++ b/dtrans/source/win32/dnd/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dtrans/source/win32/ftransl/exports.dxp b/dtrans/source/win32/ftransl/exports.dxp index 028ac4175990..f0e1c69934bc 100644 --- a/dtrans/source/win32/ftransl/exports.dxp +++ b/dtrans/source/win32/ftransl/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx index 01d1521b15bc..abdd27ffcdae 100644 --- a/dtrans/source/win32/ftransl/ftranslentry.cxx +++ b/dtrans/source/win32/ftransl/ftranslentry.cxx @@ -102,35 +102,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//------------------------------------------------------------------------- -// component_writeInfo - to register a UNO-Service -// to register a UNO-Service use: regcomp -register -r *.rdb -c *.dll -// to view the registry use: regview *.rdb /SERVICES/ServiceName -// (you must use the full services name e.g. com.sun.star.frame.FilePicker -//------------------------------------------------------------------------- - -sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRetVal = sal_False; - - if ( pRegistryKey ) - { - try - { - Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) ); - pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( REGKEY_NAME ) ) ); - bRetVal = sal_True; - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "InvalidRegistryException caught"); - bRetVal = sal_False; - } - } - - return bRetVal; -} - //---------------------------------------------------------------------- // component_getFactory // returns a factory to create XFilePicker-Services diff --git a/dtrans/util/dnd.component b/dtrans/util/dnd.component new file mode 100644 index 000000000000..b56fe326f04f --- /dev/null +++ b/dtrans/util/dnd.component @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/dtrans/util/exports.dxp b/dtrans/util/exports.dxp index 028ac4175990..f0e1c69934bc 100644 --- a/dtrans/util/exports.dxp +++ b/dtrans/util/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/dtrans/util/ftransl.component b/dtrans/util/ftransl.component new file mode 100644 index 000000000000..dad7d341cce7 --- /dev/null +++ b/dtrans/util/ftransl.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/dtrans/util/makefile.mk b/dtrans/util/makefile.mk index 0443c131ccb6..8df69bbf1d36 100644 --- a/dtrans/util/makefile.mk +++ b/dtrans/util/makefile.mk @@ -180,3 +180,32 @@ DEF3EXPORTFILE= exports.dxp .INCLUDE : target.mk +ALLTAR : \ + $(MISC)/dnd.component \ + $(MISC)/ftransl.component \ + $(MISC)/mcnttype.component \ + $(MISC)/sysdtrans.component + +$(MISC)/dnd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dnd.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL4TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dnd.component + +$(MISC)/ftransl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ftransl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ftransl.component + +$(MISC)/mcnttype.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + mcnttype.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt mcnttype.component + +$(MISC)/sysdtrans.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + sysdtrans.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt sysdtrans.component diff --git a/dtrans/util/mcnttype.component b/dtrans/util/mcnttype.component new file mode 100644 index 000000000000..f5a937a7a77a --- /dev/null +++ b/dtrans/util/mcnttype.component @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/dtrans/util/sysdtrans.component b/dtrans/util/sysdtrans.component new file mode 100644 index 000000000000..ec1807000b3f --- /dev/null +++ b/dtrans/util/sysdtrans.component @@ -0,0 +1,34 @@ + + + + + + + + -- cgit v1.2.3