Package com.sun.star.lang

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


        xContainer.insertByIndex( xContainer.getCount(), xDrawPages.getByIndex( i ) );
      xNameContainer.insertByName( "ShortVersion", xContainer );

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

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

            XSingleServiceFactory xDocListFactory = ( XSingleServiceFactory ) UnoRuntime.queryInterface( XSingleServiceFactory.class, xContainer2 );
            for ( int i=0; i< m_aWikiDocs.size(); i++ )
            {
                Hashtable ht = ( Hashtable ) m_aWikiDocs.get( i );
               
                Object oNewDoc = xDocListFactory.createInstance();
                XNameReplace xNewDoc = ( XNameReplace ) UnoRuntime.queryInterface( XNameReplace.class, oNewDoc );
               
                Enumeration e = ht.keys();
                while ( e.hasMoreElements() )
                {
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

      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();
            oInstance2 = (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

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

        try{
            oInstance = (XInterface) oSingleMSF.createInstance();
            oInstance2 = (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

            oObj = (XInterface) xHierachNameAccess.getByHierarchicalName("Labels['Avery A4']");

            XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface(
                                                    XSingleServiceFactory.class,
                                                    oObj);
            instance = jobsFac.createInstance();
            instance1 = jobsFac.createInstance();
            instance2 = jobsFac.createInstance();
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface(
                                                    XSingleServiceFactory.class,
                                                    oObj);
            instance = jobsFac.createInstance();
            instance1 = jobsFac.createInstance();
            instance2 = jobsFac.createInstance();
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface(
                                                    XSingleServiceFactory.class,
                                                    oObj);
            instance = jobsFac.createInstance();
            instance1 = jobsFac.createInstance();
            instance2 = jobsFac.createInstance();
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace();
        }

        log.println("ImplementationName: " + utils.getImplName(oObj));
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.