--- Comment #29 from Andreas L. Delmelle <>  2009-06-24 
01:13:04 PST ---
Created an attachment (id=23865)
 --> (
diff of the changes, so far...

As indicated earlier, the changes in the patch still cause some issues with
around 20 testcases. Just thought I'd post it for review to see if everyone is
OK with some of the refactoring.

Basically, the most important changes in that respect are localized in
BreakingAlgorithm, where I extracted some of the code blocks in the main loop
in findBreakingPoints() into protected methods, offering hooks for subclasses
to inject custom behavior. An implementation may choose to treat penalties
differently than the basic algorithm does; the implementation of
handlePenaltyAt() in PageBreakingAlgorithm can serve as an example.

Change with respect to the previous patch: PageBreakingAlgorithm keeps track of
the current keep-context, and the last too-short node before the context
changed. If the keep-context is not AUTO, then PBA will restart from that
too-short node, instead of using the superclass' implementation of
recoverFromTooLong(). Then we add nodes after that node, until all the columns
in that page are occupied. Since we do not yet implement changing IPD (hence no
change in column-count), I have explicitly chosen to defer only the overflowing
part to the next page, for the sake of simplicity. The silent assumption is
that the next page will have the same number of columns, so deferring the first
part as well is pointless... Best case showing that effect is block-4 in the
sample: we only defer the content of the block that must be kept within
one-page (starting with "[BOB-4a] ...").

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to