From eb871548517fff22244c64892f25b36ba55a0e50 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Sun, 8 Jan 2006 11:47:38 +0000 Subject: [PATCH] Also let the last page sequence notify its listeners. Add a check for the page count to the test case. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@367020 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/AreaTreeHandler.java | 7 +++++-- .../page-sequence_force-page-count_1.xml | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/area/AreaTreeHandler.java b/src/java/org/apache/fop/area/AreaTreeHandler.java index 9fdc17870..422ebecf6 100644 --- a/src/java/org/apache/fop/area/AreaTreeHandler.java +++ b/src/java/org/apache/fop/area/AreaTreeHandler.java @@ -273,8 +273,6 @@ public class AreaTreeHandler extends FOEventHandler { prevPageSeqLM.doForcePageCount(pageSequence.getInitialPageNumber()); prevPageSeqLM.finishPageSequence(); prevPageSeqLM = null; - // recalc pagenumber for the case that a new page is - // inserted by checkForcePageCount } pageSequence.initPageNumber(); //extension attachments from fo:root @@ -341,6 +339,11 @@ public class AreaTreeHandler extends FOEventHandler { */ public void endDocument() throws SAXException { + // finish the last pageSequence + if (prevPageSeqLM != null) { + prevPageSeqLM.finishPageSequence(); + prevPageSeqLM = null; + } // process fo:bookmark-tree BookmarkTree bookmarkTree = rootFObj.getBookmarkTree(); if (bookmarkTree != null) { diff --git a/test/layoutengine/standard-testcases/page-sequence_force-page-count_1.xml b/test/layoutengine/standard-testcases/page-sequence_force-page-count_1.xml index 526d6d366..dea51ad4b 100644 --- a/test/layoutengine/standard-testcases/page-sequence_force-page-count_1.xml +++ b/test/layoutengine/standard-testcases/page-sequence_force-page-count_1.xml @@ -393,5 +393,7 @@ + + -- 2.39.5