From: Luca Furini Date: Mon, 6 Dec 2004 14:36:10 +0000 (+0000) Subject: Removing inactiveList, which is useless. X-Git-Tag: Root_Temp_KnuthStylePageBreaking~316 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d62d480431bcde489ea0bfb3f48d72a4d5d47c07;p=xmlgraphics-fop.git Removing inactiveList, which is useless. Thanks to Finn Bock for pointing this out. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198191 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java index e7aab011c..aa3df1afe 100644 --- a/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java @@ -135,7 +135,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager { private ArrayList knuthParagraphs = null; private LinkedList activeList = null; - private LinkedList inactiveList = null; private ArrayList breakpoints = null; private int iReturnedLBP = 0; private int iStartElement = 0; @@ -559,7 +558,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager { // create an active node representing the starting point activeList = new LinkedList(); activeList.add(new KnuthNode(0, 0, 1, 0, 0, 0, 0, 0, 0, null)); - inactiveList = new LinkedList(); // main loop ListIterator paragraphIterator = par.listIterator(); @@ -600,9 +598,8 @@ public class LineLayoutManager extends InlineStackingLayoutManager { bForced = true; log.error("Could not find a set of breaking points"); } else { - inactiveList.clear(); return 0; - } + } } // there is at least one set of breaking points @@ -672,7 +669,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager { fallback(par, line); } activeList.clear(); - inactiveList.clear(); return line; } @@ -794,7 +790,9 @@ public class LineLayoutManager extends InlineStackingLayoutManager { && ((KnuthPenalty) element).getP() == -KnuthElement.INFINITE) && !(activeNode.position == par.indexOf(element))) { - // deactivate activeNode + // deactivate activeNode: + // just remove it from the activeList; as long as there is + // an active node pointing to it, it will not be deleted KnuthNode tempNode = (KnuthNode) activeListIterator.previous(); int iCallNext = 0; @@ -804,7 +802,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager { iCallNext ++; } lastDeactivatedNode = tempNode; - inactiveList.add(tempNode); activeListIterator.remove(); for (int i = 0; i < iCallNext; i++) { activeListIterator.next();