diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-09-25 15:41:29 -0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-07 17:01:33 +0000 |
commit | 7235d23267e4591e5cf47762abd3f63421b06904 (patch) | |
tree | 6353239b1c586642e22c5df892a7c0560e632fa5 /editeng | |
parent | 8e37c7ae282f10724d6322aa028a7dd6b698f071 (diff) |
fdo#54938: Adapt supportsService implementations to cppu::supportsService
Change-Id: I683c0d30c3286ed5d725d4eefe8b3977b82ee316
Reviewed-on: https://gerrit.libreoffice.org/6035
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleEditableTextPara.cxx | 10 | ||||
-rw-r--r-- | editeng/source/accessibility/AccessibleImageBullet.cxx | 10 |
2 files changed, 4 insertions, 16 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 8a5688215076..191a19339101 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -42,6 +42,7 @@ #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <comphelper/accessibleeventnotifier.hxx> #include <comphelper/sequenceashashmap.hxx> +#include <cppuhelper/supportsservice.hxx> #include <unotools/accessiblestatesethelper.hxx> #include <unotools/accessiblerelationsethelper.hxx> #include <com/sun/star/accessibility/AccessibleRelationType.hpp> @@ -2197,14 +2198,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - // Iterate over all supported service names and return true if on of them - // matches the given name. - uno::Sequence< OUString> aSupportedServices ( - getSupportedServiceNames ()); - for (int i=0; i<aSupportedServices.getLength(); i++) - if (sServiceName == aSupportedServices[i]) - return sal_True; - return sal_False; + return cppu::supportsService(this, sServiceName); } uno::Sequence< OUString> SAL_CALL AccessibleEditableTextPara::getSupportedServiceNames (void) throw (uno::RuntimeException) diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx index 3e9c2e23ed27..51b464446bc0 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.cxx +++ b/editeng/source/accessibility/AccessibleImageBullet.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <comphelper/accessibleeventnotifier.hxx> +#include <cppuhelper/supportsservice.hxx> #include <unotools/accessiblestatesethelper.hxx> #include <editeng/unolingu.hxx> #include "editeng/AccessibleEditableTextPara.hxx" @@ -380,14 +381,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - // Iterate over all supported service names and return true if on of them - // matches the given name. - uno::Sequence< OUString > aSupportedServices ( - getSupportedServiceNames ()); - for (int i=0; i<aSupportedServices.getLength(); i++) - if (sServiceName == aSupportedServices[i]) - return sal_True; - return sal_False; + return cppu::supportsService(this, sServiceName); } uno::Sequence< OUString > SAL_CALL AccessibleImageBullet::getSupportedServiceNames (void) throw (uno::RuntimeException) |