return (blockLists.size() == 0);
}
- protected void startPart(BlockSequence list, int localPageNumber) {
+ protected void startPart(BlockSequence list, boolean bIsFirstPage) {
//nop
}
System.out.println("PLM> part: " + (p + 1)
+ ", break at position " + endElementIndex);
- startPart(effectiveList, p+1);
+ startPart(effectiveList, (p == 0));
int displayAlign = getCurrentDisplayAlign();
addAreas(alg, partCount, originalList, effectiveList);
}
- protected void startPart(BlockSequence list, int localPageNumber) {
+ protected void startPart(BlockSequence list, boolean bIsFirstPage) {
if (curPage == null) {
throw new IllegalStateException("curPage must not be null");
} else {
if (!firstPart) {
if (curFlowIdx < curPage.getCurrentSpan().getColumnCount()-1) {
curFlowIdx++;
- } else if (localPageNumber == 1) {
- // this is the first page that will be created by
- // the current BlockSequence: it could have a break
- // condition that must be satisfied
- handleBreak(list.getStartOn());
- } else {
- // this is NOT the first page that will be created by
- // the current BlockSequence: we simply need a new
- // page
- handleBreak(Constants.EN_PAGE);
+ } else {
+ // if this is the first page that will be created by
+ // the current BlockSequence, it could have a break
+ // condition that must be satisfied;
+ // otherwise, we simply need a new page
+ handleBreak(bIsFirstPage ? list.getStartOn() : Constants.EN_PAGE);
}
}
}