Package com.sun.star.lang

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


    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

        XSingleServiceFactory oSingleMSF = (XSingleServiceFactory)
            UnoRuntime.queryInterface(XSingleServiceFactory.class, oObj);

        XInterface oInstance = null;
        try {
            oInstance = (XInterface) oSingleMSF.createInstance();
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create instance", e);
        }
View Full Code Here

            UnoRuntime.queryInterface(XSingleServiceFactory.class, oObj);

        XInterface oInstance = null;
        XInterface oSecondInstance = null;
        try{
            oInstance = (XInterface) oSingleMSF.createInstance();
            oSecondInstance = (XInterface) oSingleMSF.createInstance();
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create instance", e);
        }
View Full Code Here

        XInterface oInstance = null;
        XInterface oSecondInstance = null;
        try{
            oInstance = (XInterface) oSingleMSF.createInstance();
            oSecondInstance = (XInterface) oSingleMSF.createInstance();
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create instance", e);
        }
View Full Code Here

        log.println( "adding INSTANCEn as mod relation to environment" );
        try {
            for (int n = 1; n < (2*THRCNT+1) ;n++ ) {
                log.println( "adding INSTANCE" + n
                    +" as mod relation to environment" );
                oInstance = (XInterface) oSingleMSF.createInstance();
                tEnv.addObjRelation("INSTANCE" + n, oInstance);
            }
        } catch (com.sun.star.uno.Exception e) {
            log.println("Could't adding INSTANCEn: " + e);
        }
View Full Code Here

    {
        XNameContainer xContainer = UnoRuntime.queryInterface(XNameContainer.class, xAccess);
        if (!xContainer.hasByName(sKey))
        {
            XSingleServiceFactory xFac = UnoRuntime.queryInterface(XSingleServiceFactory.class, xContainer);
            XInterface xInst = UnoRuntime.queryInterface(XInterface.class, xFac.createInstance());
            xContainer.insertByName(sKey, xInst);
        }

        XNameAccess xKey = UnoRuntime.queryInterface(XNameAccess.class, xContainer.getByName(sKey));
        XNameContainer xCommand = UnoRuntime.queryInterface(XNameContainer.class, xKey.getByName("Command"));
View Full Code Here

      XSingleServiceFactory xStorageFactory = (XSingleServiceFactory)UnoRuntime.queryInterface(
                                            XSingleServiceFactory.class,
                                            oStorageFactory );
      if ( xStorageFactory != null )
      {
        Object oStorage = xStorageFactory.createInstance();
        xTempStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );
      }
      else
        JOptionPane.showMessageDialog( m_aFrame,
                        "Can't create StorageFactory!",
View Full Code Here

        XSingleServiceFactory oSingleMSF = (XSingleServiceFactory)
            UnoRuntime.queryInterface(XSingleServiceFactory.class, xCP);

        try{
            oInstance = (XInterface) oSingleMSF.createInstance();
        } catch (com.sun.star.uno.Exception e) {
            log.println("Could not create custom presentation while filling impress document with content.");
            failed("Couldn't create test environment");
        }
View Full Code Here

      Object      xObj;
      XIndexContainer xContainer;

      /* instanciate an IndexContainer that will take
         a list of draw pages for the first custom show */
      xObj = xFactory.createInstance();
        xContainer = (XIndexContainer)UnoRuntime.queryInterface( XIndexContainer.class, xObj );
      for ( i = 5; i < 10; i++ )
        xContainer.insertByIndex( xContainer.getCount(), xDrawPages.getByIndex( i ) );
      xNameContainer.insertByName( "ShortVersion", xContainer );

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.