Hi Max,
in java I try to write a add-on that creates a bookmark at the current cursor location in a swriter document.
The following code works well for usual texts passages in swriter.
When I run the add-ons with the current cursor location in a table (pure openoffice tabel, no shreadsheet) it does not work.
How do I handle this case?

You'll have to treat the case that you are in a texttable seperately.
For this you first need to know if you are in a texttable or not :-)
Fortunately the ViewCursor has a property called "TextTable" and if this isn't empty you know that you are in a texttable. If that is the case methinks there was a property Cell at the Cursor that shouldn't be empty now.
Let's say you got that and called it xCell, then something like

xCell.getText().insertTextContent(xCell,xTextContent,false);

should work.

Hope that helps

Regards

Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to