Package com.sun.star.lang

Examples of com.sun.star.lang.XComponent


            XInterface xField = (XInterface) xMSFDoc.createInstance("com.sun.star.text.TextField.User");
            XDependentTextField xDepField = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, xField);
            XTextContent xFieldContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xField);
            if (xTextFieldsSupplier.getTextFieldMasters().hasByName("com.sun.star.text.FieldMaster.User." + FieldName)) {
                Object oMaster = xTextFieldsSupplier.getTextFieldMasters().getByName("com.sun.star.text.FieldMaster.User." + FieldName);
                XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, oMaster);
                xComponent.dispose();
            }
            XPropertySet xPSet = createUserField(FieldName, FieldTitle);
            xDepField.attachTextFieldMaster(xPSet);
            xTextCursor.getText().insertTextContent(xTextCursor, xFieldContent, false);
        } catch (com.sun.star.uno.Exception exception) {
View Full Code Here


        // test getExistingBridges
        XBridge xBridges[] = bridgeFactory.getExistingBridges();
        assure("", UnoRuntime.areSame(xBridge, xBridges[0]));

        // dispose the bridge
        XComponent xComponent = (XComponent)UnoRuntime.queryInterface(XComponent.class, xBridge);
        xComponent.dispose();


        // test that the bridge has been removed
        assure("", bridgeFactory.getBridge("testbridge") == null);



        rightSide = new PipedConnection(new Object[0]);
        leftSide = new PipedConnection(new Object[]{rightSide});


        // test that we really get a new bridge
        XBridge xBridge_new = bridgeFactory.createBridge("testbridge", "urp", (XConnection)leftSide, null);
        assure("", !UnoRuntime.areSame(xBridge, xBridge_new));

        for(int i = 0; i <10000; ++ i) {
            Object x[] = new Object[100];
        }

        // test getExistingBridges
        xBridges = bridgeFactory.getExistingBridges();
        assure("",
               xBridges.length == 1
               && UnoRuntime.areSame(xBridge_new, xBridges[0]));

        // dispose the new bridge
        XComponent xComponent_new = (XComponent)UnoRuntime.queryInterface(XComponent.class, xBridge_new);
        xComponent_new.dispose();
    }
View Full Code Here

   */

    public XTextDocument createTextDoc( String frameName )
                                        throws com.sun.star.uno.Exception {

        XComponent oDoc = openDoc("swriter",frameName);

        if ( oDoc != null) {
            return (XTextDocument)
                UnoRuntime.queryInterface( XTextDocument.class, oDoc );
        }
View Full Code Here

   */

    public XTextDocument createTextDoc( String frameName, PropertyValue[] mediaDescriptor )
                                        throws com.sun.star.uno.Exception {

        XComponent oDoc = openDoc("swriter", frameName, mediaDescriptor);

        if ( oDoc != null) {
            return (XTextDocument) UnoRuntime.queryInterface( XTextDocument.class, oDoc );
        }
        else {
View Full Code Here

   */

    public XSpreadsheetDocument createCalcDoc( String frameName )
                                        throws com.sun.star.uno.Exception {

        XComponent oDoc = openDoc("scalc",frameName);

        if ( oDoc != null) {
            return (XSpreadsheetDocument)
            UnoRuntime.queryInterface( XSpreadsheetDocument.class, oDoc );
        }
View Full Code Here

   */

    public XSpreadsheetDocument createCalcDoc( String frameName, PropertyValue[] mediaDescriptor )
                                        throws com.sun.star.uno.Exception {

        XComponent oDoc = openDoc("scalc",frameName, mediaDescriptor);

        if ( oDoc != null) {
            return (XSpreadsheetDocument)
            UnoRuntime.queryInterface( XSpreadsheetDocument.class, oDoc );
        }
View Full Code Here

                                        throws com.sun.star.uno.Exception {

//        XComponent oDoc = loadDocument(
//                            util.utils.getFullTestURL("emptyChart.sds"));
       
        XComponent oDoc = loadDocument("private:factory/schart");
       
        if ( oDoc != null) {
            return (XChartDocument)
            UnoRuntime.queryInterface( XChartDocument.class, oDoc );
        }
View Full Code Here

            // that noargs thing for load attributes
            PropertyValue [] szEmptyArgs = new PropertyValue [0];
            String frameName = "_blank";

            XComponent oDoc = oCLoader.loadComponentFromURL(
                                    fileName, frameName, 0, szEmptyArgs );

            if ( oDoc == null ) {
                    return null;
            }
View Full Code Here

                               com.sun.star.uno.Exception {

            // that noargs thing for load attributes
            String frameName = "_blank";

            XComponent oDoc = oCLoader.loadComponentFromURL(
                                    fileName, frameName, 0, Args );

            if ( oDoc == null ) {
                    return null;
            }
View Full Code Here

    if ( frameName == null ) {
      frameName = "_blank";
    }
    // load a blank a doc
    XComponent oDoc = oCLoader.loadComponentFromURL(
        "private:factory/"+kind, frameName, 40, Args );

        return oDoc;

    } // finished openDoc
View Full Code Here

TOP

Related Classes of com.sun.star.lang.XComponent

Copyright © 2018 www.massapicom. 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.