Text - Writer
Wie kann man den Cursor in eine Zelle positionieren?
Wenn man den Tabellennamen kennt geht es über die Tabelle und den Cursor (TextCursor
oder
ViewCursor).
odoc=thiscomponent
myTables = oDoc.getTextTables
myTable=myTables.getByName("Tabelle1")
x=myTable.getCellByPosition(0 , 1)
'ViewCursor
myViewCursor=oDoc.GetCurrentController.ViewCursor
myViewCursor.gotoRange(x,false)
'TextCursor
mytextCursor=mydoc.text.createtextcursor()
mytextCursor.gotoRange(x,false)
myTables = oDoc.getTextTables
myTable=myTables.getByName("Tabelle1")
x=myTable.getCellByPosition(0 , 1)
'ViewCursor
myViewCursor=oDoc.GetCurrentController.ViewCursor
myViewCursor.gotoRange(x,false)
'TextCursor
mytextCursor=mydoc.text.createtextcursor()
mytextCursor.gotoRange(x,false)
