Files
libreoffice/scripting/examples/beanshell/HelloWorld/helloworld.bsh
Rüdiger Timm 2c6dbfe739 INTEGRATION: CWS scriptingf3 (1.1.2); FILE ADDED
2004/01/22 10:57:38 dfoster 1.1.2.1: #i23683#
Add example scripts in all languages
2004-02-10 15:04:09 +00:00

12 lines
395 B
Plaintext

// Hello World in BeanShell
import com.sun.star.uno.UnoRuntime;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XText;
import com.sun.star.text.XTextRange;
oDoc = context.getDocument();
xTextDoc = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class,oDoc);
xText = xTextDoc.getText();
xTextRange = xText.getEnd();
xTextRange.setString( "Hello World (in BeanShell)" );