https://issues.apache.org/bugzilla/show_bug.cgi?id=37579





--- Comment #45 from Vincent Hennebert <[EMAIL PROTECTED]>  2008-05-19 02:52:15 
PST ---
(In reply to comment #43)
> Created an attachment (id=21977)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21977) [details]
> updated patch against FOP trunk
> 
> 
> Updated patch, without support for footnotes in table-header or -footer, which
> removes ElementListUtils from the picture.
> 
> For list-items, I also took the liberty of making one more modification. Not
> sure if this agrees with everyone, but if the idea is to improve element 
> access
> performance in getNextStep(), and we're not modifying the lists anyway, we
> might as well switch to plain arrays instead of copying the LinkedLists to
> ArrayLists.
> 

(In reply to comment #40)
> (In reply to comment #38)
> > 
> > > An intermediate solution could probably be implemented the following way:
> > > - in ActiveCell.Step, add a List field that would contain the 
> > > FootnoteBodyLMs
> > > encountered during the last call to gotoNextLegalBreak;
> > > - in TableStepper.getCombinedKnuthElements, when iterating over the active
> > > cells to create the CellPart instances, get those FootnoteBodyLMs in the 
> > > same
> > > time. A small detail to pay attention to is to not re-get them if the 
> > > active
> > > cell doesn't contribute new content to the step. If there are some 
> > > footnotes,
> > > create a KnuthBlockBox, otherwise create a normal Box.
> > > And that should be it basically...
> > > I'll see if I can submit a patch to illustrate my ideas in the next days.
> > 
> > Cool, we await your input.
> 
> Well, I did not really wait... ;-) 
> I've already tried this approach, and I got this working, apart from 'not
> re-get them if they do not contribute content'. If you could tell me what
> condition I need to check for, that would save me the time to go looking.
> 
> Right now, I have:
> -> added a footnoteList member to ActiveCell, with accompanying accessor
> -> modified gotoNextLegalBreak(): if the element is a KnuthBlockBox and has
> anchors, then add the footnotes to the added member-list
> -> modified TableStepper (loop +/- line 207) to use the accessor; if the
> ActiveCell has footnotes, a KnuthBlockBox is generated further on, else a
> normal Box.

This is already much better, but this can still be improved IMO. TableStepper
is still taking too much responsibility: instead of asking ActiveCells if they
have any footnotes, and then asking them for their footnotes, it can just
provide them with a list to which they can add their own footnotes, if they
have any, and if they contribute content to the next step. Kind of inversion of
control principle.


> Thanks for the helpful feedback so far! It's giving me better insight into
> table-layout as well, which could come in handy at some point. ;-)
> 

Vincent


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to