diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-03-04 17:30:40 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-03-04 17:30:40 +0000 |
commit | ac24860f95758975e6e7cf51aeb203a9ed02cb30 (patch) | |
tree | f9f2df9aefb27947826f6645563af9b4ddaa7540 /src/java/org | |
parent | 2000a8302a33bfd45beeab08f3e9e2ed77397d35 (diff) | |
download | xmlgraphics-fop-ac24860f95758975e6e7cf51aeb203a9ed02cb30.tar.gz xmlgraphics-fop-ac24860f95758975e6e7cf51aeb203a9ed02cb30.zip |
Bugfix: If there's shrink available in an auto-height situation, the difference is now set to 0 in order to avoid unwanted effects. IOW, never shrink in an auto-height situation.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@633557 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java b/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java index 57fc4600e..d98d29b5c 100644 --- a/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java +++ b/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java @@ -364,7 +364,13 @@ class PageBreakingAlgorithm extends BreakingAlgorithm { } else { // there are no footnotes } - return getLineWidth(activeNode.line) - actualWidth; + int diff = getLineWidth(activeNode.line) - actualWidth; + if (autoHeight && diff < 0) { + //getLineWidth() for auto-height parts return 0 so the diff will be negative + return 0; //...but we don't want to shrink in this case. Stick to optimum. + } else { + return diff; + } } /** Checks whether footnotes from preceding pages may be deferred to the page after |