Hi Andre,

> How can I get a valid XMultiServiceFactory for querying the datasources.
> Which component I must load?

Here an example in Java:
-----%<-----
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",
                OOWorkbench.getXComponentContext());
        
        XMultiServiceFactory  xMSF = (XMultiServiceFactory)
                UnoRuntime.queryInterface(
                com.sun.star.lang.XMultiServiceFactory.class,           
                        configProvider);
        }
        catch(Exception e) {
        }
}
}
-----%<-----
You can retrieve the XMultiServiceFactory from the xComponentContext.
You should have it availible in you application.

Greetings, Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to