summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-02-10 15:04:09 +0000
committerRüdiger Timm <rt@openoffice.org>2004-02-10 15:04:09 +0000
commit2c6dbfe739009c18513af14133658ad6e7344fa9 (patch)
treed8f1e6ecd8b48d82b8c13561151ef68e5ba903ad
parent9bf99194afe4ff69d985629c441e1d9304d9b708 (diff)
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
-rw-r--r--scripting/examples/beanshell/HelloWorld/helloworld.bsh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripting/examples/beanshell/HelloWorld/helloworld.bsh b/scripting/examples/beanshell/HelloWorld/helloworld.bsh
new file mode 100644
index 000000000000..e5bd20f06098
--- /dev/null
+++ b/scripting/examples/beanshell/HelloWorld/helloworld.bsh
@@ -0,0 +1,11 @@
+// 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)" );