diff options
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java index b043268bd..21e3cb283 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java @@ -158,7 +158,7 @@ public class InlineContainerLayoutManager extends AbstractLayoutManager implemen ic.getAlignmentAdjust(), ic.getAlignmentBaseline(), ic.getBaselineShift(), ic.getDominantBaseline(), context.getAlignmentContext()); - int baselineOffset = getAlignmentPoint(); + int baselineOffset = getAlignmentPoint(ac.getDominantBaselineIdentifier()); ac.resizeLine(contentAreaBPD, baselineOffset); return ac; } @@ -188,12 +188,13 @@ public class InlineContainerLayoutManager extends AbstractLayoutManager implemen return getInlineContainer().getOverflow() != EN_ERROR_IF_OVERFLOW; } - private int getAlignmentPoint() { + private int getAlignmentPoint(int dominantBaseline) { Length alignmentAdjust = getInlineContainer().getAlignmentAdjust(); int baseline = alignmentAdjust.getEnum(); - if (baseline == Constants.EN_AUTO - || baseline == Constants.EN_BASELINE) { + if (baseline == Constants.EN_AUTO) { return getInlineContainerBaselineOffset(getInlineContainer().getAlignmentBaseline()); + } else if (baseline == Constants.EN_BASELINE) { + return getInlineContainerBaselineOffset(dominantBaseline); } else if (baseline != 0) { return getInlineContainerBaselineOffset(baseline); } else { |