Issue 67869 - Access to bookmark anchors in table cells fails
Summary: Access to bookmark anchors in table cells fails
Status: ACCEPTED
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: OOo 1.1.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-28 11:33 UTC by Oliver Specht
Modified: 2017-05-20 11:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Specht 2006-07-28 11:33:00 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
Comment 1 Oliver Specht 2006-07-28 11:35:42 UTC
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.
Comment 2 Martin Hollmichel 2007-09-10 13:36:56 UTC
move target to 3.x according http://wiki.services.openoffice.org/wiki/Target_3x
Comment 3 Marcus 2017-05-20 11:17:41 UTC
Reset assigne to the default "issues@openoffice.apache.org".