Hi Tobias,
thanks for your code:-)
Some code snippets from the developerguide uses
explicit "XMultiServiceFactory" but I must use "XMultiComponentFactory"...
I need some time to realize it;()
Greetings
Andre
Am Dienstag, 5. Februar 2008 09:52 schrieb Tobias Krais:
> Hi Andre,
>
> sorry, a little failure occured in my example:
> > -----%<-----
> > package de.designtouse.test;
> >
> > import com.sun.star.comp.helper.Bootstrap;
> > import com.sun.star.lang.XMultiComponentFactory;
> > import com.sun.star.lang.XMultiServiceFactory;
> > import com.sun.star.uno.UnoRuntime;
> > import com.sun.star.uno.XComponentContext;
> >
> > public class Test2 {
> >
> > public static void main(String args[]) {
> > XComponentContext xComponentContext = null;
> > try {
> > // Connect or start a OpenOffice instance
> > xComponentContext = Bootstrap.bootstrap();
> > }
> > catch (com.sun.star.comp.helper.BootstrapException e){
> > }
> > // get OO desktop
> > XMultiComponentFactory xMCF =
> > xComponentContext.getServiceManager();
> >
> > try {
> > Object configProvider = xMCF.createInstanceWithContext(
> > "com.sun.star.configuration.ConfigurationProvider",
>
> xComponentContext);
>
> > XMultiServiceFactory xMSF = (XMultiServiceFactory)
> > UnoRuntime.queryInterface(
> > com.sun.star.lang.XMultiServiceFactory.class,
> > configProvider);
> > }
> > catch(Exception e) {
> > }
> > }
> > }
> > -----%<-----
>
> Greetings, Tobias
>
> ---------------------------------------------------------------------
> 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]