From 31de24ef2066a087e414d40bb282bffe9e50c329 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Sun, 31 Jul 2005 10:20:12 +0000 Subject: [PATCH] Use a more direct notify mechanism for the formatting results git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@226627 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/area/AreaTreeHandler.java | 18 ++++++++++-------- .../layoutmgr/PageSequenceLayoutManager.java | 2 ++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/fop/area/AreaTreeHandler.java b/src/java/org/apache/fop/area/AreaTreeHandler.java index 5619dcbb6..47b5c1634 100644 --- a/src/java/org/apache/fop/area/AreaTreeHandler.java +++ b/src/java/org/apache/fop/area/AreaTreeHandler.java @@ -272,14 +272,16 @@ public class AreaTreeHandler extends FOEventHandler { pageSLM = getLayoutManagerMaker().makePageSequenceLayoutManager( this, pageSequence); pageSLM.activateLayout(); - this.results.haveFormattedPageSequence(pageSequence, - getAreaTreeModel().getPageCount(getAreaTreeModel().getPageSequenceCount())); - if (log.isDebugEnabled()) { - log.debug("Last page-sequence produced " - + getAreaTreeModel().getPageCount( - getAreaTreeModel().getPageSequenceCount()) - + " pages."); - } + } + } + + public void notifyPageSequenceFinished(PageSequence pageSequence, + int pageCount) { + this.results.haveFormattedPageSequence(pageSequence, + pageCount); + if (log.isDebugEnabled()) { + log.debug("Last page-sequence produced " + + pageCount + " pages."); } } diff --git a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java index e5e730660..c052bf94e 100644 --- a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java @@ -149,6 +149,8 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager { finishPage(); pageSeq.getRoot().notifyPageSequenceFinished(currentPageNum, (currentPageNum - startPageNum) + 1); + areaTreeHandler.notifyPageSequenceFinished(pageSeq, + (currentPageNum - startPageNum) + 1); log.debug("Ending layout"); } -- 2.39.5