If getSupportedServiceNames is not reliable, what is the best way to know 
whether an object supports a service directly or indirectly ?


> On Dec 1, 2009, at 5:46 PM, [email protected] wrote:
> > Could someone explain the following situation (in OOo 3.1.1 on Windows
> > and OOo 2.4.1 on Ubuntu) :  the api docs state that the member function
> > getSupportedServiceNames of the service XServiceInfo returns "the
> > supported service names of the implementation, including also indirect
> > service names" (see
> > http://api.openoffice.org/docs/common/ref/com/sun/star/lang/XServiceInfo.
> >html#getSupportedServiceNames) .
> >
> > I create an object using "com.sun.star.awt.UnoControlDialog" as service
> > name , and the function getSupportedServiceNames returns
> > only "com.sun.star.awt.UnoControlDialog". This contradicts the api docs
> > that say that the service "com.sun.star.awt.UnoControlDialog" includes
> > the service "com.sun.star.awt.UnoControlContainer".
> > So "com.sun.star.awt.UnoControlContainer" should also be included in the
> > return value of getSupportedServiceNames.
>
> Each UNO service implementation has to include individual code to implement
> getSupportedServiceNames (there are helpers for the various language
> bindings, but those need not be used); that should explains the
> inconsistencies.  If you feel like it, you can file an issue for the
> UnoControlDialog implementation.  (Then again, the information obtained
> from getSupportedServiceNames is often not considered /that/ useful, so
> most of the time people do not seem to bother about those inconsistencies.)
>
> -Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to