Examples of gotoPreviousParagraph()


Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

                UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
            // Go to the end of the document, then select the preceding paragraphs
            mxDocCursor.gotoEnd ( false );
            xParaCursor.gotoPreviousParagraph ( false );
            xParaCursor.gotoPreviousParagraph ( true );
            xParaCursor.gotoPreviousParagraph ( true );
           
            // Get the XPropertySet of the cursor's currently selected text
            XPropertySet xCursorProps = (XPropertySet) UnoRuntime.queryInterface(
                XPropertySet.class, mxDocCursor );
           
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

            // Access the XParagraphCursor interface of our text cursor
            XParagraphCursor xParaCursor = (XParagraphCursor)
                UnoRuntime.queryInterface(XParagraphCursor.class, mxDocCursor);

            // Go back one paragraph (into Child_Section)
            xParaCursor.gotoPreviousParagraph ( false );
           
            // Insert a string into the Child_Section
            mxDocText.insertString ( mxDocCursor, "This is a test", false );
                   
            // Go to the end of the document
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

                   
            // Go to the end of the document
            mxDocCursor.gotoEnd( false );

            // Go back two paragraphs
            xParaCursor.gotoPreviousParagraph ( false );
            xParaCursor.gotoPreviousParagraph ( false );
            // Go to the end of the document, selecting the two paragraphs
            mxDocCursor.gotoEnd ( true );
           
            // Create another text section and access it's XNamed interface
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

            // Go to the end of the document
            mxDocCursor.gotoEnd( false );

            // Go back two paragraphs
            xParaCursor.gotoPreviousParagraph ( false );
            xParaCursor.gotoPreviousParagraph ( false );
            // Go to the end of the document, selecting the two paragraphs
            mxDocCursor.gotoEnd ( true );
           
            // Create another text section and access it's XNamed interface
            XNamed xParentNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class,
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

            mxDocCursor.gotoEnd ( false );
            // Insert a new paragraph
            mxDocText.insertControlCharacter (
                mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
            // And select the new pargraph
            xParaCursor.gotoPreviousParagraph ( true );
           
            // Create a new Text Section and access it's XNamed interface
            XNamed xLinkNamed = (XNamed) UnoRuntime.queryInterface(XNamed.class,
                      mxDocFactory.createInstance("com.sun.star.text.TextSection"));
            // Set the new text section's name to Linked_Section
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

           
            // Get the XParagraphCursor interface of our text cursor
            XParagraphCursor xParaCursor = (XParagraphCursor)
                UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
            // Jump back before all the text we just inserted
            xParaCursor.gotoPreviousParagraph ( false );
            xParaCursor.gotoPreviousParagraph ( false );
           
            // Insert a string at the beginning of the block of text
            mxDocText.insertString ( mxDocCursor, "Fish section begins:", false );
           
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

            // Get the XParagraphCursor interface of our text cursor
            XParagraphCursor xParaCursor = (XParagraphCursor)
                UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
            // Jump back before all the text we just inserted
            xParaCursor.gotoPreviousParagraph ( false );
            xParaCursor.gotoPreviousParagraph ( false );
           
            // Insert a string at the beginning of the block of text
            mxDocText.insertString ( mxDocCursor, "Fish section begins:", false );
           
            // Then select all of the text
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

            UnoRuntime.queryInterface(XParagraphCursor.class, xTextCursor);

        // XParagraphCursor (does not make sense)
        bSuccess = xParagraphCursor.gotoNextParagraph(false);
        assure("gotoNextParagraph(): succeeded", !bSuccess);
        bSuccess = xParagraphCursor.gotoPreviousParagraph(false);
        assure("gotoPreviousParagraph(): succeeded", !bSuccess);
        bSuccess = xParagraphCursor.gotoStartOfParagraph(false);
        assure("gotoStartOfParagraph(): succeeded", !bSuccess);
        bSuccess = xParagraphCursor.gotoEndOfParagraph(false);
        assure("gotoEndOfParagraph(): succeeded", !bSuccess);
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

                    mxDocText.insertControlCharacter ( mxDocCursor,
                            ControlCharacter.PARAGRAPH_BREAK, false );
                    // Position the cursor in the second paragraph
                    XParagraphCursor xParaCursor = (XParagraphCursor) UnoRuntime.queryInterface(
                            XParagraphCursor.class, mxDocCursor );
                    xParaCursor.gotoPreviousParagraph ( false );

                    // Get an XNameAccess interface to all auto text groups from the document factory
                    XNameAccess xContainer = (XNameAccess) UnoRuntime.queryInterface(
                            XNameAccess.class, mxFactory.createInstance (
                                    "com.sun.star.text.AutoTextContainer" ) );
View Full Code Here

Examples of com.sun.star.text.XParagraphCursor.gotoPreviousParagraph()

                    // Insert new paragraph
                    mxDocText.insertControlCharacter (
                            mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );

                    // Position cursor in new paragraph
                    xParaCursor.gotoPreviousParagraph ( false );

                    // Insert a string in the new paragraph
                    mxDocText.insertString ( mxDocCursor, "Some text for a new autotext block", false );

                    // Go to the end of the document
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.