Apache OpenOffice (AOO) Bugzilla – Issue 67869
Access to bookmark anchors in table cells fails
Last modified: 2017-05-20 11:17:41 UTC
The following macro tries to access a field which is enclosed with a bookmark. It fails if the field is located in a table cell. Sub getTextFieldInBookmark(bookmarkName as String) bookmark = ThisComponent.getBookmarks().getByName(bookmarkName) ' get Paragraph enu = bookmark.Anchor.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
The xParentText member is initially not set and not created in SwXTextRange::createEnumeration. If created otherwise (using getText()) the ::nextElement method of the enumeration creates a table object instead of a paragraph object.
move target to 3.x according http://wiki.services.openoffice.org/wiki/Target_3x
Reset assigne to the default "issues@openoffice.apache.org".