From ddea0884f85429bdd7295eed7787778399b6b016 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Tue, 5 Apr 2011 10:04:43 +0000 Subject: [PATCH] Fixed regression introduced in rev. 1088079: also remove the element pointed to by restartPosition.getIndex() git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1088950 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/layoutmgr/inline/LineLayoutManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index 0ac571adc..5e696801d 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -27,6 +27,7 @@ import java.util.ListIterator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.apache.fop.area.Area; import org.apache.fop.area.LineArea; import org.apache.fop.area.Trait; @@ -613,7 +614,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager log.trace("Restarting line breaking from index " + restartPosition.getIndex()); int parIndex = restartPosition.getLeafPos(); KnuthSequence paragraph = knuthParagraphs.get(parIndex); - paragraph.subList(0, restartPosition.getIndex()).clear(); + paragraph.subList(0, restartPosition.getIndex() + 1).clear(); Iterator iter = paragraph.iterator(); while (iter.hasNext() && !iter.next().isBox()) { iter.remove(); -- 2.39.5