Package ag.ion.bion.officelayer.text

Examples of ag.ion.bion.officelayer.text.IViewCursor


   * could not be determined
   *
   * @author Markus Kr�ger
   */
  public short getEndPageNumber() {
    IViewCursor viewCursor = textDocument.getViewCursorService().getViewCursor();
    IPageCursor pageCursor = viewCursor.getPageCursor();
    if(pageCursor != null) {
      viewCursor.goToRange(getEnd(),false);
      return pageCursor.getPage();
    }
    return -1;
 
View Full Code Here


   * Jumps to the bookmark.
   *
   * @author Markus Kr�ger
   */
  public void jumpTo() {
    IViewCursor viewCursor = textDocument.getViewCursorService().getViewCursor();
    viewCursor.goToRange(this, false);
  }
View Full Code Here

    XText xText = textDocumentTextShape.getXText();
    if(xText != null){
      XTextCursor xTextCursor = xText.createTextCursor();
      xTextCursor.gotoStart(false);

      IViewCursor viewCursor = textDoc.getViewCursorService().getViewCursor();
      ITextRange textRange;
      try {
        textRange = textDoc.getTextService().getTextContentService().constructNewTextRange(textDoc, xTextCursor.getStart());
      } catch (TextException e1) {
        textRange = null;
        e1.printStackTrace();
      }
      if(textRange == null){
        return;
      }
      viewCursor.goToRange(textRange, false);
      try {
        StringReader reader = new StringReader(textInfo.getText());
        InputStream is = new ReaderInputStream(reader);
        viewCursor.getTextCursorFromStart().insertDocument(is, RTFFilter.FILTER);
//        viewCursor.getTextCursorFromStart().insertDocument(is, HTMLFilter.FILTER);
      } catch (NOAException e) {
        e.printStackTrace();
      }
    }
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.text.IViewCursor

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.