diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-17 12:25:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-17 12:25:11 +0100 |
commit | 3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2 (patch) | |
tree | 63699b525800b2c6708e90b817853bb60be5f6d8 /sc/source/ui | |
parent | 5229726b4d4e7d76f410d221f8f8cd8abcfd5a19 (diff) |
Fix various XServiceInfo implementations
...to match what is recorded in the .component files
Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/sidebar/ScPanelFactory.cxx | 24 | ||||
-rw-r--r-- | sc/source/ui/unoobj/afmtuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/appluno.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/funcuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaeventshelper.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaeventshelper.hxx | 6 |
7 files changed, 49 insertions, 12 deletions
diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index a53ae72da6a0..b0d4c8fdd4ed 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <comphelper/namedvaluecollection.hxx> - +#include <cppuhelper/supportsservice.hxx> #include <boost/bind.hpp> using namespace css; @@ -46,7 +46,7 @@ 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 (void) +::rtl::OUString SAL_CALL ScPanelFactory::getImplementationName_static() { return OUString(IMPLEMENTATION_NAME); } @@ -59,7 +59,7 @@ css::uno::Reference<css::uno::XInterface> SAL_CALL ScPanelFactory::createInstanc return xService; } -css::uno::Sequence<OUString> SAL_CALL ScPanelFactory::getSupportedServiceNames (void) +css::uno::Sequence<OUString> SAL_CALL ScPanelFactory::getSupportedServiceNames_static() { css::uno::Sequence<OUString> aServiceNames (1); aServiceNames[0] = SERVICE_NAME; @@ -168,6 +168,24 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( return xElement; } +OUString ScPanelFactory::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return getImplementationName_static(); +} + +sal_Bool ScPanelFactory::supportsService(OUString const & ServiceName) + throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence<OUString> ScPanelFactory::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return getSupportedServiceNames_static(); +} + } } // end of namespace sc::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 865449f27718..dc30db4cd577 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -142,7 +142,7 @@ static const SfxItemPropertyMapEntry* lcl_GetAutoFieldMap() SC_SIMPLE_SERVICE_INFO( ScAutoFormatFieldObj, "ScAutoFormatFieldObj", "com.sun.star.sheet.TableAutoFormatField" ) SC_SIMPLE_SERVICE_INFO( ScAutoFormatObj, "ScAutoFormatObj", "com.sun.star.sheet.TableAutoFormat" ) -SC_SIMPLE_SERVICE_INFO( ScAutoFormatsObj, "ScAutoFormatsObj", SCAUTOFORMATSOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScAutoFormatsObj, "stardiv.StarCalc.ScAutoFormatsObj", SCAUTOFORMATSOBJ_SERVICE ) static bool lcl_FindAutoFormatIndex( const ScAutoFormat& rFormats, const OUString& rName, sal_uInt16& rOutIndex ) { diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 51a95910771d..dff6fd0f96c9 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -89,9 +89,9 @@ static const SfxItemPropertyMapEntry* lcl_GetSettingsPropertyMap() #define SCRECENTFUNCTIONSOBJ_SERVICE "com.sun.star.sheet.RecentFunctions" #define SCSPREADSHEETSETTINGS_SERVICE "com.sun.star.sheet.GlobalSheetSettings" -SC_SIMPLE_SERVICE_INFO( ScFunctionListObj, "ScFunctionListObj", SCFUNCTIONLISTOBJ_SERVICE ) -SC_SIMPLE_SERVICE_INFO( ScRecentFunctionsObj, "ScRecentFunctionsObj", SCRECENTFUNCTIONSOBJ_SERVICE ) -SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "ScSpreadsheetSettings", SCSPREADSHEETSETTINGS_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScFunctionListObj, "stardiv.StarCalc.ScFunctionListObj", SCFUNCTIONLISTOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScRecentFunctionsObj, "stardiv.StarCalc.ScRecentFunctionsObj", SCRECENTFUNCTIONSOBJ_SERVICE ) +SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "stardiv.StarCalc.ScSpreadsheetSettings", SCSPREADSHEETSETTINGS_SERVICE ) extern "C" { @@ -280,13 +280,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory( ScDocument_createInstance, ScDocument_getSupportedServiceNames() )); } - else if ( aImpl == ::sc::sidebar::ScPanelFactory::getImplementationName() ) + else if ( aImpl == ::sc::sidebar::ScPanelFactory::getImplementationName_static() ) { xFactory = ::cppu::createSingleFactory( reinterpret_cast<lang::XMultiServiceFactory*>(pServiceManager), - ::sc::sidebar::ScPanelFactory::getImplementationName(), + ::sc::sidebar::ScPanelFactory::getImplementationName_static(), ::sc::sidebar::ScPanelFactory::createInstance, - ::sc::sidebar::ScPanelFactory::getSupportedServiceNames() ); + ::sc::sidebar::ScPanelFactory::getSupportedServiceNames_static() ); } void* pRet = NULL; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index dcd16fad3b24..b9e2bf45be45 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2164,7 +2164,7 @@ uno::Sequence<OUString> SAL_CALL ScModelObj::getAvailableServiceNames() // XServiceInfo OUString SAL_CALL ScModelObj::getImplementationName() throw(uno::RuntimeException, std::exception) { - return OUString( "ScModelObj" ); + return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" ); } sal_Bool SAL_CALL ScModelObj::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 6f3b11d62390..c53e3b9cf8af 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -224,7 +224,7 @@ uno::Sequence<OUString> ScFunctionAccess::getSupportedServiceNames_Static() // XServiceInfo OUString SAL_CALL ScFunctionAccess::getImplementationName() throw(uno::RuntimeException, std::exception) { - return OUString( "ScFunctionAccess"); + return getImplementationName_Static(); } sal_Bool SAL_CALL ScFunctionAccess::supportsService( const OUString& rServiceName ) diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 9d76d4417fa2..0c8eaf4f5263 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -615,6 +615,19 @@ void SAL_CALL ScVbaEventsHelper::notifyEvent( const css::document::EventObject& VbaEventsHelperBase::notifyEvent( rEvent ); } +OUString ScVbaEventsHelper::getImplementationName() + throw (css::uno::RuntimeException, std::exception) +{ + return OUString("ScVbaEventsHelper"); +} + +css::uno::Sequence<OUString> ScVbaEventsHelper::getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) +{ + return css::uno::Sequence<OUString>{ + "com.sun.star.script.vba.VBASpreadsheetEventProcessor"}; +} + // protected ------------------------------------------------------------------ bool ScVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue, diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx index 93c946742562..87dd60be46ea 100644 --- a/sc/source/ui/vba/vbaeventshelper.hxx +++ b/sc/source/ui/vba/vbaeventshelper.hxx @@ -37,6 +37,12 @@ public: virtual void SAL_CALL notifyEvent( const css::document::EventObject& rEvent ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + protected: virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException) SAL_OVERRIDE; virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) SAL_OVERRIDE; |