Package com.sun.star.lang

Examples of com.sun.star.lang.XSingleServiceFactory.createInstance()


            XInterface xInt = (XInterface) changeableNames.getByHierarchicalName(hierarchicalElementName);
            xChangeView = (XNameReplace)UnoRuntime.queryInterface(XNameReplace.class, xInt);
            XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface(
                                                    XSingleServiceFactory.class, xChangeView);
            instance1 = jobsFac.createInstance();

        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
View Full Code Here


                                                                   "com.sun.star.configuration.ConfigurationUpdateAccess",
                                                                   nodeArgs));
            XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface(
                                        XSingleServiceFactory.class,
                                        changeView);
            instance = jobsFac.createInstance();

        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
View Full Code Here

                    XSingleServiceFactory.class, fac );
                if (xServiceFac != null)
                {
                    if (DEBUG)
                        System.err.println( "### ignoring context raising service \"" + rServiceSpecifier + "\"!" );
                    return xServiceFac.createInstance();
                }
                else
                {
                    throw new com.sun.star.uno.Exception(
                        "retrieved service factory object for \"" + rServiceSpecifier +
View Full Code Here

    XSingleServiceFactory aSMgrFac =
      UnoRuntime.queryInterface( XSingleServiceFactory.class,
            sharedLibraryLoader.activate(NATIVE_SERVICE_MANAGER_IMP_NAME, null, NATIVE_SERVICE_MANAGER_LIB_NAME, null));
   
    System.err.println("- instantiate the native ServiceManger");
    nativeServiceManager = UnoRuntime.queryInterface( XMultiServiceFactory.class, aSMgrFac.createInstance() );
   
    System.out.print("Test - ");
    System.out.println(nativeServiceManager == null? "failed" : "successfull");
   
    System.out.println("*******************************************************************");
 
View Full Code Here

      UnoRuntime.queryInterface( XSingleServiceFactory.class,
            sharedLibraryLoader.activate(NATIVE_REGISTRY_IMP_NAME, null, NATIVE_REGISTRY_LIB_NAME, null)
      );
    System.err.println("- instantiate the Registry");
    simpleRegistry =
      UnoRuntime.queryInterface( XSimpleRegistry.class, aRegFac.createInstance() );
    System.out.print("Test - ");
    System.out.println(simpleRegistry == null? "failed" : "successfull");
    System.out.println("*******************************************************************");
    System.err.println();     
    return true;
View Full Code Here

    // create new query definition
    XSingleServiceFactory xSingleFac =  (XSingleServiceFactory)
                      UnoRuntime.queryInterface(XSingleServiceFactory.class, xQDefs);

    XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(
            XPropertySet.class,xSingleFac.createInstance());
    xProp.setPropertyValue("Command","SELECT * FROM biblio");
    xProp.setPropertyValue("EscapeProcessing",new Boolean(true));

    XNameContainer xCont = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xQDefs);
        try
View Full Code Here

            // create a new detached set element (instance of DataSourceDescription)
            XSingleServiceFactory xElementFactory =
                (XSingleServiceFactory)UnoRuntime.queryInterface(XSingleServiceFactory.class, xSetUpdate);

            // the new element is the result !
             xDataSourceDescriptor  = xElementFactory.createInstance();

            // insert it - this also names the element
            xSetUpdate.insertByName( sDataSourceName ,  xDataSourceDescriptor  );
        }
View Full Code Here

        // now insert the individual settings
        for (int i = 0; i < aSettings.length; ++i) {
            // create a DataSourceSetting object
            XPropertySet xSetting = (XPropertySet)
                UnoRuntime.queryInterface( XPropertySet.class, xSettingsFactory.createInstance() );

            // can set the value before inserting
            xSetting.setPropertyValue( "Value", aSettings[i].Value );

            // and now insert or replace as appropriate
View Full Code Here

                    XSingleServiceFactory.class, fac );
                if (xServiceFac != null)
                {
                    if (DEBUG)
                        System.err.println( "### ignoring context raising service \"" + rServiceSpecifier + "\"!" );
                    return xServiceFac.createInstance();
                }
                else
                {
                    throw new com.sun.star.uno.Exception(
                        "retrieved service factory object for \"" + rServiceSpecifier +
View Full Code Here

           
            // store all connections
            XSingleServiceFactory xConnectionFactory = ( XSingleServiceFactory ) UnoRuntime.queryInterface( XSingleServiceFactory.class, xContainer );
            for ( int i=0; i< m_WikiConnections.size(); i++ )
            {
                Object oNewConnection = xConnectionFactory.createInstance();
                Hashtable ht = ( Hashtable ) m_WikiConnections.get( i );
                XNameReplace xNewConn = ( XNameReplace ) UnoRuntime.queryInterface( XNameReplace.class, oNewConnection );
               
                if ( xNewConn != null )
                    xNewConn.replaceByName( "UserName", ht.get( "Username" ) );
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.