diff options
author | Simon Pepping <spepping@apache.org> | 2006-01-08 11:47:38 +0000 |
---|---|---|
committer | Simon Pepping <spepping@apache.org> | 2006-01-08 11:47:38 +0000 |
commit | eb871548517fff22244c64892f25b36ba55a0e50 (patch) | |
tree | 3a26ba45d11a91792a4386855eb022ed74fe550b | |
parent | 4e0c1bd3e142d5f772ebc516e6f7229fc4900b26 (diff) | |
download | xmlgraphics-fop-eb871548517fff22244c64892f25b36ba55a0e50.tar.gz xmlgraphics-fop-eb871548517fff22244c64892f25b36ba55a0e50.zip |
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
-rw-r--r-- | src/java/org/apache/fop/area/AreaTreeHandler.java | 7 | ||||
-rw-r--r-- | test/layoutengine/standard-testcases/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 @@ <eval expected="41" xpath="//pageSequence[13]/pageViewport[2]"/> <eval expected="43" xpath="//pageSequence[14]/pageViewport[2]"/> <eval expected="49" xpath="//pageSequence[17]/pageViewport[3]"/> + <!-- formatting results --> + <result expected="32" property="pagecount"/> </checks> </testcase> |