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 --- .../hatchwindow/hatchwindowfactory.component | 38 +++++++++++++++++++++ svtools/source/hatchwindow/hatchwindowfactory.cxx | 39 ---------------------- svtools/source/hatchwindow/makefile.mk | 8 +++++ 3 files changed, 46 insertions(+), 39 deletions(-) create mode 100644 svtools/source/hatchwindow/hatchwindowfactory.component (limited to 'svtools/source/hatchwindow') diff --git a/svtools/source/hatchwindow/hatchwindowfactory.component b/svtools/source/hatchwindow/hatchwindowfactory.component new file mode 100644 index 000000000000..153fc8796281 --- /dev/null +++ b/svtools/source/hatchwindow/hatchwindowfactory.component @@ -0,0 +1,38 @@ + + + + + + + + + + + + diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx index f8dbddff3761..0eec027167c2 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.cxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx @@ -112,45 +112,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( - void * /* pServiceManager */, void * pRegistryKey) -{ - if (pRegistryKey) - { - uno::Reference< registry::XRegistryKey> xRegistryKey ( - reinterpret_cast< registry::XRegistryKey* >(pRegistryKey)); - uno::Reference< registry::XRegistryKey> xNewKey; - - // OHatchWindowFactory registration - - xNewKey = xRegistryKey->createKey ( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - OHatchWindowFactory::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - uno::Sequence< ::rtl::OUString > aServices = - OHatchWindowFactory::impl_staticGetSupportedServiceNames(); - for (sal_Int32 i = 0, n = aServices.getLength(); i < n; i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - - // ODocumentCloser registration - - xNewKey = xRegistryKey->createKey ( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + - ODocumentCloser::impl_staticGetImplementationName() + - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); - - aServices = ODocumentCloser::impl_staticGetSupportedServiceNames(); - for (sal_Int32 i = 0, n = aServices.getLength(); i < n; i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - - return sal_True; - } - return sal_False; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( const sal_Char * pImplementationName, void * pServiceManager, void * /* pRegistryKey */) { diff --git a/svtools/source/hatchwindow/makefile.mk b/svtools/source/hatchwindow/makefile.mk index 316e4ab1bfe2..3c736bc4e66a 100644 --- a/svtools/source/hatchwindow/makefile.mk +++ b/svtools/source/hatchwindow/makefile.mk @@ -63,3 +63,11 @@ DEF1NAME= $(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/hatchwindowfactory.component + +$(MISC)/hatchwindowfactory.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt hatchwindowfactory.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt hatchwindowfactory.component -- cgit