summaryrefslogtreecommitdiff
path: root/sc/source/ui/Accessibility
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/Accessibility
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/Accessibility')
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx19
1 files changed, 4 insertions, 15 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 7db34ef6f9ec..d81cacbd6af6 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -29,6 +29,7 @@
#include <svl/smplhint.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <vcl/unohelp.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
@@ -462,28 +463,16 @@ void SAL_CALL ScAccessibleContextBase::notifyEvent(
}
//===== XServiceInfo ========================================================
-
-OUString SAL_CALL
- ScAccessibleContextBase::getImplementationName(void)
+OUString SAL_CALL ScAccessibleContextBase::getImplementationName(void)
throw (uno::RuntimeException)
{
return OUString("ScAccessibleContextBase");
}
-sal_Bool SAL_CALL
- ScAccessibleContextBase::supportsService(const OUString& sServiceName)
+sal_Bool SAL_CALL ScAccessibleContextBase::supportsService(const OUString& sServiceName)
throw (uno::RuntimeException)
{
- // Iterate over all supported service names and return true if on of them
- // matches the given name.
- uno::Sequence< OUString> aSupportedServices (
- getSupportedServiceNames ());
- sal_Int32 nLength(aSupportedServices.getLength());
- const OUString* pServiceNames = aSupportedServices.getConstArray();
- for (int i=0; i<nLength; ++i, ++pServiceNames)
- if (sServiceName == *pServiceNames)
- return sal_True;
- return false;
+ return cppu::supportsService(this, sServiceName);
}
uno::Sequence< OUString> SAL_CALL