Just to let you guys know what I'm currently working on:
Currently, the page breaking takes the region-body BPD of the first page
in a sequence as the BPD for all pages. Obviously, this value can change
from page to page depending on the page-master in use. I've already
solved this particular problem insofar that I've implemented
PageBreakingAlgorithm.getLineWidth() to return an individual BPD for
each page. The line width in the page breaking context is the available
BPD. That comes from using the same base class for both line and page

Furthermore, a "PageViewportProvider" is precreating PageViewports for
the page breaking process as this runs before the PSLM.makeNewPage()
calls. makeNewPage() also accesses PVs through the PVProvider, but then
gets the cached ones. That works fine as long as there are no breaks with
an even or odd setting which results in blank pages. But when this
happens I run into problems because the page breaking process may
request more PVs than are really used in the end, so when the break is
handled a call to makeNewPage requests a blank page at the position
where the Provider already preallocated a non-blank page for the run
over the previous element-list. But since the PageSequenceMaster is a
stateful beast that can currently only iterate in one direction I'm in
trouble. Next week I'll research a good way to reset or run backwards
the PageSequenceMaster so the already created PV in the Provider can
ultimately be replaced with a PV for a blank page.

Similar things will be necessary when we get to page-position="last"
handling but I won't break my head over that just now.

My current code currently fixes half of the normal-breaking4 test case
but I won't commit it since it breaks other test cases such as breaks*.
Half the test case means that I'm only looking at changing BPD right now,
not at changing IPD which is more complicated as the line-breaking has
to be redone.

Jeremias Maerki

Reply via email to