diff options
Diffstat (limited to 'shell/source/backends/macbe/macbecdef.cxx')
-rw-r--r-- | shell/source/backends/macbe/macbecdef.cxx | 48 |
1 files changed, 6 insertions, 42 deletions
diff --git a/shell/source/backends/macbe/macbecdef.cxx b/shell/source/backends/macbe/macbecdef.cxx index 22698eb91ec5..18cf2806c16b 100644 --- a/shell/source/backends/macbe/macbecdef.cxx +++ b/shell/source/backends/macbe/macbecdef.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: macbecdef.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -42,14 +39,13 @@ namespace css = com::sun::star; namespace uno = css::uno; namespace lang = css::lang; -namespace backend = css::configuration::backend; //------------------------------------------------------------------------------ static uno::Reference<uno::XInterface> SAL_CALL createMacOSXBackend( - const uno::Reference<uno::XComponentContext>& xContext) + const uno::Reference<uno::XComponentContext>&) { - return * MacOSXBackend::createInstance(xContext); + return * MacOSXBackend::createInstance(); } //------------------------------------------------------------------------------ @@ -77,41 +73,9 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL component_writeInfo(void * /*pServiceManager*/, void *pRegistryKey) { - - using namespace ::com::sun::star::registry; - if (pRegistryKey) - { - try - { - uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + MacOSXBackend::getBackendName() - ); - - // Register associated service names - uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") ) - ); - - uno::Sequence<rtl::OUString> sServiceNames = MacOSXBackend::getBackendServiceNames(); - for (sal_Int32 i = 0; i < sServiceNames.getLength(); ++ i) - xServicesKey->createKey(sServiceNames[i]); - - // Register supported components - uno::Reference<XRegistryKey> xComponentKey = xImplKey->createKey( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/DATA/SupportedComponents") ) - ); - - xComponentKey->setAsciiListValue( MacOSXBackend::getSupportedComponents() ); - - return sal_True; - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "InvalidRegistryException caught"); - } - } - return sal_False; +extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void *pRegistryKey) { + return cppu::component_writeInfoHelper( + pServiceManager, pRegistryKey, kImplementations_entries); } //------------------------------------------------------------------------------ |