From d1ac3aa05b692e9d9ead48b93e8e9e9ad4297416 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Thu, 7 Nov 2013 12:33:11 +0000 Subject: [PATCH] Added support for values on alignment-adjust git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_InlineContainer@1539615 13f79535-47bb-0310-9956-ffa450edef68 --- .../inline/InlineContainerLayoutManager.java | 3 ++- .../inline-container_alignment-adjust.xml | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java index 539ebc897..5127794c0 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java @@ -201,8 +201,9 @@ public class InlineContainerLayoutManager extends AbstractLayoutManager implemen return getInlineContainerBaselineOffset(baseline); } else { int baselineOffset = getInlineContainerBaselineOffset(dominantBaseline); + int lineHeight = getInlineContainer().getLineHeight().getOptimum(this).getLength().getValue(this); int adjust = alignmentAdjust.getValue( - new SimplePercentBaseContext(null, LengthBase.ALIGNMENT_ADJUST, 0)); + new SimplePercentBaseContext(null, LengthBase.ALIGNMENT_ADJUST, lineHeight)); return baselineOffset + adjust; } } diff --git a/test/layoutengine/standard-testcases/inline-container_alignment-adjust.xml b/test/layoutengine/standard-testcases/inline-container_alignment-adjust.xml index b63e36b69..3e696a696 100644 --- a/test/layoutengine/standard-testcases/inline-container_alignment-adjust.xml +++ b/test/layoutengine/standard-testcases/inline-container_alignment-adjust.xml @@ -141,6 +141,16 @@ + + + alignment-adjust="10%": + The line before. The line before. Before: + Inside the inline-container. + After the inline-container. + + + @@ -221,7 +231,14 @@ - + + + + + + + + -- 2.39.5