Issue 77227 - Nested table anchor returns the same table rather than parent
Summary: Nested table anchor returns the same table rather than parent
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-11 06:14 UTC by iannz
Modified: 2013-02-24 21:06 UTC (History)
4 users (show)

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


Attachments
Writer file with nested tables and macro to demonstrate problems with anchor.text for nested tables. (10.69 KB, application/vnd.oasis.opendocument.text)
2007-05-11 06:16 UTC, iannz
no flags Details

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