aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java28
1 files changed, 27 insertions, 1 deletions
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;
+ }
+
}