Package com.sun.star.frame

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


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

            aResult = (XModel) UnoRuntime.queryInterface(
                XModel.class,
                aLoader.loadComponentFromURL( "private:factory/" + sDocType,
                                              "_blank",
                                              0,
                                              new PropertyValue[ 0 ] ) );
        }
        catch( Exception ex )
View Full Code Here


                                oInterface );
                                oCLoader = ( XComponentLoader ) UnoRuntime.queryInterface( XComponentLoader.class, oDesktop );
                                PropertyValue [] szEmptyArgs = new PropertyValue [0];
                               
                                //  open a HTML document from OpenOffice.org
                                aDoc = oCLoader.loadComponentFromURL("http://api.openoffice.org/common/ref/" + stringURLDocument,
                                "_blank", 0, szEmptyArgs );
                            }
                        }
                        catch ( Exception exception ) {
                            System.err.println( exception );
View Full Code Here

                "com.sun.star.frame.Desktop", xRemoteContext);
            XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(
                XComponentLoader.class, desktop);

            PropertyValue[] loadProps = new PropertyValue[0];
            XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, loadProps);
           
            XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)UnoRuntime.queryInterface(
                XSpreadsheetDocument.class, xSpreadsheetComponent);

            XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets();
View Full Code Here

            oInterface = (XInterface) oMSF.createInstance( "com.sun.star.frame.Desktop" );
            oDesktop = ( XDesktop ) UnoRuntime.queryInterface( XDesktop.class, oInterface );
            oCLoader = ( XComponentLoader ) UnoRuntime.queryInterface( XComponentLoader.class, oDesktop );
            PropertyValue [] szEmptyArgs = new PropertyValue [0];
            String doc = "private:factory/swriter";
            aDoc = oCLoader.loadComponentFromURL(doc, "_blank", 0, szEmptyArgs );
            oDoc = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, aDoc);
           
        } // end of try
       
        catch(Exception e){
View Full Code Here

        Object desktop = xRemoteServiceManager.createInstanceWithContext(
            "com.sun.star.frame.Desktop", xRemoteContext);
        XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(
            XComponentLoader.class, desktop);
        PropertyValue[] loadProps = new PropertyValue[0];
        return xComponentLoader.loadComponentFromURL(loadUrl, "_blank", 0, loadProps);
    }

    protected XMultiComponentFactory getRemoteServiceManager(String unoUrl) throws java.lang.Exception {
        if (xRemoteContext == null) {
            // First step: create local component context, get local servicemanager and
View Full Code Here

            "com.sun.star.frame.Desktop", xRemoteContext);
        XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(
            XComponentLoader.class, desktop);

        PropertyValue[] loadProps = new PropertyValue[0];
        XComponent xDrawComponent = xComponentLoader.loadComponentFromURL("private:factory/sdraw", "_blank", 0, loadProps);
           
        // get draw page by index
        com.sun.star.drawing.XDrawPagesSupplier xDrawPagesSupplier = (com.sun.star.drawing.XDrawPagesSupplier)UnoRuntime.queryInterface(
            com.sun.star.drawing.XDrawPagesSupplier.class, xDrawComponent );
        com.sun.star.drawing.XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
View Full Code Here

           
            XComponentLoader xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(
                XComponentLoader.class, xInterface );
           
            PropertyValue[] xEmptyArgs = new PropertyValue[0];
            XComponent xComponent  = xComponentLoader.loadComponentFromURL( "private:factory/swriter", "_blank", 0, xEmptyArgs);
           
            XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(
                XTextDocument.class, xComponent );
            XText xText = xTextDocument.getText();
            createExampleData( xText );
View Full Code Here

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

    xComponent = (XComponent)UnoRuntime.queryInterface( XComponent.class,
      aLoader.loadComponentFromURL(
        sURL, sTargetFrame, nSearchFlags, aArgs ) );
    if ( xComponent == null )
      throw new Exception( "could not create document: " + sURL );
    return xComponent;
  }
View Full Code Here

      UnoRuntime.queryInterface( XComponentLoader.class,
      xmulticomponentfactory.createInstanceWithContext(
      "com.sun.star.frame.Desktop", xcomponentcontext ) );
     
      // Load a Writer document, which will be automaticly displayed
      XComponent xcomponent = xcomponentloader.loadComponentFromURL(
      "private:factory/scalc", "_blank", 0,
      new PropertyValue[0] );
     
      // Querying for the interface XSet on the XMultiServiceFactory
      XSet xsetMultiComponentFactory = ( XSet ) UnoRuntime.queryInterface(
View Full Code Here

      UnoRuntime.queryInterface( XComponentLoader.class,
      xmulticomponentfactory.createInstanceWithContext(
      "com.sun.star.frame.Desktop", xcomponentcontext ) );
     
      // Load a Writer document, which will be automaticly displayed
      XComponent xcomponent = xcomponentloader.loadComponentFromURL(
      "private:factory/swriter", "_blank", 0,
      new PropertyValue[0] );
     
      // Querying for the interface XTextDocument on the xcomponent
      XTextDocument xtextdocument = ( XTextDocument ) UnoRuntime.queryInterface(
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.