]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Also let the last page sequence notify its listeners. Add a check for
authorSimon Pepping <spepping@apache.org>
Sun, 8 Jan 2006 11:47:38 +0000 (11:47 +0000)
committerSimon Pepping <spepping@apache.org>
Sun, 8 Jan 2006 11:47:38 +0000 (11:47 +0000)
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
test/layoutengine/standard-testcases/page-sequence_force-page-count_1.xml

index 9fdc17870218780bd5e0c87d324048b807677d0c..422ebecf60f53e7e44b598b1664e1dfa4bdd0cb2 100644 (file)
@@ -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) {
index 526d6d366510e0fc62f19e948c2098ca2974b20e..dea51ad4b930cd5efaa33b0fa7cd806eb64a5d4f 100644 (file)
     <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>