From 3b7e2e2294edc3b76f2d8e5cd5d7ef4c364a8192 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Sun, 10 Oct 2004 11:21:28 +0000 Subject: [PATCH] This is supposed to fix a problem that surfaced with Finn's latest change in PageSequence. There was an ArrayIndexOutOfBoundsException here in LineLayoutManager when a static region was layouted for the second page (instance is reused). It seems to me that "iCurrParIndex" could be made a method-local variable instead of an instance variable. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198019 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/layoutmgr/LineLayoutManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java index e65ae13e1..747dd624d 100644 --- a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java @@ -1407,6 +1407,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager { public void addAreas(PositionIterator parentIter, double dSpaceAdjust) { LayoutManager childLM; LayoutContext lc = new LayoutContext(0); + iCurrParIndex = 0; while (parentIter.hasNext()) { ListIterator paragraphIterator = null; KnuthElement tempElement = null; @@ -1459,7 +1460,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager { iStartElement = lbp.getLeafPos() + 1; if (iStartElement == currPar.size()) { // advance to next paragraph - iCurrParIndex ++; + iCurrParIndex++; iStartElement = 0; } -- 2.39.5