Examples of XMultiServiceFactory


Examples of com.sun.star.lang.XMultiServiceFactory

        bStopProcess = true;
    }

    public static void main(String args[]) {
        String ConnectStr = "uno:socket,host=localhost,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
        XMultiServiceFactory xMSF = null;
        try {
            xMSF = com.sun.star.wizards.common.Desktop.connect(ConnectStr);
            if (xMSF != null)
                System.out.println("Connected to " + ConnectStr);
            PropertyValue[] curproperties = new PropertyValue[3];
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

    }

    public static void main(String args[]) {
        //only being called when starting wizard remotely
            String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.NamingService";
            XMultiServiceFactory xLocMSF = null;
            try {
                xLocMSF = Desktop.connect(ConnectStr);
            } catch (Exception e) {
                e.printStackTrace();
            } catch (java.lang.Exception e) {
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

                } else {
                    loadValues[0].Value = Boolean.TRUE;
                }
                Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues);
                XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc;
                XMultiServiceFactory xDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
                ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument);
                myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL));
            } else {
                //TODO: Error Handling
            }
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

      XMultiComponentFactory  compfactory;
      XComponentContext xContext = mConnection.getComponentContext();
      if ( xContext != null )
      {
        compfactory     = mConnection.getComponentContext().getServiceManager();
        XMultiServiceFactory    factory;
        factory = (XMultiServiceFactory)UnoRuntime.queryInterface(
            XMultiServiceFactory.class, compfactory);
        Object          object  = factory.createInstance( "com.sun.star.awt.Toolkit");
        return (XToolkit)UnoRuntime.queryInterface(XToolkit.class, object);
      }
      else
        return null;
       }
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

    public static void main(String args[]) {

    String ConnectStr = "uno:socket,host=localhost,port=8100;urp;StarOffice.ServiceManager";      //localhost  ;Lo-1.Germany.sun.com; 10.16.65.155
    PropertyValue[] curproperties = null;
    try {
        XMultiServiceFactory xLocMSF = com.sun.star.wizards.common.Desktop.connect(ConnectStr);
        FormWizard CurFormWizard = new FormWizard(xLocMSF);
        if(xLocMSF != null){
            System.out.println("Connected to "+ ConnectStr);
            curproperties = new PropertyValue[1];
//            curproperties[0] = Properties.createProperty("DatabaseLocation", "file:///C:/Documents and Settings/bc93774.EHAM02-DEV/My Documents/MyHSQL.odb");
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

        log.println(utils.getDateTime() + ": start testing module '" + module + "'");

        log.println("start new Office instance...");
        OfficeProvider officeProvider = new OfficeProvider();
        log.println("Receiving the ServiceManager of the Office ");
        XMultiServiceFactory msf = (XMultiServiceFactory) officeProvider.getManager(param);
        assure("couldnot get ServiceFarcotry", msf != null, mContinue);
        param.put("ServiceFactory", msf);
       
        String sep = System.getProperty("file.separator");
        String sUnoapi = getModulePath(module);
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

                //     aSemaphore.P(aSemaphore.getSemaphoreFile());
                // }
               
                aGTA.getPerformance().startTime(PerformanceContainer.OfficeStart);
                aProvider = new OfficeProvider();
                XMultiServiceFactory xMSF = (XMultiServiceFactory) aProvider.getManager(param);
                param.put("ServiceFactory", xMSF);
                aGTA.getPerformance().stopTime(PerformanceContainer.OfficeStart);

                long nStartTime = aGTA.getPerformance().getTime(PerformanceContainer.OfficeStart);
                aGTA = getGraphicalTestArguments(); // get new TestArguments
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

     */

    public static XTextContent createIndex( XTextDocument xTextDoc, String kind)
      throws com.sun.star.uno.Exception {

        XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
        UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDoc );

    Object oInt = oDocMSF.createInstance( kind );

        XTextContent xTC = (XTextContent)
                        UnoRuntime.queryInterface(XDocumentIndex.class,oInt);

        return xTC;
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

    }

  public static XSpreadsheet createSpreadsheet( XSpreadsheetDocument oDoc )
              throws com.sun.star.uno.Exception {

    XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
        UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc );

    Object oInt = oDocMSF.createInstance(
                    "com.sun.star.sheet.Spreadsheet" );

    XSpreadsheet oSpreadsheet = (XSpreadsheet)
            UnoRuntime.queryInterface( XSpreadsheet.class, oInt );
View Full Code Here

Examples of com.sun.star.lang.XMultiServiceFactory

  public XDiagram createDiagram(XComponent oDoc, String kind) {
    XInterface oInterface = null;
    XDiagram oDiagram = null;

       //get LineDiagram
       XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface( XMultiServiceFactory.class, oDoc );

       try{
             oInterface = (XInterface) oDocMSF.createInstance("com.sun.star.chart."+kind);
      oDiagram  = (XDiagram) UnoRuntime.queryInterface(XDiagram.class, oInterface);
    } catch ( Exception e ) {
      // Some exception occures.FAILED
      System.out.println( "Couldn't create "+kind+"-Diagram "+ e );
    }
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.