Kaynağa Gözat

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.


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@196032 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_20_5rc3
Joerg Pietschmann 21 yıl önce
ebeveyn
işleme
164b7a9086

+ 13
- 5
src/org/apache/fop/fo/pagination/PageSequence.java Dosyayı Görüntüle

@@ -377,10 +377,6 @@ public class PageSequence extends FObj {
}
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 @@ public class PageSequence extends FObj {
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)

Loading…
İptal
Kaydet