aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/fop/fo/pagination/Title.java31
-rw-r--r--src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java28
2 files changed, 27 insertions, 32 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/Title.java b/src/java/org/apache/fop/fo/pagination/Title.java
index 7ad6dfb09..a944e05ec 100644
--- a/src/java/org/apache/fop/fo/pagination/Title.java
+++ b/src/java/org/apache/fop/fo/pagination/Title.java
@@ -65,10 +65,6 @@ import org.apache.fop.fo.properties.CommonBackground;
import org.apache.fop.fo.properties.CommonBorderAndPadding;
import org.apache.fop.fonts.Font;
import org.apache.fop.fo.properties.CommonMarginInline;
-import org.apache.fop.layoutmgr.ContentLayoutManager;
-import org.apache.fop.layoutmgr.InlineStackingLayoutManager;
-import org.apache.fop.layoutmgr.LMiter;
-import org.apache.fop.apps.*;
/**
* Class modelling the fo:title object. See Sec. 6.4.20 in the XSL-FO Standard.
@@ -82,33 +78,6 @@ public class Title extends FObjMixed {
super(parent);
}
- /**
- * TODO: shouldn't this code be in Layout??
- * @return the Title area
- */
- public org.apache.fop.area.Title getTitleArea() {
- org.apache.fop.area.Title title =
- new org.apache.fop.area.Title();
- // use special layout manager to add the inline areas
- // to the Title.
- InlineStackingLayoutManager lm;
- lm = new InlineStackingLayoutManager();
- lm.setUserAgent(getUserAgent());
- lm.setFObj(this);
- lm.setLMiter(new LMiter(children.listIterator()));
- lm.init();
-
- // get breaks then add areas to title
-
- ContentLayoutManager clm = new ContentLayoutManager(title);
- clm.setUserAgent(getUserAgent());
- lm.setParent(clm);
-
- clm.fillArea(lm);
-
- return title;
- }
-
private void setup() {
// Common Accessibility Properties
diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java b/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java
index ac59651cd..95fd78499 100644
--- a/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java
+++ b/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java
@@ -84,7 +84,7 @@ public class LayoutManagerLS extends LayoutStrategy {
public void format(PageSequence pageSeq, AreaTree areaTree) throws FOPException {
Title title = null;
if (pageSeq.getTitleFO() != null) {
- title = pageSeq.getTitleFO().getTitleArea();
+ title = getTitleArea(pageSeq.getTitleFO());
}
areaTree.startPageSequence(title);
// Make a new PageLayoutManager and a FlowLayoutManager
@@ -175,4 +175,30 @@ public class LayoutManagerLS extends LayoutStrategy {
return data;
}
+ /**
+ * @return the Title area
+ */
+ public org.apache.fop.area.Title getTitleArea(org.apache.fop.fo.pagination.Title foTitle) {
+ org.apache.fop.area.Title title =
+ new org.apache.fop.area.Title();
+ // use special layout manager to add the inline areas
+ // to the Title.
+ InlineStackingLayoutManager lm;
+ lm = new InlineStackingLayoutManager();
+ lm.setUserAgent(foTitle.getUserAgent());
+ lm.setFObj(foTitle);
+ lm.setLMiter(new LMiter(foTitle.children.listIterator()));
+ lm.init();
+
+ // get breaks then add areas to title
+
+ ContentLayoutManager clm = new ContentLayoutManager(title);
+ clm.setUserAgent(foTitle.getUserAgent());
+ lm.setParent(clm);
+
+ clm.fillArea(lm);
+
+ return title;
+ }
+
}