From 9551bf5a1ee5c9275a26f8ec4021e0b7f5665176 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 --- configmgr/prj/d.lst | 1 + configmgr/source/configmgr.component | 45 +++++++++++++++++++++++++++++++++ configmgr/source/makefile.mk | 8 ++++++ configmgr/source/services.cxx | 48 ------------------------------------ 4 files changed, 54 insertions(+), 48 deletions(-) create mode 100644 configmgr/source/configmgr.component (limited to 'configmgr') diff --git a/configmgr/prj/d.lst b/configmgr/prj/d.lst index 17ccdbe86a08..34b6cf3e0010 100644 --- a/configmgr/prj/d.lst +++ b/configmgr/prj/d.lst @@ -1,3 +1,4 @@ ..\%__SRC%\bin\configmgr.uno.dll %_DEST%\bin%_EXT%\configmgr.uno.dll ..\%__SRC%\lib\configmgr.uno.dylib %_DEST%\lib%_EXT%\configmgr.uno.dylib ..\%__SRC%\lib\configmgr.uno.so %_DEST%\lib%_EXT%\configmgr.uno.so +..\%__SRC%\misc\configmgr.component %_DEST%\xml%_EXT%\configmgr.component diff --git a/configmgr/source/configmgr.component b/configmgr/source/configmgr.component new file mode 100644 index 000000000000..6ed51257005d --- /dev/null +++ b/configmgr/source/configmgr.component @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + diff --git a/configmgr/source/makefile.mk b/configmgr/source/makefile.mk index 37235a726ce4..94747d9dd803 100644 --- a/configmgr/source/makefile.mk +++ b/configmgr/source/makefile.mk @@ -81,3 +81,11 @@ SHL1USE_EXPORTS = name DEF1NAME = $(SHL1TARGET) .INCLUDE: target.mk + +ALLTAR : $(MISC)/configmgr.component + +$(MISC)/configmgr.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + configmgr.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt configmgr.component diff --git a/configmgr/source/services.cxx b/configmgr/source/services.cxx index f8c3289664ef..b1ef8d2169bb 100644 --- a/configmgr/source/services.cxx +++ b/configmgr/source/services.cxx @@ -28,7 +28,6 @@ #include "precompiled_configmgr.hxx" #include "sal/config.h" -#include "com/sun/star/registry/XRegistryKey.hpp" #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/XComponentContext.hpp" @@ -36,9 +35,6 @@ #include "cppuhelper/implementationentry.hxx" #include "osl/diagnose.h" #include "uno/lbnames.h" -#include "rtl/textenc.h" -#include "rtl/ustring.h" -#include "rtl/ustring.hxx" #include "sal/types.h" #include "configurationprovider.hxx" @@ -89,47 +85,3 @@ component_getImplementationEnvironment( { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * pServiceManager, void * pRegistryKey) -{ - if (!component_writeInfoHelper(pServiceManager, pRegistryKey, services)) { - return false; - } - try { - css::uno::Reference< css::registry::XRegistryKey >( - (css::uno::Reference< css::registry::XRegistryKey >( - static_cast< css::registry::XRegistryKey * >(pRegistryKey))-> - createKey( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "/com.sun.star.comp.configuration.DefaultProvider/UNO/" - "SINGLETONS/" - "com.sun.star.configuration.theDefaultProvider")))), - css::uno::UNO_SET_THROW)-> - setStringValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.DefaultProvider"))); - css::uno::Reference< css::registry::XRegistryKey >( - (css::uno::Reference< css::registry::XRegistryKey >( - static_cast< css::registry::XRegistryKey * >(pRegistryKey))-> - createKey( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "/com.sun.star.comp.configuration.Update/UNO/" - "SINGLETONS/com.sun.star.configuration.Update")))), - css::uno::UNO_SET_THROW)-> - setStringValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.Update_Service"))); - } catch (css::uno::Exception & e) { - (void) e; - OSL_TRACE( - "configmgr component_writeInfo exception: %s", - rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); - return false; - } - return true; -} -- cgit v1.2.3