Examples of gotoPreviousParagraph()


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()

                out.println(
                        "Preparing cursor to sorting. Text before sorting:");
                paragrCursor.gotoEnd(true);

                for (int i = 0; i < 6; i++) {
                    paragrCursor.gotoPreviousParagraph(true);
                }

                out.println(textCursor.getString());
            }
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);
        assertFalse("gotoNextParagraph(): succeeded", bSuccess);
        bSuccess = xParagraphCursor.gotoPreviousParagraph(false);
        assertFalse("gotoPreviousParagraph(): succeeded", bSuccess);
        bSuccess = xParagraphCursor.gotoStartOfParagraph(false);
        assertFalse("gotoStartOfParagraph(): succeeded", bSuccess);
        bSuccess = xParagraphCursor.gotoEndOfParagraph(false);
        assertFalse("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 (
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 );
View Full Code Here

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

            // Insert a new paragraph and position the cursor in it
            mxDocText.insertControlCharacter ( mxDocCursor,
                          ControlCharacter.PARAGRAPH_BREAK, false );
            XParagraphCursor xParaCursor = (XParagraphCursor)
                UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
            xParaCursor.gotoPreviousParagraph ( false );
           
            // Create a new ContentIndexMark and get it's XPropertySet interface
            XPropertySet xEntry = (XPropertySet)UnoRuntime.queryInterface(
                XPropertySet.class,
                mxDocFactory.createInstance("com.sun.star.text.ContentIndexMark"));
View Full Code Here

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

            // Get the Paragraph cursor
            XParagraphCursor xParaCursor = (XParagraphCursor)
                UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
           
            // Move the cursor into the new paragraph
            xParaCursor.gotoPreviousParagraph ( false );
           
            // Create a new ReferenceMark and get it's XNamed interface
            XNamed xRefMark = (XNamed) UnoRuntime.queryInterface(XNamed.class,
                  mxDocFactory.createInstance ("com.sun.star.text.ReferenceMark"));
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.