You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Glen Mazza <gr...@yahoo.com> on 2005/04/26 21:20:27 UTC

Re: cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AbstractBreaker.java PageSequenceLayoutManager.java

--- lfurini@apache.org wrote:
>        
>   -    protected void startPart(BlockSequence list)
> {
>   +    protected void startPart(BlockSequence list,
> int localPageNumber) {

"boolean isFirstPageByBlock" is probably better.

The meaning of "localPageNumber" to indicate the first
page created by a particular block I think will cause
confusion, especially when read within PSLM.  Also,
since the logic only cares about whether or not the
page is the *first* page being rendered by the block,
a boolean would appear to better capture the usage of
this variable.


>            //nop
>        }
>        
>   @@ -202,7 +202,7 @@
>                System.out.println("PLM> part: " + (p
> + 1)
>                        + ", break at position " +
> endElementIndex);
>    
>   -            startPart(effectiveList);
>   +            startPart(effectiveList, p+1);
>                

startPart(effectiveList, (p==0)? true:false);

Glen


RE: cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AbstractBreaker.java PageSequenceLayoutManager.java

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Glen Mazza [mailto:grm7793@yahoo.com]
>
> --- lfurini@apache.org wrote:
> >
> >   -    protected void startPart(BlockSequence list)
> > {
> >   +    protected void startPart(BlockSequence list,
> > int localPageNumber) {
>
> "boolean isFirstPageByBlock" is probably better.
>
> The meaning of "localPageNumber" to indicate the first
> page created by a particular block I think will cause
> confusion, especially when read within PSLM.  Also,
> since the logic only cares about whether or not the
> page is the *first* page being rendered by the block,
> a boolean would appear to better capture the usage of
> this variable.

I agree with this reasoning, and can't seem to come up with situations where
the actual page-count for a given BlockSequence *would* be needed... (could
be that I'm overlooking something)

Along these same lines, the modifications to the code in PSLM would yield
the more compact:

...
} else {
    // (comment on the following line of code)
    handleBreak(isFirstByBlock ? list.getStartOn() : Constants.EN_PAGE);
}
...


Cheers,

Andreas