Issue 90729 - Anchor of a table is corrupt
Summary: Anchor of a table is corrupt
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: OOo 2.4.0
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on: 7747
  Show dependency tree
Reported: 2008-06-14 12:53 UTC by clutz
Modified: 2013-08-07 14:38 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this issue.
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.