From d61456f236d52c5d828b12d0ff684688d297b41b Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Tue, 24 Nov 2009 14:48:52 +0000 Subject: Bugfix in Changing IPD: reset only the children LMs that have been created so far. Layout managers following a forced break have not even been created yet. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@883709 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/java/org/apache/fop') diff --git a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java index 82f0599eb..e6a5bea5e 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java @@ -20,6 +20,7 @@ package org.apache.fop.layoutmgr; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.Map; @@ -463,11 +464,8 @@ public abstract class AbstractLayoutManager extends AbstractBaseLayoutManager isFinished = false; curChildLM = null; childLMiter = new LMiter(this); - /* - * Reset the children LM. Can't rely on childLMiter since it may have - * been set to null in checkEndOfLayout. - */ - for (LMiter iter = new LMiter(this); iter.hasNext();) { + /* Reset all the children LM that have been created so far. */ + for (Iterator iter = getChildLMs().iterator(); iter.hasNext();) { ((LayoutManager) iter.next()).reset(); } if (fobj != null) { -- cgit v1.2.3