Java Code Examples for com.sun.star.text.XTextRange#setString()
The following examples show how to use
com.sun.star.text.XTextRange#setString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HelloWorld.java From kkFileViewOfficeEdit with Apache License 2.0 | 5 votes |
public static void printHW(XScriptContext xSc) { // getting the text document object XTextDocument xtextdocument = (XTextDocument) UnoRuntime.queryInterface( XTextDocument.class, xSc.getDocument()); XText xText = xtextdocument.getText(); XTextRange xTextRange = xText.getEnd(); xTextRange.setString( "Hello World (in Java)" ); }
Example 2
Source File: HelloWorld.java From kkFileView with Apache License 2.0 | 5 votes |
public static void printHW(XScriptContext xSc) { // getting the text document object XTextDocument xtextdocument = (XTextDocument) UnoRuntime.queryInterface( XTextDocument.class, xSc.getDocument()); XText xText = xtextdocument.getText(); XTextRange xTextRange = xText.getEnd(); xTextRange.setString( "Hello World (in Java)" ); }