Examples of XSingleComponentFactory


Examples of com.sun.star.lang.XSingleComponentFactory

        m_aSettings = Settings.getSettings( m_xContext );
    };

    public static XSingleComponentFactory __getComponentFactory( String sImplementationName )
    {
        XSingleComponentFactory xFactory = null;

        if ( sImplementationName.equals( m_implementationName ) )
            xFactory = Factory.createComponentFactory( WikiEditorImpl.class, m_serviceNames );
        else if ( sImplementationName.equals( WikiOptionsEventHandlerImpl.m_sImplementationName ) )
            xFactory = Factory.createComponentFactory( WikiOptionsEventHandlerImpl.class,
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

     *          service is desired
     * @see     com.sun.star.comp.loader.JavaLoader
     */
    public static XSingleComponentFactory __getComponentFactory(String sImplName)
    {
        XSingleComponentFactory xFactory = null;
   
        if ( sImplName.equals( _TestExtension.class.getName() ) )
            xFactory = Factory.createComponentFactory(_TestExtension.class,
                                             _TestExtension.getServiceNames());
       
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

     *          service is desired
     * @see     com.sun.star.comp.loader.JavaLoader
     */
    public static XSingleComponentFactory __getComponentFactory(String sImplName)
    {
        XSingleComponentFactory xFactory = null;
   
        if ( sImplName.equals( SmoketestCommandEnvironment.class.getName() ) )
            xFactory = Factory.createComponentFactory(SmoketestCommandEnvironment.class,
                                            SmoketestCommandEnvironment.getServiceNames());
       
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

     *          service is desired
     * @see     com.sun.star.comp.loader.JavaLoader
     */
    public static XSingleComponentFactory __getComponentFactory(String sImplName)
    {
        XSingleComponentFactory xFactory = null;
   
        if ( sImplName.equals( _DialogComponent.class.getName() ) )
            xFactory = Factory.createComponentFactory(_DialogComponent.class,
                                             _DialogComponent.getServiceNames());
       
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

                                    System.err.println( "### no service manager instance for late init of singleton instance \"" + rName + "\"!" );
                            }
                        }
                        else
                        {
                            XSingleComponentFactory xCompFac =
                                (XSingleComponentFactory)UnoRuntime.queryInterface(
                                    XSingleComponentFactory.class, entry.m_lateInit );
                            if (xCompFac != null)
                            {
                                xInstance = xCompFac.createInstanceWithContext( this );
                            }
                            else
                            {
                                if (DEBUG)
                                    System.err.println( "### neither service name nor service factory given for late init of singleton instance \"" + rName + "\"!" );
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

    {
    XImplementationLoader xImpLoader = (XImplementationLoader)UnoRuntime.queryInterface(
            XImplementationLoader.class, new JavaLoader() );
   
    // Get the factory of the ServiceManager
    XSingleComponentFactory smgr_fac = (XSingleComponentFactory)UnoRuntime.queryInterface(
            XSingleComponentFactory.class, xImpLoader.activate(
                "com.sun.star.comp.servicemanager.ServiceManager", null, null, null ) );
       
    // Create an instance of the ServiceManager
    XMultiComponentFactory xSMgr = (XMultiComponentFactory)UnoRuntime.queryInterface(
            XMultiComponentFactory.class, smgr_fac.createInstanceWithContext( null ) );
       
    // post init loader
    XInitialization xInit = (XInitialization)UnoRuntime.queryInterface(
            XInitialization.class, xImpLoader );
    Object[] args = new Object [] { xSMgr };
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

        prop[2].Name = "Type";
        prop[2].Value = new Short((short)0);
        prop[3] = new PropertyValue();
        prop[3].Name = "ItemDescriptorContainer";
       
        XSingleComponentFactory xFactory = (XSingleComponentFactory)UnoRuntime.queryInterface(
                                XSingleComponentFactory.class, xMenuBarSettings);
        try {
            XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xMSF);
            XComponentContext xContext = (XComponentContext)UnoRuntime.queryInterface(
                    XComponentContext.class, xProp.getPropertyValue("DefaultContext"));
            prop[3].Value = xFactory.createInstanceWithContext(xContext);
        }
        catch(com.sun.star.uno.Exception e) {
            log.println("Could not create an instance for ItemDescriptorContainer property.");
            e.printStackTrace(log);
            return null;
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

                                            XImplementationLoader.class,
                                            factory.createInstanceWithContext(
                                                "com.sun.star.loader."
                                                + "SharedLibrary",
                                                context));
                                    XSingleComponentFactory factory2
                                        = (XSingleComponentFactory)
                                        UnoRuntime.queryInterface(
                                            XSingleComponentFactory.class,
                                            loader.activate(
                                                "com.sun.star.test.bridges."
                                                + "testequals.impl",
                                                "", "testequals.uno", null));
                                    XTestInterface test = (XTestInterface)
                                        UnoRuntime.queryInterface(
                                            XTestInterface.class,
                                            factory2.createInstanceWithContext(
                                                context));
                                    // allow client to start accepting:
                                    Thread.sleep(3000);
                                    test.connect(
                                        CONNECTION_DESCRIPTION,
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

        throws com.sun.star.uno.Exception
    {
      Object fac = queryServiceFactory( rServiceSpecifier );
        if (fac != null)
        {
            XSingleComponentFactory xCompFac = (XSingleComponentFactory)UnoRuntime.queryInterface(
                XSingleComponentFactory.class, fac );
            if (xCompFac != null)
            {
                return xCompFac.createInstanceWithContext( xContext );
            }
            else
            {
                XSingleServiceFactory xServiceFac = (XSingleServiceFactory)UnoRuntime.queryInterface(
                    XSingleServiceFactory.class, fac );
View Full Code Here

Examples of com.sun.star.lang.XSingleComponentFactory

        throws com.sun.star.uno.Exception
    {
      Object fac = queryServiceFactory( rServiceSpecifier );
        if (fac != null)
        {
            XSingleComponentFactory xCompFac = (XSingleComponentFactory)UnoRuntime.queryInterface(
                XSingleComponentFactory.class, fac );
            if (xCompFac != null)
            {
                return xCompFac.createInstanceWithArgumentsAndContext( rArguments, xContext );
            }
            else
            {
                XSingleServiceFactory xServiceFac = (XSingleServiceFactory)UnoRuntime.queryInterface(
                    XSingleServiceFactory.class, fac );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.