diff options
author | Manuel Mall <manuel@apache.org> | 2005-10-10 10:22:05 +0000 |
---|---|---|
committer | Manuel Mall <manuel@apache.org> | 2005-10-10 10:22:05 +0000 |
commit | 179d10f032a58cd67f188ec63698273a18173176 (patch) | |
tree | f3d4ad1fa9c1d7a4b2e143025b07386383485f07 /src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java | |
parent | 19ac0323da85dc9b1c8e4be8e8cf2f7a89d45563 (diff) | |
download | xmlgraphics-fop-179d10f032a58cd67f188ec63698273a18173176.tar.gz xmlgraphics-fop-179d10f032a58cd67f188ec63698273a18173176.zip |
Added support for leader with pattern "use-content" and recovered a previously lost 1mpt due to rounding
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@312604 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index 532b6f875..652b585c4 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -449,8 +449,10 @@ public class LineLayoutManager extends InlineStackingLayoutManager int availableShrink, int availableStretch, int difference, double ratio, int indent) { - // line height calculation - int halfLeading = (lineHeight - lead - follow) / 2; + // line height calculation - spaceBefore may differ from spaceAfter + // by 1mpt due to rounding + int spaceBefore = (lineHeight - lead - follow) / 2; + int spaceAfter = lineHeight - lead - follow - spaceBefore; // height before the main baseline int lineLead = lead; // maximum follow @@ -517,7 +519,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager lastElementIndex, availableShrink, availableStretch, difference, ratio, 0, indent, lineLead + lineFollow, - iLineWidth, halfLeading, halfLeading, + iLineWidth, spaceBefore, spaceAfter, lineLead); } } |