summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/datauno.cxx
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/source/ui/unoobj/datauno.cxx
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/source/ui/unoobj/datauno.cxx')
-rw-r--r--sc/source/ui/unoobj/datauno.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 8886776e76c2..62d72a585b3b 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -54,6 +54,7 @@
#include <comphelper/extract.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <limits>
@@ -129,7 +130,6 @@ static const SfxItemPropertyMapEntry* lcl_GetDBRangePropertyMap()
//------------------------------------------------------------------------
-#define SCDATABASERANGEOBJ_SERVICE "com.sun.star.sheet.DatabaseRange"
SC_SIMPLE_SERVICE_INFO( ScConsolidationDescriptor, "ScConsolidationDescriptor", "com.sun.star.sheet.ConsolidationDescriptor" )
SC_SIMPLE_SERVICE_INFO( ScDatabaseRangesObj, "ScDatabaseRangesObj", "com.sun.star.sheet.DatabaseRanges" )
@@ -2205,7 +2205,6 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const OUString& aPropert
SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDatabaseRangeObj )
// XServiceInfo
-
OUString SAL_CALL ScDatabaseRangeObj::getImplementationName() throw(uno::RuntimeException)
{
return OUString( "ScDatabaseRangeObj" );
@@ -2214,8 +2213,7 @@ OUString SAL_CALL ScDatabaseRangeObj::getImplementationName() throw(uno::Runtime
sal_Bool SAL_CALL ScDatabaseRangeObj::supportsService( const OUString& rServiceName )
throw(uno::RuntimeException)
{
- return rServiceName.equalsAscii( SCDATABASERANGEOBJ_SERVICE ) ||
- rServiceName.equalsAscii( SCLINKTARGET_SERVICE );
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence<OUString> SAL_CALL ScDatabaseRangeObj::getSupportedServiceNames()
@@ -2223,7 +2221,7 @@ uno::Sequence<OUString> SAL_CALL ScDatabaseRangeObj::getSupportedServiceNames()
{
uno::Sequence<OUString> aRet(2);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString( SCDATABASERANGEOBJ_SERVICE );
+ pArray[0] = "com.sun.star.sheet.DatabaseRange";
pArray[1] = OUString( SCLINKTARGET_SERVICE );
return aRet;
}