aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Furini <lfurini@apache.org>2004-12-06 14:36:10 +0000
committerLuca Furini <lfurini@apache.org>2004-12-06 14:36:10 +0000
commitd62d480431bcde489ea0bfb3f48d72a4d5d47c07 (patch)
treecd4a2d40eeff4fa49a8393b8b0cd9f7b249c956d
parent38f143d717ee6acb0f0913c0be89253f40ee8fde (diff)
downloadxmlgraphics-fop-d62d480431bcde489ea0bfb3f48d72a4d5d47c07.tar.gz
xmlgraphics-fop-d62d480431bcde489ea0bfb3f48d72a4d5d47c07.zip
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
-rw-r--r--src/java/org/apache/fop/layoutmgr/LineLayoutManager.java11
1 files changed, 4 insertions, 7 deletions
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();