Hi Sandro,

I tried it without a XTextViewCursor.
Don't know, if the XSelection interface is supported in headless mode, if no, then maybe someone of the writer team has an idea.

I didn't find a way to span a XTextRange over more then one cell to get the selection at a whole, so try the following:

You have to iterate over each cell of your row, put the sample code in a loop (after translating from Basic to Python):

cellSrc = thisComponent.TextTables.getByIndex(0).getCellByPosition(0,0,0,0)
cursorSrc = cellSrc.getText.createTextCursorbyRange(cellSrc.getStart)
cursorSrc.gotoEnd(true)
Thiscomponent.CurrentController.select(cursorSrc)
transferable = Thiscomponent.CurrentController.getTransferable()
cellDest= thisComponent.TextTables.getByIndex(0).getCellByPosition(0,1,0,1)
cursorDest = cellDest.getText.createTextCursorByRange(cellDest.getStart)
cursorDest.gotoEnd(true)
Thiscomponent.CurrentController.select(cursorDest)
Thiscomponent.CurrentController.insertTransferable(transferable)

Regards

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to