Marten Feldtmann wrote:
Stephan Bergmann schrieb:
Marten Feldtmann wrote:
All I would like to have is a way to implement:
anObject.SupportsInterfacesNamed("com.sun.star.reflection.XTypeDescription")
See com.sun.star.lang.XTypeProvider, which should be implemented by
every UNO object (but probably isn't for some).
Then we are in a circle :-) - XTypeProvider may return you some
information about an
object and returns an instance, which supports at least
"com.sun.star.reflection.XTypeDescription" -
but how is it going on then ? I want to query the returned instance, if
it implements additional
interfaces - just to know how to react - therefore the example above ...
No. XTypeProvider.getTypes returns a sequence<type>. No idea how you
get to XTypeDescription from there.
To summarize - in the example above "anObject" is an object which at
least implements
"com.sun.star.reflection.XTypeDescription" - but does it also implements
additional
interfaces ?
Yes, you can try to answer that question in two ways:
- queryInterface anObject for XTypeProvider and call getTypes
- queryInterface anObject for the types you are interested in
In theory, both ways should give the same results. And how
"queryInterface anObject for ..." exactly has to be written in code is
language-binding--specific.
This problem arrises, if you work with the enumeration you may receive from
"*createTypeDescriptionEnumeration".
* You may work around this particular problem, by querying the typeClass
- but I do not
see a general solution for this problem ...
In StarBasic this feature seems to be called: "HasUnoInterface(object,
string)" ..
**
which may returns true or false .... and this via UNO calls and not via
BASIC special calls (to use it under OLE).
I thought, that perhaps "queryInterface" might help me, but I do not
understand "type" and how to get the type for a name like
"com.sun.star.reflection.XTypeDescription" ?
queryInterface (although erroneously mentioned in the
language-independent XInterface.idl) is language-binding--specific
functionality. Which language are you talking about (Java, C++, etc.)?
I'm looking for OLE ...
No idea about OLE. Maybe Jochen can help when he is back from vacation.
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]