Examples of goToRange()


Examples of ag.ion.bion.officelayer.text.IViewCursor.goToRange()

   *
   * @author Markus Kr�ger
   */
  public void jumpTo() {
    IViewCursor viewCursor = textDocument.getViewCursorService().getViewCursor();
    viewCursor.goToRange(this, false);
  }
  //----------------------------------------------------------------------------

}
View Full Code Here

Examples of ag.ion.bion.officelayer.text.IViewCursor.goToRange()

        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);
View Full Code Here

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

            XNameAccess xName = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oPageStyles);
            Object oPageStyle = xName.getByName("First Page");
            XIndexAccess xAllTextTables = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
            XTextContent xTextTable = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, xAllTextTables.getByIndex(0));
            XTextRange xRange = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xTextTable.getAnchor().getText());
            xViewTextCursor.gotoRange(xRange, false);
//            if (xPageCursor.getPage() == (short) 1) {
//                Helper.setUnoPropertyValue(xTextTable, "PageDescName", "First Page");
//                TextTableHandler.resetBreakTypeofTextTable(xTextTable);
//            }
            //      }
View Full Code Here

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

//                TextTableHandler.resetBreakTypeofTextTable(xTextTable);
//            }
            //      }
            XTextRange xHeaderRange = (XTextRange) Helper.getUnoPropertyValue(oPageStyle, "HeaderText", XTextRange.class);
            if (!com.sun.star.uno.AnyConverter.isVoid(xHeaderRange)) {
                xViewTextCursor.gotoRange(xHeaderRange, false);
                xViewTextCursor.collapseToStart();
            } else
                System.out.println("No Headertext available");

        } catch (com.sun.star.uno.Exception exception) {
View Full Code Here

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

           
        do{ // swith to the next page
         
          // select the current page of document with the cursor
          xPageCursor.jumpToEndOfPage();
          xModelCursor.gotoRange(xViewCursor,false);
          xModelCursor.setString("||page_break||");

        } while(xPageCursor.jumpToNextPage());

     
View Full Code Here

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

        assure("goLeft(): succeeded", !bSuccess);
        bSuccess = xTextCursor.goRight((short)1, false);
        assure("goRight(): failed", bSuccess);
        bSuccess = xTextCursor.goRight((short)1000, false);
        assure("goRight(): succeeded", !bSuccess);
        xTextCursor.gotoRange(xStart, false);
        xTextCursor.gotoRange(xEnd, false);
        try {
            xTextCursor.gotoRange(xDocTextCursor, false);
            assure("gotoRange(): succeeded", false);
        } catch (RuntimeException e) { /* expected */ }
View Full Code Here

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

        bSuccess = xTextCursor.goRight((short)1, false);
        assure("goRight(): failed", bSuccess);
        bSuccess = xTextCursor.goRight((short)1000, false);
        assure("goRight(): succeeded", !bSuccess);
        xTextCursor.gotoRange(xStart, false);
        xTextCursor.gotoRange(xEnd, false);
        try {
            xTextCursor.gotoRange(xDocTextCursor, false);
            assure("gotoRange(): succeeded", false);
        } catch (RuntimeException e) { /* expected */ }

View Full Code Here

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

        bSuccess = xTextCursor.goRight((short)1000, false);
        assure("goRight(): succeeded", !bSuccess);
        xTextCursor.gotoRange(xStart, false);
        xTextCursor.gotoRange(xEnd, false);
        try {
            xTextCursor.gotoRange(xDocTextCursor, false);
            assure("gotoRange(): succeeded", false);
        } catch (RuntimeException e) { /* expected */ }

        // XWordCursor
        xText.setString("Two words");
View Full Code Here

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

            XNameAccess xName = UnoRuntime.queryInterface(XNameAccess.class, oPageStyles);
            Object oPageStyle = xName.getByName("First Page");
            XIndexAccess xAllTextTables = UnoRuntime.queryInterface(XIndexAccess.class, oTextTableHandler.xTextTablesSupplier.getTextTables());
            XTextContent xTextTable = UnoRuntime.queryInterface(XTextContent.class, xAllTextTables.getByIndex(0));
            XTextRange xRange = UnoRuntime.queryInterface(XTextRange.class, xTextTable.getAnchor().getText());
            xViewTextCursor.gotoRange(xRange, false);
//            if (xPageCursor.getPage() == (short) 1) {
//                Helper.setUnoPropertyValue(xTextTable, "PageDescName", "First Page");
//                TextTableHandler.resetBreakTypeofTextTable(xTextTable);
//            }
            //      }
View Full Code Here

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

//            }
            //      }
            XTextRange xHeaderRange = (XTextRange) Helper.getUnoPropertyValue(oPageStyle, "HeaderText", XTextRange.class);
            if (!com.sun.star.uno.AnyConverter.isVoid(xHeaderRange))
            {
                xViewTextCursor.gotoRange(xHeaderRange, false);
                xViewTextCursor.collapseToStart();
            }
            else
            {
                System.out.println("No Headertext available");
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.