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 pi...@apache.org on 2003/03/07 00:06:15 UTC

cvs commit: xml-fop/src/org/apache/fop/fo/pagination PageSequence.java

pietsch     2003/03/06 15:06:15

  Modified:    src/org/apache/fop/fo/pagination Tag: fop-0_20_2-maintain
                        PageSequence.java
  Log:
  Avoid NPE if links are placed in spilled footnote.
  Link areas are still displaced, so they don't appear to work.
  Also, page numbers should now work in spilled footnotes.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.39.2.14 +14 -6     xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java
  
  Index: PageSequence.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java,v
  retrieving revision 1.39.2.13
  retrieving revision 1.39.2.14
  diff -u -r1.39.2.13 -r1.39.2.14
  --- PageSequence.java	25 Feb 2003 12:57:04 -0000	1.39.2.13
  +++ PageSequence.java	6 Mar 2003 23:06:14 -0000	1.39.2.14
  @@ -377,10 +377,6 @@
           }
           Page newPage = this.currentSimplePageMaster.getPageMaster()
             .makePage(areaTree);
  -        if (currentPage != null) {
  -            ArrayList foots = currentPage.getPendingFootnotes();
  -            newPage.setPendingFootnotes(foots);
  -        }
           newPage.setNumber(this.currentPageNumber);
           String formattedPageNumber =
             pageNumberGenerator.makeFormattedPageNumber(this.currentPageNumber);
  @@ -390,9 +386,21 @@
               log.info("[" + currentPageNumber + "]");
               BodyAreaContainer bodyArea = newPage.getBody();
               bodyArea.setIDReferences(areaTree.getIDReferences());
  +            if (currentPage != null) {
  +                ArrayList foots = currentPage.getPendingFootnotes();
  +                newPage.setPendingFootnotes(foots);
  +            }
               flow.layout(bodyArea);
           } else {
  -            log.info("[" + currentPageNumber + " (blank)]");
  +            log.info("[" + currentPageNumber + "] (blank)");
  +            if (currentPage != null) {
  +                ArrayList foots = currentPage.getPendingFootnotes();
  +                if (foots != null) {
  +                    BodyAreaContainer bodyArea = newPage.getBody();
  +                    bodyArea.setIDReferences(areaTree.getIDReferences());
  +                    newPage.setPendingFootnotes(foots);
  +                }
  +            }
           }
           // because of markers, do after fo:flow (likely also
           // justifiable because of spec)
  
  
  

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