diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-03-22 09:45:11 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-03-22 09:45:11 +0000 |
commit | 1aad39e40da21dbc1e20d2df179549964c373e13 (patch) | |
tree | 7b9469d7ef3705453359b847639cc4f9b025e35b /scripting/examples/python | |
parent | dbf84e82cc9f5033c944402e16c1035e58cdc334 (diff) |
INTEGRATION: CWS pyunofixes2 (1.2.34); FILE MERGED
2005/11/01 13:19:11 jbu 1.2.34.1: #i44632# text is now append to end of document as the other HelloWorld examples do (contributed by bmarcelly)
Diffstat (limited to 'scripting/examples/python')
-rw-r--r-- | scripting/examples/python/HelloWorld.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripting/examples/python/HelloWorld.py b/scripting/examples/python/HelloWorld.py index cc634c265bfb..7f5b45c8cd08 100644 --- a/scripting/examples/python/HelloWorld.py +++ b/scripting/examples/python/HelloWorld.py @@ -6,9 +6,8 @@ def HelloWorldPython( ): model = XSCRIPTCONTEXT.getDocument() #get the XText interface text = model.Text -#create an XTextCursor - cursor = text.createTextCursor() -#and insert the string - text.insertString( cursor, "Hello World (in Python)", 0 ) +#create an XTextRange at the end of the document + tRange = text.End +#and set the string + tRange.String = "Hello World (in Python)" return None - |