summaryrefslogtreecommitdiff
path: root/sc/workben
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-12-05 19:19:16 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-12-09 16:39:00 +0100
commit326aa3ff4d86c5709ae85ab71fd2c6828bbe7559 (patch)
treed5422ede96e614e074883b8f608fd2482f039edd /sc/workben
parentcf8a54e48c24b2b2b3ca31b0c2d2faef9f2fca0d (diff)
fdo#54938: Convert sc to use cppu::supportsService
Change-Id: I1f1606244fbb6e6ddd5b6427322564a0033de78b Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/workben')
-rw-r--r--sc/workben/addin.cxx20
1 files changed, 2 insertions, 18 deletions
diff --git a/sc/workben/addin.cxx b/sc/workben/addin.cxx
index dbc538b6165f..1d4d38a1d338 100644
--- a/sc/workben/addin.cxx
+++ b/sc/workben/addin.cxx
@@ -40,18 +40,10 @@
using namespace com::sun::star;
-//------------------------------------------------------------------------
-
-
-//------------------------------------------------------------------------
-
SMART_UNO_IMPLEMENTATION( ScTestAddIn, UsrObject );
-#define SCADDIN_SERVICE L"com.sun.star.sheet.AddIn"
#define SCTESTADDIN_SERVICE L"stardiv.one.sheet.DemoAddIn"
-//------------------------------------------------------------------------
-
extern "C" {
sal_Bool SAL_CALL component_writeInfo(
@@ -127,7 +119,7 @@ UString ScTestAddIn::getImplementationName_Static()
{
uno::Sequence< OUString > aRet(2);
OUString* pArray = aRet.getArray();
- pArray[0] = SCADDIN_SERVICE;
+ pArray[0] = L"com.sun.star.sheet.AddIn";
pArray[1] = SCTESTADDIN_SERVICE;
return aRet;
}
@@ -539,16 +531,13 @@ OUString SAL_CALL ScTestAddIn::repeatMultiple( sal_Int32 nCount, const ::com::su
}
}
-
// XServiceName
-
OUString SAL_CALL ScTestAddIn::getServiceName( ) throw(::com::sun::star::uno::RuntimeException)
{
return SCTESTADDIN_SERVICE; // name of specific AddIn service
}
// XServiceInfo
-
OUString SAL_CALL ScTestAddIn::getImplementationName( ) throw(::com::sun::star::uno::RuntimeException)
{
return getImplementationName_Static();
@@ -556,8 +545,7 @@ OUString SAL_CALL ScTestAddIn::getImplementationName( ) throw(::com::sun::star:
sal_Bool SAL_CALL ScTestAddIn::supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException)
{
- return ServiceName == SCADDIN_SERVICE ||
- ServiceName == SCTESTADDIN_SERVICE;
+ return cppu::supportsService(this, ServiceName);
}
::com::sun::star::uno::Sequence< OUString > SAL_CALL ScTestAddIn::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException)
@@ -565,8 +553,4 @@ sal_Bool SAL_CALL ScTestAddIn::supportsService( const OUString& ServiceName ) th
return getSupportedServiceNames_Static();
}
-//------------------------------------------------------------------------
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */