Package com.sun.star.text

Examples of com.sun.star.text.XTextCursor.gotoEnd()


        ITextRange newTextRange = textDocument.getViewCursorService()
            .getViewCursor().getStartTextRange();
        XTextCursor cursor = newTextRange.getXTextRange().getText()
            .createTextCursor();
        cursor.gotoEnd(false);
        newTextRange = new TextRange(textDocument, cursor);
        paragraphs[0].getCloneService().cloneToPosition(
            new CloneDestinationPosition(newTextRange, newTextRange
                .getClass()), true, null);
View Full Code Here


        IParagraph[] paragraphs = textEnumeration.getParagraphs();
       
       
        ITextRange newTextRange = textDocument.getViewCursorService().getViewCursor().getStartTextRange();
        XTextCursor cursor = newTextRange.getXTextRange().getText().createTextCursor();
        cursor.gotoEnd(false);
        newTextRange = new TextRange(textDocument, cursor);
        paragraphs[0].getCloneService().cloneToPosition(new CloneDestinationPosition(newTextRange, newTextRange.getClass()), true, null);
               
        textDocument.close();
        localOfficeApplication.deactivate();
View Full Code Here

  {
    XText xText = (XText)
      UnoRuntime.queryInterface( XText.class, xShape );

    XTextCursor xTextCursor = xText.createTextCursor();
    xTextCursor.gotoEnd( false );
    if ( bNewParagraph == true )
    {
      xText.insertControlCharacter( xTextCursor, ControlCharacter.PARAGRAPH_BREAK, false );
      xTextCursor.gotoEnd( false );
    }
View Full Code Here

    XTextCursor xTextCursor = xText.createTextCursor();
    xTextCursor.gotoEnd( false );
    if ( bNewParagraph == true )
    {
      xText.insertControlCharacter( xTextCursor, ControlCharacter.PARAGRAPH_BREAK, false );
      xTextCursor.gotoEnd( false );
    }
    XTextRange xTextRange = (XTextRange)
      UnoRuntime.queryInterface( XTextRange.class, xTextCursor );
    xTextRange.setString( sText );
    xTextCursor.gotoEnd( true );
View Full Code Here

      xTextCursor.gotoEnd( false );
    }
    XTextRange xTextRange = (XTextRange)
      UnoRuntime.queryInterface( XTextRange.class, xTextCursor );
    xTextRange.setString( sText );
    xTextCursor.gotoEnd( true );
    XPropertySet xPropSet = (XPropertySet)
      UnoRuntime.queryInterface( XPropertySet.class, xTextRange );
    return xPropSet;
  }
View Full Code Here

            com.sun.star.awt.FontSlant.ITALIC);
        xCursorProps.setPropertyValue("CharWeight",
            new Float(com.sun.star.awt.FontWeight.BOLD));

        // add more text at the end of the text using insertString
        xTextCursor.gotoEnd(false);
        xText.insertString(xTextCursor, " The mountainside sloped gently where he lay; "
            + "but below it was steep and he could see the dark of the oiled road "
            + "winding through the pass. There was a stream alongside the road "
            + "and far down the pass he saw a mill beside the stream and the falling water "
            + "of the dam, white in the summer sunlight.", false);
View Full Code Here

                xText.insertControlCharacter(xTextCursor, ControlCharacter.PARAGRAPH_BREAK, false);
                //    Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page");
                xTextCursor.collapseToEnd();
            }
            XTextCursor xSecondTextCursor = xText.createTextCursor();
            xSecondTextCursor.gotoEnd(false);
            insertTextSection(GroupName, TemplateName, xSecondTextCursor);
        }
        catch (IllegalArgumentException e)
        {
            e.printStackTrace(System.out);
View Full Code Here

  {
    XText xText = (XText)
      UnoRuntime.queryInterface( XText.class, xShape );

    XTextCursor xTextCursor = xText.createTextCursor();
    xTextCursor.gotoEnd( false );
    if ( bNewParagraph == true )
    {
      xText.insertControlCharacter( xTextCursor, ControlCharacter.PARAGRAPH_BREAK, false );
      xTextCursor.gotoEnd( false );
    }
View Full Code Here

    XTextCursor xTextCursor = xText.createTextCursor();
    xTextCursor.gotoEnd( false );
    if ( bNewParagraph == true )
    {
      xText.insertControlCharacter( xTextCursor, ControlCharacter.PARAGRAPH_BREAK, false );
      xTextCursor.gotoEnd( false );
    }
    XTextRange xTextRange = (XTextRange)
      UnoRuntime.queryInterface( XTextRange.class, xTextCursor );
    xTextRange.setString( sText );
    xTextCursor.gotoEnd( true );
View Full Code Here

      xTextCursor.gotoEnd( false );
    }
    XTextRange xTextRange = (XTextRange)
      UnoRuntime.queryInterface( XTextRange.class, xTextCursor );
    xTextRange.setString( sText );
    xTextCursor.gotoEnd( true );
    XPropertySet xPropSet = (XPropertySet)
      UnoRuntime.queryInterface( XPropertySet.class, xTextRange );
    return xPropSet;
  }
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.