[Bug 54938] Adapt supportsService implementations to cppu::supportsService

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Oct 22 08:27:27 CEST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=54938

--- Comment #7 from Stephan Bergmann <sbergman at redhat.com> ---
(In reply to comment #5)
> In reportdesign, I saw a lot of uses of comhelper::existsValue:
> 
> ::sal_Bool SAL_CALL OToolboxController::supportsService( const OUString&
> ServiceName ) throw (uno::RuntimeException)
> {
>     return
> ::comphelper::existsValue(ServiceName,getSupportedServiceNames_Static());
> }
> 
> We want to remove this too and use cppuhelper::supportsService?

Yes, I would suggest to rewrite those supportsService member functions to use
cppuhelper::supportsService, for the sake of consistency.

(In reply to comment #6)
> sal_Bool SAL_CALL ServiceInfoHelper::supportsService( const OUString&
> ServiceName, const ::com::sun::star::uno::Sequence< OUString >&
> SupportedServices ) throw() 
> {
>     const OUString * pArray = SupportedServices.getConstArray();
>     for( sal_Int32 i = 0; i < SupportedServices.getLength(); i++ )
>         if( pArray[i] == ServiceName )
>             return sal_True;
>     return sal_False;
> }
> 
> Maybe we want to remove this too?

Yes, the static comphelper::ServiceInfoHelper::supportsService can go.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20131022/476f01b7/attachment.html>


More information about the LibreOffice mailing list