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)
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user