diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2014-03-04 08:41:53 -0300 |
---|---|---|
committer | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2014-03-04 07:30:02 -0600 |
commit | 4d6560f5066d143552cba861aaadc2f49b4357d4 (patch) | |
tree | 34c7cfba1a7cd2fce5f9bfde5d4d06910e1ac774 /editeng | |
parent | 8f210c26c53cf5480819d983e57977d531422ff1 (diff) |
fdo#54938: Convert some places to use cppu::supportsService
The last cases are non obvious, so it's pratically done
Change-Id: Icae1da8e238f516eaed0f7fbdf96fff778eac547
Reviewed-on: https://gerrit.libreoffice.org/8445
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleContextBase.cxx | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/editeng/source/accessibility/AccessibleContextBase.cxx b/editeng/source/accessibility/AccessibleContextBase.cxx index 15958e9776b1..e0ff20c837c0 100644 --- a/editeng/source/accessibility/AccessibleContextBase.cxx +++ b/editeng/source/accessibility/AccessibleContextBase.cxx @@ -29,6 +29,7 @@ #include <unotools/accessiblerelationsethelper.hxx> #include <comphelper/accessibleeventnotifier.hxx> #include <comphelper/servicehelper.hxx> +#include <cppuhelper/supportsservice.hxx> #include <osl/mutex.hxx> #include <utility> @@ -465,11 +466,7 @@ void SAL_CALL AccessibleContextBase::removeAccessibleEventListener ( } } - - - //===== XServiceInfo ======================================================== - OUString SAL_CALL AccessibleContextBase::getImplementationName (void) throw (::com::sun::star::uno::RuntimeException, std::exception) { @@ -477,27 +474,12 @@ OUString SAL_CALL AccessibleContextBase::getImplementationName (void) return OUString("AccessibleContextBase"); } - - - -sal_Bool SAL_CALL - AccessibleContextBase::supportsService (const OUString& sServiceName) +sal_Bool SAL_CALL AccessibleContextBase::supportsService (const OUString& sServiceName) throw (::com::sun::star::uno::RuntimeException, std::exception) { - ThrowIfDisposed (); - // 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 AccessibleContextBase::getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException, std::exception) |