Issue 77227

Summary: Nested table anchor returns the same table rather than parent
Product: App Dev Reporter: iannz <hillview>
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: chandlerb, debyld, issues, kpalagin
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Writer file with nested tables and macro to demonstrate problems with anchor.text for nested tables. none

Description iannz 2007-05-11 06:14:56 UTC
The problem is that the anchor.text of a nested table does not return the text
of the table that the nested table is in, it returns its own text. For a table
that is not nested it correctly returns the text that contains the table.

The following basic macro fragment is a cut down version of a macro for
determining the location of the insertion point (main body of the document,
header, footer, frame, etc).

oVC = thisComponent.CurrentController.ViewCursor
oText = oVC.text
while oText.getImplementationName = "SwXCell"
	print oText.createTextCursor.textTable.name
	oText = oText.createTextCursor.textTable.anchor.text
wend
msgbox oText.getImplementationName


The problem exists in OOo2.2 for Linux (SuSe10.2), OOo2.2 for Windows
(Windows2000), and OOo2.1 for X11.

From issue 27268 I gather that the precise location of an anchor is not returned
but it would seem reasonable that at least the correct text area is returned.
How else can one ascertain what type of area the current insertion point is in?

I haven't found a work around for this issue.
Comment 1 iannz 2007-05-11 06:16:43 UTC
Created attachment 45040 [details]
Writer file with nested tables and macro to demonstrate problems with anchor.text for nested tables.
Comment 2 jsc 2007-05-15 15:15:15 UTC
jsc -> tl: can you please check this
Comment 3 kpalagin 2007-06-08 20:47:28 UTC
Confirming with 2.2 on WinXP - as described.
Comment 4 thomas.lange 2007-08-01 11:20:45 UTC
.
Comment 5 Martin Hollmichel 2007-11-09 17:28:43 UTC
set target from 2.x to 3.x according to
http://wiki.services.openoffice.org/wiki/Target_3x