Hi,
it's a bug in the implementation of the anchor creation.
See the change below to workaround this problem.

I submitted http://www.openoffice.org/issues/show_bug.cgi?id=67869

Regards,

Oliver

Christoph Lutz wrote:
Hi,

I have got a TextField in a cell of a TextTable and the TextField is
enclosed by a bookmark that should be used to access the TextField.
How do I get access to the model of the TextField using the bookmark?

Please note, that using a bookmark to access the model of the
TextField works fine when the TextField is put to a normal text area
and NOT into a cell of a TextTable. For Example accessing such a
TextFields via bookmark works fine with the followin lines of code:

Sub getTextFieldInBookmark(bookmarkName as String)
 bookmark = ThisComponent.getBookmarks().getByName(bookmarkName)

 ' get Paragraph
anchor = bookmark.Anchor
newanchor = anchor.getText.createTextCursorByRange( anchor )
enu = newanchor.createEnumeration()
 par = enu.nextElement()
' get TextPortion that has property TextField (second element)
 enu = par.createEnumeration()
 enu.nextElement() ' first element is the bookmark-portion itself
 portion = enu.nextElement() ' second element is the textField-range
getTextFieldInBookmark = portion.TextField End Sub
Why doesn't this work when a bookmark within a TextTable is used?

regards,
Christoph


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

Reply via email to