Examples of XTextFrame


Examples of com.sun.star.text.XTextFrame

    */
    protected TestEnvironment createTestEnvironment(
        TestParameters Param, PrintWriter log) {

        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XPropertySet oPropSet = null;
        XText oText = null;
        XTextCursor oCursor = null;

        // get a soffice factory object
View Full Code Here

Examples of com.sun.star.text.XTextFrame

    */
    protected TestEnvironment createTestEnvironment(
        TestParameters Param, PrintWriter log) {

        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XPropertySet oPropSet = null;
        XText oText = null;
        XTextCursor oCursor = null;

        // get a soffice factory object
View Full Code Here

Examples of com.sun.star.text.XTextFrame

    public static XTextFrame getFrameByName(String sFrameName, XTextDocument xTD) throws NoSuchElementException, WrappedTargetException {
        XTextFramesSupplier xFrameSupplier = (XTextFramesSupplier) UnoRuntime.queryInterface(XTextFramesSupplier.class, xTD);
        if (xFrameSupplier.getTextFrames().hasByName(sFrameName)) {
            Object oTextFrame = xFrameSupplier.getTextFrames().getByName(sFrameName);
            XTextFrame xTextFrame = (XTextFrame) UnoRuntime.queryInterface(XTextFrame.class, oTextFrame);
            return xTextFrame;
        }
        return null;
    }
View Full Code Here

Examples of com.sun.star.text.XTextFrame

            if (optSenderPlaceholder.getState()) {optSenderPlaceholderItemChanged();}          
        }
    }

    public void chkCompanyReceiverItemChanged() {
        XTextFrame xReceiverFrame = null;

        if (chkCompanyReceiver.getState() != 0) {
            try {
                xReceiverFrame = TextFrameHandler.getFrameByName("Receiver Address", xTextDocument);
                Integer FrameWidth = (Integer) Helper.getUnoPropertyValue(xReceiverFrame, "Width");
View Full Code Here

Examples of com.sun.star.text.XTextFrame

            shape.setSize(size);
        }
        catch( com.sun.star.beans.PropertyVetoException pvE ){
        }

        XTextFrame TF = (XTextFrame)UnoRuntime.queryInterface( ifcClass, SrvObj );

        XPropertySet oPropSet = (XPropertySet)
                        UnoRuntime.queryInterface( XPropertySet.class, SrvObj );

View Full Code Here

Examples of com.sun.star.text.XTextFrame

    * <code>XTextFramesSupplier</code> interface.<br>
    */
    public synchronized TestEnvironment createTestEnvironment(
            TestParameters Param, PrintWriter log ) throws StatusException {
        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XText oText = null;
        XTextCursor oCursor = null;
        XMultiServiceFactory oDocMSF = null;
        XTextFramesSupplier oInterface = null;

View Full Code Here

Examples of com.sun.star.text.XTextFrame

    {
        try
        {
            // Use the document's factory to create a new text frame and
            // immediately access it's XTextFrame interface
            XTextFrame xFrame = (XTextFrame) UnoRuntime.queryInterface (
                XTextFrame.class, mxDocFactory.createInstance (
                    "com.sun.star.text.TextFrame" ) );
           
            // Access the XShape interface of the TextFrame
            XShape xShape = (XShape)UnoRuntime.queryInterface(XShape.class, xFrame);
            // Access the XPropertySet interface of the TextFrame
            XPropertySet xFrameProps = (XPropertySet)UnoRuntime.queryInterface(
                XPropertySet.class, xFrame );
           
            // Set the size of the new Text Frame using the XShape's 'setSize'
            // method
            Size aSize = new Size();
            aSize.Height = 400;
            aSize.Width = 15000;
            xShape.setSize(aSize);
            // Set the AnchorType to
            // com.sun.star.text.TextContentAnchorType.AS_CHARACTER
            xFrameProps.setPropertyValue( "AnchorType",
                                          TextContentAnchorType.AS_CHARACTER );
            // Go to the end of the text document
            mxDocCursor.gotoEnd( false );
            // Insert a new paragraph
            mxDocText.insertControlCharacter (
                mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
            // Then insert the new frame
            mxDocText.insertTextContent(mxDocCursor, xFrame, false);
           
            // Access the XText interface of the text contained within the frame
            XText xFrameText = xFrame.getText();
            // Create a TextCursor over the frame's contents
            XTextCursor xFrameCursor = xFrameText.createTextCursor();
            // Insert some text into the frame
            xFrameText.insertString(
                xFrameCursor, "The first line in the newly created text frame.",
View Full Code Here

Examples of com.sun.star.text.XTextFrame

        TestEnvironment tEnv = new TestEnvironment(oObj);

        tEnv.addObjRelation("NoAttach", "SwXTextEmbeddedObject");

        XTextFrame aFrame = SOF.createTextFrame(xTextDoc, 500, 500);
        XText oText = xTextDoc.getText();
        XTextCursor oCursor = oText.createTextCursor();
        XTextContent the_content = (XTextContent) UnoRuntime.queryInterface(
                                           XTextContent.class, aFrame);
View Full Code Here

Examples of com.sun.star.text.XTextFrame

                                             "com.sun.star.text.DocumentIndex");
            SOfficeFactory.insertTextContent(xTextDoc, (XTextContent) oTC);

            log.println("    adding TextFrame");

            XTextFrame frame = SOfficeFactory.createTextFrame(xTextDoc, 500,
                                                              500);
            oTC = (XTextContent) UnoRuntime.queryInterface(XTextContent.class,
                                                           frame);
            SOfficeFactory.insertTextContent(xTextDoc, (XTextContent) oTC);
View Full Code Here

Examples of com.sun.star.text.XTextFrame

     *    creating a Testenvironment for the interfaces to be tested
     */
    public synchronized TestEnvironment createTestEnvironment(TestParameters Param,
                                                              PrintWriter log) {
        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XTextFrame oFrame2 = null;
        XPropertySet oPropSet = null;
        XText oText = null;
        XTextCursor oCursor = null;


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.