From 6c2f7aa7ac90d6f1026d34a8adb740144151d7bf Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 26 Jan 2005 17:51:55 +0000 Subject: [PATCH] Switching off reuse of static LMs, which fixes page numbers and markers on pages >1. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198327 13f79535-47bb-0310-9956-ffa450edef68 --- .../layoutmgr/PageSequenceLayoutManager.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java index 4ea4d9770..e550962e4 100644 --- a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java @@ -53,10 +53,8 @@ import org.apache.fop.fo.pagination.StaticContent; import org.apache.fop.fo.pagination.Title; import org.apache.fop.fo.properties.CommonMarginBlock; -import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.HashMap; import java.awt.Rectangle; import java.util.Iterator; import java.awt.geom.Rectangle2D; @@ -122,7 +120,7 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { * The collection of StaticContentLayoutManager objects that are associated * with this Page Sequence, keyed by flow-name. */ - private HashMap staticContentLMs = new HashMap(4); + //private HashMap staticContentLMs = new HashMap(4); /** * This is the top level layout manager. @@ -320,7 +318,7 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { * @param bbp the block break position */ public void addAreas(BlockBreakPosition bbp) { - List list = new ArrayList(); + List list = new java.util.ArrayList(); list.add(bbp.breakps); bbp.getLM().addAreas(new BreakPossPosIter(list, 0, 1), null); @@ -534,7 +532,7 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { while (!lm.isFinished()) { BreakPoss bp = lm.getNextBreakPoss(childLC); if (bp != null) { - List vecBreakPoss = new ArrayList(); + List vecBreakPoss = new java.util.ArrayList(); vecBreakPoss.add(bp); lm.addAreas(new BreakPossPosIter(vecBreakPoss, 0, vecBreakPoss.size()), null); @@ -944,13 +942,13 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { */ private StaticContentLayoutManager getStaticContentLayoutManager(StaticContent sc) throws FOPException { - StaticContentLayoutManager lm = - (StaticContentLayoutManager) staticContentLMs.get(sc.getFlowName()); - if (lm == null) { + StaticContentLayoutManager lm; + //lm = (StaticContentLayoutManager) staticContentLMs.get(sc.getFlowName()); + //if (lm == null) { lm = (StaticContentLayoutManager) getAreaTreeHandler().getLayoutManagerMaker().makeLayoutManager(sc); - staticContentLMs.put(sc.getFlowName(), lm); - } + //staticContentLMs.put(sc.getFlowName(), lm); + //} return lm; } } -- 2.39.5