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 Luca Furini <lf...@cs.unibo.it> on 2008/06/16 17:28:01 UTC

Re: svn commit: r668177 - in /xmlgraphics/fop/trunk: ./ src/java/org/apache/fop/layoutmgr/ test/layoutengine/standard-testcases/

On Mon, Jun 16, 2008 at 4:52 PM,  <lf...@apache.org> wrote:

> Fixing the PageBreakingAlgorithm, replacing calls to getLineWidth() with getLineWidth(int)
> so  as to take into account each page's real height.
> This fixes the positioning of footnotes when the page bpd is not the same for all pages.

This was a little nasty bug I stumbled upon a few days ago, and it
took me some time to track back where the problem was ...

The PageBreakingAlgorithm, in particular the computeDifference()
method, had some calls to getLineWidth() without parameters and some
other with an int parameter indicating the page.
When the page bpd changes from page to page, the two methods returned
different values, with the effect that the algorithm first believed it
could place a whole footnote in the page, and then found out that this
led to an overflow.

In order to avoid similar problems, the parameter-less getLineWidth()
method could maybe be deprecated?

Regards
    Luca

Re: svn commit: r668177 - in /xmlgraphics/fop/trunk: ./ src/java/org/apache/fop/layoutmgr/ test/layoutengine/standard-testcases/

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Why deprecate? It's not part of our external API. We can simply remove
the method if it's dangerous.

On 16.06.2008 17:28:01 Luca Furini wrote:
> On Mon, Jun 16, 2008 at 4:52 PM,  <lf...@apache.org> wrote:
> 
> > Fixing the PageBreakingAlgorithm, replacing calls to getLineWidth() with getLineWidth(int)
> > so  as to take into account each page's real height.
> > This fixes the positioning of footnotes when the page bpd is not the same for all pages.
> 
> This was a little nasty bug I stumbled upon a few days ago, and it
> took me some time to track back where the problem was ...
> 
> The PageBreakingAlgorithm, in particular the computeDifference()
> method, had some calls to getLineWidth() without parameters and some
> other with an int parameter indicating the page.
> When the page bpd changes from page to page, the two methods returned
> different values, with the effect that the algorithm first believed it
> could place a whole footnote in the page, and then found out that this
> led to an overflow.
> 
> In order to avoid similar problems, the parameter-less getLineWidth()
> method could maybe be deprecated?
> 
> Regards
>     Luca




Jeremias Maerki