Answering to myself and leaving one more point.

> I almost finished but I still can't understand how to move the visible
> cursor to the correct position. What I do is:
> 
>     table.Rows.insertByIndex(index, count)
> 
>     cell = self.table.getCellByPosition(c, index+1)
>     controller.select(cell)
>     view_cursor.gotoStart(False)   # retes position of cursor to beginning
>                                    # of table
>     view_cursor.gotoEnd(True)

I see that using gotoRange works interactively (ipython + uno) but fails in the 
real situation (non interactive):

    view_cursor.gotoRange(src_cell.Text, False)
    txt = controller.getTransferable()
    view_cursor.gotoRange(dst_cell.Text, False)

    controller.insertTransferable(txt)

moreover I cannot extend the viewCursor:

In [246]: view_cursor.gotoRange(table.getCellByName('A3').Text, False)

In [247]: view_cursor.gotoRange(table.getCellByName('B3').Text, True)
---------------------------------------------------------------------------
com.sun.star.uno.RuntimeException         Traceback (most recent call last)

/home/misc/src/hg/py/oootemplate/demo/<ipython console> in <module>()

com.sun.star.uno.RuntimeException: 
> <ipython console>(1)<module>()

ipdb> 

While according to my understanding that should expand the cursor (clearly cell 
b3 *does* exist.

Am I wrong?

sandro
*:-)


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

Reply via email to