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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Oct 25 12:41:17 CEST 2013


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

--- Comment #16 from Marcos Souza <marcos.souza.org at gmail.com> ---
(In reply to comment #14)
> (In reply to comment #12)
> > sal_Bool SAL_CALL ScTabViewObj::supportsService( const OUString&
> > rServiceName )
> >                                                    
> > throw(uno::RuntimeException)
> > {
> >     return rServiceName.equalsAscii( SCTABVIEWOBJ_SERVICE ) || 
> >            rServiceName.equalsAscii( SCVIEWSETTINGS_SERVICE );
> > }
> > 
> > So, can we just exchange this to cppu::supportsService? Or we need to some
> > another pieces of code?
> 
> Every UNO object O implementing css.lang.XServiceInfo must meet the
> condition that O.supportsService(S) returns true iff S is in the sequence
> returned by O.getSupportedServiceNames().  Therefore, any case where the
> implementation of supportsService could not be replaced by a call to
> cppu::supportsService would be a bug that needs fixing anyway.

Nice! I'll use cppu::supportsService for all places that implements
css.lang.XServiceInfo and remove that string comparisons.

-- 
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/20131025/21a732b5/attachment.html>


More information about the LibreOffice mailing list