Sorry for the long weekend of absence, but April 25th is a public holiday
in Italy! :-)

Andreas L. Delmelle wrote:

> Further browsing leads me to place my money on
> AbstractBreaker.BlockSequence.
> If I get it correctly, the 'startOn' value is set only once for the entire
> list (at construction time), but that value is returned every time the
> PSLM.PageBreaker calls BlockSequence.getStartOn() --which happens in
> PSLM.PageBreaker.startPart() line 205.
> So, if this method is called every time a new page is created, and *one*
> BlockSequence spans multiple pages, we would get the wrong breakValue for
> all pages but the first... Still looking for the optimal way to correct this
> behaviour.
> Would we need a 'check' on whether the previous page already contains areas
> generated by elements of a given BlockSequence (or: whether the first area
> on curPage is also the first area generated by an element of the
> BlockSequence)?

I have added an int parameter to startPart(), used to pass the "local"
page number (i.e. counting only the pages created by the current
BlockSequence); if it is "1" we are creating the first PageViewport and we
must use the startOn break value, otherwise we only need to add a new PV.

This fixes the problem, except for break conditions in the first block of
the page sequence: this case is different, because the first PV is created
before the page breaking (in PSLM.activateLayout()) in order to get the
flow BPD.

So, in order to fix this too, I think we could either:
 a) find another way to get the flow BPD, without creating a PV
 b) modify handleBreak(), so that it can recognize this special case and
create one fewer PV (none if the page is ok, only one if an empty one is

I think a) would be better, but it could be more difficult.

On the other hand, b) is much more easy to implement: for example, we
could move handleBreak() inside PageBreaker, so that it have access to the
boolean firstPart, or add a boolean parameter to handleBreak().

As per the question about the LM responsible for the page breaking (FLM or
PSLM), I am still carefully reading your (Andrea's and Glen's) last
letters. Anyway, it seems to me (please correct me if I am wrong) that
there is no hurry to come to a conclusion.


Reply via email to