Node indexing/ordering inconsistency

Kartik Subbarao subbarao at computer.org
Fri Oct 3 16:58:33 PDT 2014


I wanted to raise what might be a broader issue discovered while 
troubleshooting a bug:

https://www.libreoffice.org/bugzilla/show_bug.cgi?id=81012#c6

It appears that there are two different methods that 
SwNode::FindOutlineNodeOfLevel() (and functions that it calls) uses to 
determine the position of of a node:

1) GetIndex() (which seems to generally correlate with parsing order)
2) (pageframe)->Frm().Top() (absolute Y position in the document)

Bug 81012 seems to be related to the fact that GetIndex() doesn't return 
as expected for endnotes, and, that these two methods return divergent 
results.

This got me to thinking whether there might be other parts of the code 
that are relying on this kind of indexing/ordering, so I figured I would 
mention it here.

Regards,

	-Kartik


More information about the LibreOffice mailing list