From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Mon May 12 2003 - 07:14:25 EDT
Hi Martin,
> So I imagine you could run through the document recording doc position
> and appending PTX_SectionFootnote/PTX_EndFootnote struxes where the
> footnotes/endnotes need to be inserted in abiword.
<snip></snip>
> A faster way would be to record a vector of doc positions of the empty
> footnote/endfootnote struxes then update the it with new offsets as
> each empty pair is filled. This is rather simple to calculate since
> you can use the difference between the footnote strux and endfootnote
> strux positions.
>
> ie offset = endfootnote_strux->getPos() - footnote_strux->getPos() -1
>
Except, if I am not mistaken, the position of fragments is not set
until the loading process is finished; this might not be too
difficult to change.
My major concern is the values of doc positions originally gathered
getting out of sync -- it means that any time anything is inserted
into the document before we come to deal with the footnotes, etc.,
the values of all subsequent footnotes need to be adjusted. The same
goes for endnotes, and once we add annotations the same will apply. I
think searching for the footnote struxes will be slower but from the
point of view of maintenance much more robust.
Tomas
This archive was generated by hypermail 2.1.4 : Mon May 12 2003 - 20:09:40 EDT