Package com.sun.star.frame

Examples of com.sun.star.frame.XComponentLoader.loadComponentFromURL()


                    XComponentLoader aCompLoader = (XComponentLoader) UnoRuntime.queryInterface( XComponentLoader.class, aDesktop);
                   
                    // XComponent aDoc = null;

                    _aGTA.getPerformance().startTime(PerformanceContainer.Load);
                    aDoc = aCompLoader.loadComponentFromURL(_sInputURL, "_blank", 0, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList) );
                    _aGTA.getPerformance().stopTime(PerformanceContainer.Load);
                    if (aDoc != null)
                    {
                        GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Load document done.");
                        showDocumentType(aDoc);
View Full Code Here


      System.in.read();
      while(System.in.available() > 0)
        System.in.read();

      XComponent rComponent = rLoader.loadComponentFromURL(urls[i], "_blank"0, new PropertyValue[0]);

//          testWriter(rComponent);
      System.err.println("press any key to close the document");
      System.in.read();
      while(System.in.available() > 0)
View Full Code Here

        // load the document
        String docURL = database.getDatabase().getDocumentURL();
        final XComponentLoader loader = (XComponentLoader)UnoRuntime.queryInterface( XComponentLoader.class,
            getORB().createInstance( "com.sun.star.frame.Desktop" ) );
        XModel doc = (XModel)UnoRuntime.queryInterface( XModel.class,
            loader.loadComponentFromURL( docURL, "_blank", 0, new PropertyValue[] {} ) );

        // establish the connection
        XDatabaseDocumentUI docUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface( XDatabaseDocumentUI.class,
            doc.getCurrentController() );
        docUI.connect();
View Full Code Here

        // around the database document, the data source, the connection, etc. As long as those objects are
        // not cleaned up, the "database model impl" - the structure holding all document data - will
        // stay alive, and subsequent requests to load the doc will just reuse it, without really loading it.
        docURL = copyToTempFile( docURL );
        doc = (XModel)UnoRuntime.queryInterface( XModel.class,
            loader.loadComponentFromURL( docURL, "_blank", 0, new PropertyValue[] {} ) );

        docUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface( XDatabaseDocumentUI.class,
            doc.getCurrentController() );
        docUI.connect();
View Full Code Here

    // query the desktop object for the XComponentLoader
    XComponentLoader xCLoader = (XComponentLoader)(UnoRuntime.queryInterface (XComponentLoader.class, oDesktop));
    if (templateUri != null) {
      // Create a new document that is a duplicate of the template.
      myDocument = xCLoader.loadComponentFromURL (templateUri, "_blank", 0, properties);
    }
    else {
      myDocument = xCLoader.loadComponentFromURL ("private:factory/" + docType, "_blank", 0, properties);
    }
    return (myDocument != null);
View Full Code Here

    if (templateUri != null) {
      // Create a new document that is a duplicate of the template.
      myDocument = xCLoader.loadComponentFromURL (templateUri, "_blank", 0, properties);
    }
    else {
      myDocument = xCLoader.loadComponentFromURL ("private:factory/" + docType, "_blank", 0, properties);
    }
    return (myDocument != null);
  }

  /**
 
View Full Code Here

    // query the desktop object for the XComponentLoader
    XComponentLoader xCLoader = (XComponentLoader)(UnoRuntime.queryInterface (XComponentLoader.class, oDesktop));

    PropertyValue [] szEmptyArgs = new PropertyValue [0];
    myDocument = xCLoader.loadComponentFromURL (uri, "_blank", 0, szEmptyArgs);
    return (myDocument != null);
  }

  /**
   * Save the document.
View Full Code Here

        propertyvalue[ 1 ].Value = "1";

        // Loading the wanted document
        String stringUrl = convertToUrl(fileInPath, xcomponentcontext);
        Debug.logInfo("stringUrl:" + stringUrl, module);
        Object objectDocumentToStore = xcomponentloader.loadComponentFromURL(stringUrl, "_blank", 0, propertyvalue);

        // Getting an object that will offer a simple way to store a document to a URL.
        XStorable xstorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, objectDocumentToStore);

        // Preparing properties for converting the document
View Full Code Here

        propertyvalue[1] = new PropertyValue();
        propertyvalue[1].Name = "InputStream";
        propertyvalue[1].Value = is;

        // Loading the wanted document
        Object objectDocumentToStore = xcomponentloader.loadComponentFromURL("private:stream", "_blank", 0, propertyvalue);
        if (objectDocumentToStore == null) {
            Debug.logError("Could not get objectDocumentToStore object from xcomponentloader.loadComponentFromURL", module);
        }

        // Getting an object that will offer a simple way to store a document to a URL.
View Full Code Here

            //propertyvalue[ 1 ] = new PropertyValue();
            //propertyvalue[ 1 ].Name = "FilterName";
            //propertyvalue[ 1 ].Value = "HTML (StarWriter)";

            // Loading the wanted document
            Object objectDocumentToStore = xcomponentloader.loadComponentFromURL(stringUrl, "_blank", 0, propertyvalue);

            // Getting an object that will offer a simple way to store a document to a URL.
            XStorable xstorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, objectDocumentToStore);

            // Preparing properties for comparing the document
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.