Hi Stephan,

On 5/3/06, Stephan Wunderlich <[EMAIL PROTECTED]> wrote:

mmm ... in my OOo 2.0.2 you code works like a charm even with TextTables
... anyway to make a special treatment for them you could do something
like this:

REM the cursor is already present
cursor.goRight(1, false)
cursor.goLeft(1, true)
if (isEmpty(cursor.TextTable) then
        cursor.setString("")
endif


thanks! this helped. The plot was the used cursor:

if the cursor is a "real" XTextCursor (created with
XText.creatTextCursorByRange(....)) the cursor.goRight(1,false) behaves
different to a XViewCursor (you get using
ThisComponent.CurrentController.getViewCursor):

xTextCursor.goRight(1,false) jumps to the start of the paragraph after the
table, wheras a viewCursor.goRight(1,false) jumps into the first cell of the
textTable. So your Code doesn't work with a xTextCursor and with a
viewCursor the comparison is not needed (as you already mentioned).

I think this is very strange... bug or feature?

Christoph

Reply via email to