aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2013-11-07 12:31:31 +0000
committerVincent Hennebert <vhennebert@apache.org>2013-11-07 12:31:31 +0000
commitd08e7a0a304e7f3e3e0d5181bfc00959aa493eee (patch)
tree20459a536c5becb3626cc46983248d88aa321e4d /src/java
parente1ee53b4c48a7f7781fe88a0336e77dad0df37cd (diff)
downloadxmlgraphics-fop-d08e7a0a304e7f3e3e0d5181bfc00959aa493eee.tar.gz
xmlgraphics-fop-d08e7a0a304e7f3e3e0d5181bfc00959aa493eee.zip
Added support for dominant-baseline on fo:inline-container
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_InlineContainer@1539613 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java2
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/InlineContainerLayoutManager.java9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java b/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java
index c1992965c..192956abc 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/AlignmentContext.java
@@ -295,7 +295,7 @@ public class AlignmentContext implements Constants {
* Return the dominant baseline identifier.
* @return the dominant baseline identifier
*/
- private int getDominantBaselineIdentifier() {
+ public int getDominantBaselineIdentifier() {
return actualBaselineTable.getDominantBaselineIdentifier();
}
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 {