Issue 90729

Summary: Anchor of a table is corrupt
Product: Writer Reporter: clutz <chrlutz>
Component: programmingAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 2.4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on: 7747    
Issue Blocks:    

Description clutz 2008-06-14 12:53:12 UTC
The following code produces an InvalidArgumentException if it is applied on a
TextDocument with at least one table:

tt = ThisComponent.TextTables
for i=0 to tt.count-1
  table = tt.getByIndex(i)
  cursor = table.Anchor.Text.createTextCursorByRange(table.Anchor)
next i

It seems that table.Anchor is corrupt as also xray produces a lot of Exceptions
when inspecting the object. IMO table.Anchor should be an object that represents
a XTextRange in the Text-Objects that contains the table. The object is not
comparable via table.Anchor.Text.compareRegionStarts(table.Anchor,
table.Anchor.Text.Start), too.
Comment 1 eric.savary 2008-06-14 13:49:41 UTC
Reassigned to JSK
Comment 2 joerg.skottke 2008-06-17 11:39:08 UTC
API, to CN
Comment 3 chne 2008-06-17 15:02:53 UTC
cn->tl: as discussed please take over
Comment 4 Oliver Specht 2008-06-18 09:17:58 UTC
In theory the anchor of the table should mark the start /end node pair of the
table in Writer's text model implementation. 
In practice it is not possible for cursors in Writer to select non-text nodes. 
This is definitely a bug but as long as the core implementation doesn't change
the API implementation will cannot be improved. Dependency to issue 7747 set.