lfurini     2004/12/06 06:36:10

  Modified:    src/java/org/apache/fop/layoutmgr LineLayoutManager.java
  Log:
  Removing inactiveList, which is useless.
  Thanks to Finn Bock for pointing this out.
  
  Revision  Changes    Path
  1.36      +4 -7      
xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java
  
  Index: LineLayoutManager.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- LineLayoutManager.java    24 Nov 2004 21:07:30 -0000      1.35
  +++ LineLayoutManager.java    6 Dec 2004 14:36:10 -0000       1.36
  @@ -135,7 +135,6 @@
   
       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 @@
           // 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 @@
                   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 @@
               fallback(par, line);
           }
           activeList.clear();
  -        inactiveList.clear();
           return line;
       }
   
  @@ -794,7 +790,9 @@
                           && ((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 @@
                           iCallNext ++;
                       }
                       lastDeactivatedNode = tempNode;
  -                    inactiveList.add(tempNode);
                       activeListIterator.remove();
                       for (int i = 0; i < iCallNext; i++) {
                           activeListIterator.next();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to