aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2006-02-25 10:28:10 +0000
committerSimon Pepping <spepping@apache.org>2006-02-25 10:28:10 +0000
commit781b5ad8e51dbf7304f182f933eeaf96e816c683 (patch)
treebf41f37111469dd9c1866257f44eaa9ae744dabb /src/java/org/apache
parentdd3f48dc46d8ebfb86c86787f44ddb9d2de40100 (diff)
downloadxmlgraphics-fop-781b5ad8e51dbf7304f182f933eeaf96e816c683.tar.gz
xmlgraphics-fop-781b5ad8e51dbf7304f182f933eeaf96e816c683.zip
InlineLM properly creates an AligmentContext for Title.
Add 2006 to the copyright lines of my previous commit. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@380917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java2
-rw-r--r--src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java2
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java5
-rwxr-xr-xsrc/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java23
4 files changed, 18 insertions, 14 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java b/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java
index c80245c2e..c55e773ec 100644
--- a/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java
+++ b/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java b/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
index 902cdec66..783c6a604 100644
--- a/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
+++ b/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
index f7262cafb..e60794acb 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2005 The Apache Software Foundation.
+ * Copyright 1999-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,8 +20,6 @@ package org.apache.fop.layoutmgr.inline;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.FONode;
-import org.apache.fop.fo.flow.RetrieveMarker;
import org.apache.fop.fo.pagination.Title;
import org.apache.fop.layoutmgr.AbstractBaseLayoutManager;
import org.apache.fop.layoutmgr.KnuthElement;
@@ -259,6 +257,7 @@ public class ContentLayoutManager extends AbstractBaseLayoutManager
LinkedList contentList = new LinkedList();
LinkedList returnedList;
+ childLM.initialize();
while (!childLM.isFinished()) {
// get KnuthElements from childLM
returnedList = childLM.getNextKnuthElements(context, alignment);
diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
index d287b59f8..ba7bdf245 100755
--- a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2005 The Apache Software Foundation.
+ * Copyright 1999-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.flow.Inline;
import org.apache.fop.fo.flow.InlineLevel;
import org.apache.fop.fo.flow.Leader;
+import org.apache.fop.fo.pagination.Title;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.fo.properties.CommonMarginInline;
import org.apache.fop.fo.properties.SpaceProperty;
@@ -38,9 +39,7 @@ import org.apache.fop.layoutmgr.BlockKnuthSequence;
import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
import org.apache.fop.layoutmgr.BreakElement;
import org.apache.fop.layoutmgr.KnuthBox;
-import org.apache.fop.layoutmgr.KnuthElement;
import org.apache.fop.layoutmgr.KnuthSequence;
-import org.apache.fop.layoutmgr.KnuthPenalty;
import org.apache.fop.layoutmgr.LayoutContext;
import org.apache.fop.layoutmgr.NonLeafPosition;
import org.apache.fop.layoutmgr.SpaceSpecifier;
@@ -48,7 +47,6 @@ import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.Position;
import org.apache.fop.layoutmgr.PositionIterator;
-import org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.StackingIter;
import org.apache.fop.traits.MinOptMax;
import org.apache.fop.traits.SpaceVal;
@@ -104,10 +102,10 @@ public class InlineLayoutManager extends InlineStackingLayoutManager {
int padding = 0;
font = fobj.getCommonFont().getFontState(fobj.getFOEventHandler().getFontInfo(), this);
lineHeight = fobj.getLineHeight();
-
+ borderProps = fobj.getCommonBorderPaddingBackground();
+ inlineProps = fobj.getCommonMarginInline();
+
if (fobj instanceof Inline) {
- inlineProps = fobj.getCommonMarginInline();
- borderProps = fobj.getCommonBorderPaddingBackground();
alignmentAdjust = ((Inline)fobj).getAlignmentAdjust();
alignmentBaseline = ((Inline)fobj).getAlignmentBaseline();
baselineShift = ((Inline)fobj).getBaselineShift();
@@ -229,14 +227,21 @@ public class InlineLayoutManager extends InlineStackingLayoutManager {
SpaceSpecifier leadingSpace = context.getLeadingSpace();
- alignmentContext = new AlignmentContext(font
+ if (fobj instanceof Title) {
+ alignmentContext = new AlignmentContext(font,
+ lineHeight.getOptimum(this).getLength().getValue(this),
+ context.getWritingMode());
+
+ } else {
+ alignmentContext = new AlignmentContext(font
, lineHeight.getOptimum(this).getLength().getValue(this)
, alignmentAdjust
, alignmentBaseline
, baselineShift
, dominantBaseline
, context.getAlignmentContext());
-
+ }
+
childLC = new LayoutContext(context);
childLC.setAlignmentContext(alignmentContext);