Package com.sun.star.frame

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


            propertyvalue[ 0 ].Name = "Hidden";
            propertyvalue[ 0 ].Value = new Boolean(true);
           
            // 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,
View Full Code Here


    {
        XComponentLoader aLoader = UnoRuntime.queryInterface( XComponentLoader.class,
            orb.createInstance( "com.sun.star.frame.Desktop" ) );

        XComponent document = UnoRuntime.queryInterface( XComponent.class,
            aLoader.loadComponentFromURL( documentOrFactoryURL, "_blank", 0, i_args )
        );
        return document;
    }

    /* ------------------------------------------------------------------ */
 
View Full Code Here

       
        try {
            xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(
                XComponentLoader.class, xDesktop );
       
            xComponent  = xComponentLoader.loadComponentFromURL(
                sURL, "_blank", 0, xEmptyArgs);
        }
        catch( Exception e) {
            e.printStackTrace(System.err);
        }
View Full Code Here

            XComponentLoader xLoader = UnoRuntime.queryInterface(XComponentLoader.class, xDesktop);
            PropertyValue[] loadArgs = new PropertyValue[]
            {
                new PropertyValue("Model", -1, xTextDocument, com.sun.star.beans.PropertyState.DIRECT_VALUE)
            };
            xLoader.loadComponentFromURL("private:object", "_blank", 0, loadArgs);

            // remember some things for later usage
            xFrame = xTextDocument.getCurrentController().getFrame();
            xComponent = UnoRuntime.queryInterface(XComponent.class, xTextDocument);
        }
View Full Code Here

    protected XComponent setDocument(String url, PropertyValue[] lArgs) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException
    {
        loadArgs = lArgs;
        XComponentLoader xCompLoader = UnoRuntime.queryInterface(XComponentLoader.class, xFrame);
        xFrame.activate();
        return xComponent = xCompLoader.loadComponentFromURL(url, "_self", 0, loadArgs);
    }

    public void reload(XMultiServiceFactory xmsf) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException, com.sun.star.uno.Exception
    {
        closeFrame();
View Full Code Here

                XComponentLoader.class, oDesktop );
           
            PropertyValue [] szEmptyArgs = new PropertyValue [0];
            String strDoc = "private:factory/scalc";

            xComp = xCLoader.loadComponentFromURL(strDoc, "_blank", 0, szEmptyArgs );
            xSpreadSheetDoc = (XSpreadsheetDocument) UnoRuntime.queryInterface(
                XSpreadsheetDocument.class, xComp);
           
        } catch(Exception e){           
            System.err.println(" Exception " + e);
View Full Code Here

                UnoRuntime.queryInterface(XComponentLoader.class,
                    xMCF.createInstanceWithContext(
                        "com.sun.star.frame.Desktop", xContext));
     
            // Load a Writer document, which will be automaticly displayed
            XComponent xComponent = xLoader.loadComponentFromURL(
                "private:factory/scalc", "_blank", 0,
                new PropertyValue[0] );
     
            // Querying for the interface XSpreadsheetDocument
            XSpreadsheetDocument xSpreadsheetDoc =
View Full Code Here

                UnoRuntime.queryInterface( XComponentLoader.class,
                    xMCF.createInstanceWithContext("com.sun.star.frame.Desktop",
                                                   xCompContext ) );
           
            // Load a Writer document, which will be automaticly displayed
            XComponent xComponent = xComponentloader.loadComponentFromURL(
            "file:///" + stringFileName, "_blank", 0,
            new PropertyValue[0] );
           
            // Query for the interface XSpreadsheetDocument
            XSpreadsheetDocument xSpreadSheetDocument = ( XSpreadsheetDocument )
View Full Code Here

                                           xMCF.createInstanceWithContext(
                                               "com.sun.star.frame.Desktop",
                                               xCompContext ) );
           
            // Create an empty calc document, which will be automaticly displayed
            XComponent xComponent = xcomponentloader.loadComponentFromURL(
            "private:factory/scalc", "_blank", 0,
            new PropertyValue[0] );
           
            // Query for the interface XSpreadsheetDocument
            XSpreadsheetDocument xspreadsheetdocument = ( XSpreadsheetDocument )
View Full Code Here

      // create a new frame
            XFrame xFrame = xCurFrame.findFrame("_blank", FrameSearchFlag.CREATE);

            // load document in this frame
            XComponentLoader xFrameLoader = UnoRuntime.queryInterface(XComponentLoader.class, xFrame);
            xComp = xFrameLoader.loadComponentFromURL(
                                                docName, "_self", 0, szArgs);
            // wait for the document to load.
            try {
                Thread.sleep(10000);
            }
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.