diff options
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/sidebar/ScPanelFactory.cxx | 36 | ||||
-rw-r--r-- | sc/source/ui/unoobj/afmtuno.cxx | 21 | ||||
-rw-r--r-- | sc/source/ui/unoobj/appluno.cxx | 104 | ||||
-rw-r--r-- | sc/source/ui/unoobj/filtuno.cxx | 21 |
4 files changed, 16 insertions, 166 deletions
diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index b0d4c8fdd4ed..f465248e69dc 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -43,30 +43,6 @@ using ::rtl::OUString; namespace sc { namespace sidebar { -#define IMPLEMENTATION_NAME "org.apache.openoffice.comp.sc.sidebar.ScPanelFactory" -#define SERVICE_NAME "com.sun.star.ui.UIElementFactory" - -::rtl::OUString SAL_CALL ScPanelFactory::getImplementationName_static() -{ - return OUString(IMPLEMENTATION_NAME); -} - -css::uno::Reference<css::uno::XInterface> SAL_CALL ScPanelFactory::createInstance( - const uno::Reference<lang::XMultiServiceFactory>& ) -{ - ::rtl::Reference<ScPanelFactory> pPanelFactory (new ScPanelFactory()); - css::uno::Reference<css::uno::XInterface> xService (static_cast<XWeak*>(pPanelFactory.get()), css::uno::UNO_QUERY); - return xService; -} - -css::uno::Sequence<OUString> SAL_CALL ScPanelFactory::getSupportedServiceNames_static() -{ - css::uno::Sequence<OUString> aServiceNames (1); - aServiceNames[0] = SERVICE_NAME; - return aServiceNames; - -} - ScPanelFactory::ScPanelFactory (void) : PanelFactoryInterfaceBase(m_aMutex) { @@ -171,7 +147,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( OUString ScPanelFactory::getImplementationName() throw (css::uno::RuntimeException, std::exception) { - return getImplementationName_static(); + return OUString("org.apache.openoffice.comp.sc.sidebar.ScPanelFactory"); } sal_Bool ScPanelFactory::supportsService(OUString const & ServiceName) @@ -183,9 +159,17 @@ sal_Bool ScPanelFactory::supportsService(OUString const & ServiceName) css::uno::Sequence<OUString> ScPanelFactory::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) { - return getSupportedServiceNames_static(); + css::uno::Sequence<OUString> aServiceNames(1); + aServiceNames[0] = "com.sun.star.ui.UIElementFactory"; + return aServiceNames; } } } // end of namespace sc::sidebar +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +ScPanelFactory_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new sc::sidebar::ScPanelFactory()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 7af9a593d3c5..ab104f4a9ab0 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -171,27 +171,12 @@ ScAutoFormatsObj::~ScAutoFormatsObj() { } -// stuff for exService_... - -uno::Reference<uno::XInterface> SAL_CALL ScAutoFormatsObj_CreateInstance( - const uno::Reference<lang::XMultiServiceFactory>& ) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +ScAutoFormatsObj_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &) { SolarMutexGuard aGuard; ScDLL::Init(); - return (::cppu::OWeakObject*) new ScAutoFormatsObj; -} - -OUString ScAutoFormatsObj::getImplementationName_Static() -{ - return OUString( "stardiv.StarCalc.ScAutoFormatsObj" ); -} - -uno::Sequence<OUString> ScAutoFormatsObj::getSupportedServiceNames_Static() -{ - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = SCAUTOFORMATSOBJ_SERVICE; - return aRet; + return cppu::acquire(new ScAutoFormatsObj); } // XTableAutoFormats diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 47045564a2a5..bb6115b1c0a2 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -128,14 +128,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScFunctionListObj_CreateInstance, ScFunctionListObj::getSupportedServiceNames_Static() )); } - else if ( aImpl == ScAutoFormatsObj::getImplementationName_Static() ) - { - xFactory.set(cppu::createOneInstanceFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScAutoFormatsObj::getImplementationName_Static(), - ScAutoFormatsObj_CreateInstance, - ScAutoFormatsObj::getSupportedServiceNames_Static() )); - } else if ( aImpl == ScFunctionAccess::getImplementationName_Static() ) { xFactory.set(cppu::createOneInstanceFactory( @@ -144,14 +136,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScFunctionAccess_CreateInstance, ScFunctionAccess::getSupportedServiceNames_Static() )); } - else if ( aImpl == ScFilterOptionsObj::getImplementationName_Static() ) - { - xFactory.set(cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScFilterOptionsObj::getImplementationName_Static(), - ScFilterOptionsObj_CreateInstance, - ScFilterOptionsObj::getSupportedServiceNames_Static() )); - } else if ( aImpl == ScXMLImport_getImplementationName() ) { xFactory.set(cppu::createSingleFactory( @@ -192,86 +176,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScXMLImport_Settings_createInstance, ScXMLImport_Settings_getSupportedServiceNames() )); } - else if ( aImpl == ScXMLOOoExport_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_getImplementationName(), - ScXMLOOoExport_createInstance, - ScXMLOOoExport_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOOoExport_Meta_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_Meta_getImplementationName(), - ScXMLOOoExport_Meta_createInstance, - ScXMLOOoExport_Meta_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOOoExport_Styles_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_Styles_getImplementationName(), - ScXMLOOoExport_Styles_createInstance, - ScXMLOOoExport_Styles_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOOoExport_Content_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_Content_getImplementationName(), - ScXMLOOoExport_Content_createInstance, - ScXMLOOoExport_Content_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOOoExport_Settings_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOOoExport_Settings_getImplementationName(), - ScXMLOOoExport_Settings_createInstance, - ScXMLOOoExport_Settings_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_getImplementationName(), - ScXMLOasisExport_createInstance, - ScXMLOasisExport_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_Meta_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_Meta_getImplementationName(), - ScXMLOasisExport_Meta_createInstance, - ScXMLOasisExport_Meta_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_Styles_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_Styles_getImplementationName(), - ScXMLOasisExport_Styles_createInstance, - ScXMLOasisExport_Styles_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_Content_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_Content_getImplementationName(), - ScXMLOasisExport_Content_createInstance, - ScXMLOasisExport_Content_getSupportedServiceNames() ); - } - else if ( aImpl == ScXMLOasisExport_Settings_getImplementationName() ) - { - xFactory = cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ScXMLOasisExport_Settings_getImplementationName(), - ScXMLOasisExport_Settings_createInstance, - ScXMLOasisExport_Settings_getSupportedServiceNames() ); - } else if ( aImpl == ScDocument_getImplementationName() ) { xFactory.set(sfx2::createSfxModelFactory( @@ -280,14 +184,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScDocument_createInstance, ScDocument_getSupportedServiceNames() )); } - else if ( aImpl == ::sc::sidebar::ScPanelFactory::getImplementationName_static() ) - { - xFactory = ::cppu::createSingleFactory( - static_cast<lang::XMultiServiceFactory*>(pServiceManager), - ::sc::sidebar::ScPanelFactory::getImplementationName_static(), - ::sc::sidebar::ScPanelFactory::createInstance, - ::sc::sidebar::ScPanelFactory::getSupportedServiceNames_static() ); - } void* pRet = NULL; if (xFactory.is()) diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 6ccd62971391..2246df755328 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -111,27 +111,12 @@ ScFilterOptionsObj::~ScFilterOptionsObj() { } -// stuff for exService_... - -uno::Reference<uno::XInterface> SAL_CALL ScFilterOptionsObj_CreateInstance( - const uno::Reference<lang::XMultiServiceFactory>& ) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +Calc_FilterOptionsDialog_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &) { SolarMutexGuard aGuard; ScDLL::Init(); - return (::cppu::OWeakObject*) new ScFilterOptionsObj; -} - -OUString ScFilterOptionsObj::getImplementationName_Static() -{ - return OUString( SCFILTEROPTIONSOBJ_IMPLNAME ); -} - -uno::Sequence<OUString> ScFilterOptionsObj::getSupportedServiceNames_Static() -{ - uno::Sequence<OUString> aRet(1); - OUString* pArray = aRet.getArray(); - pArray[0] = SCFILTEROPTIONSOBJ_SERVICE; - return aRet; + return cppu::acquire(new ScFilterOptionsObj); } // XPropertyAccess |