Examples of loadComponentFromURL()


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

      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

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

            aPropertyValues[2] = Properties.createProperty("DocumentTitle", _docname);
            aPropertyValues[3] = Properties.createProperty("AsTemplate", new Boolean(_bAsTemplate));
            XHierarchicalNameContainer xHier = (XHierarchicalNameContainer) UnoRuntime.queryInterface(XHierarchicalNameContainer.class, _xDocuments);
            if (xHier.hasByHierarchicalName(_docname)){
                xRetComponent[0] = (XComponent)UnoRuntime.queryInterface(XComponent.class, xHier.getByHierarchicalName(_docname));
                xRetComponent[1] = xComponentLoader.loadComponentFromURL(_docname, "", 0, aPropertyValues);
            }
        } catch (Exception e) {
            e.printStackTrace(System.out);
        }
        return xRetComponent;
View Full Code Here

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

    protected XComponent setDocument(String url, PropertyValue[] lArgs) throws com.sun.star.lang.IllegalArgumentException, IOException, CloseVetoException {
        loadArgs = lArgs;
        XComponentLoader xCompLoader = (XComponentLoader) 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();
        createPreviewFrame(xmsf, xControl);
View Full Code Here

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

            try
            {
                PropertyValue[] aLoadProperties = PropertyHelper.createPropertyValueArrayFormArrayList(_aPropertyList);
                log.println("Load component: '" + _sName + "'");
                xDocComponent = xComponentLoader.loadComponentFromURL(_sName, "_blank", 0, aLoadProperties);
            }
            catch (com.sun.star.io.IOException e)
            {
                log.println("ERROR: Exception caught");
                log.println("Can't load document '" + _sName + "'");
View Full Code Here

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

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

            // load document in this frame
            XComponentLoader xFrameLoader = (XComponentLoader)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

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

        System.out.println("Working dir: " + workingDir);
        String fileUrl = util.utils.getFullURL(workingDir);
        System.out.println("File Url: " + fileUrl);

        try {
            xDesktopLoader.loadComponentFromURL(fileUrl, "_blank", 0, val);
        }
        catch(com.sun.star.io.IOException e) {
            failed("Could not load document");
        }
        catch(com.sun.star.lang.IllegalArgumentException e) {
View Full Code Here

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

            failed("Could not load document");
        }

        // try again: headless mode defect now?
        try {
            xDesktopLoader.loadComponentFromURL(fileUrl, "_blank", 0, val);
        }
        catch(com.sun.star.io.IOException e) {
            failed("Could not load document");
        }
        catch(com.sun.star.lang.IllegalArgumentException e) {
View Full Code Here

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

            XComponentLoader xLoader = (XComponentLoader)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 = (XComponent)UnoRuntime.queryInterface(XComponent.class, xTextDocument);
        }
View Full Code Here

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

            XComponentLoader.class,
            orb.createInstance( "com.sun.star.frame.Desktop" )
        );

        XComponent document = dbfTools.queryComponent(
            aLoader.loadComponentFromURL( documentOrFactoryURL, "_blank", 0, new PropertyValue[ 0 ] )
        );
        return document;
    }

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

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

                maMCFactory.createInstanceWithContext("com.sun.star.frame.Desktop",
                                                      maContext) );

            aResult = (XModel) UnoRuntime.queryInterface(
                XModel.class,
                aLoader.loadComponentFromURL( "private:factory/" + sDocType,
                                              "_blank",
                                              0,
                                              new PropertyValue[ 0 ] ) );
        }
        catch( Exception 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.