Hi there,
am trying to retrieve
"/singletons/com.sun.star.reflection.theTypeDescriptionManager" from
Java using a XComponentContent which serves successfully
"/singletons/com.sun.star.reflection.theCoreReflection".
The context stems from a "StarOffice.ServiceManager" retrieved via the
naming services and using the interface XMultiServiceFactory (which is a
XMultiComponentFactory). So I would assume that the connect to an office
took place successfully and was expecting that
"theTypeDescriptionManager" service got incorporated into that context
as well. Unfortunately, this is not the case (on OOo 1.1.4 and 1.9.x).
Here's a snippet of Java code:
--------------- cut here -------------
public static void setupReflectionFromContext( XComponentContext xcc )
{
if (bDebug>0) System.err.println("xcc: " + xcc) ;
theCoreReflection=(XIdlReflection) UnoRuntime.queryInterface(
XIdlReflection.class,
xcc.getValueByName("/singletons/com.sun.star.reflection.theCoreReflection"));
if (bDebug>0) System.err.println("theCoreReflection: " +
theCoreReflection) ;
theServiceManager=(XMultiComponentFactory)
UnoRuntime.queryInterface(
XMultiComponentFactory.class,
xcc.getValueByName("/singletons/com.sun.star.lang.theServiceManager"));
if (bDebug>0) System.err.println("theServiceManager: " +
theServiceManager) ;
theTypeDescriptionManager=(XMultiComponentFactory)
UnoRuntime.queryInterface(
XMultiComponentFactory.class,
xcc.getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"));
if (bDebug>0) System.err.println("theTypeDescriptionManager: " +
theTypeDescriptionManager) ;
}
--------------- cut here -------------
The last debug output will show "null" for "theTypeDescriptionManager",
the first two singletons show their appropriate values.
So would I need some specific context for that? (Would be interested to
use this singleton as it probably caches TypeDescriptions which would be
important.)
---rony
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]