You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2004/10/10 13:21:29 UTC

cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr LineLayoutManager.java

jeremias    2004/10/10 04:21:29

  Modified:    src/java/org/apache/fop/layoutmgr LineLayoutManager.java
  Log:
  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.
  
  Revision  Changes    Path
  1.28      +2 -1      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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- LineLayoutManager.java	22 Sep 2004 08:24:32 -0000	1.27
  +++ LineLayoutManager.java	10 Oct 2004 11:21:28 -0000	1.28
  @@ -1407,6 +1407,7 @@
       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 @@
               iStartElement = lbp.getLeafPos() + 1;
               if (iStartElement == currPar.size()) {
                   // advance to next paragraph
  -                iCurrParIndex ++;
  +                iCurrParIndex++;
                   iStartElement = 0;
               }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org