]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fixed a class cast error with retrieve-marker
authorJoerg Pietschmann <pietsch@apache.org>
Thu, 18 Jul 2002 22:47:41 +0000 (22:47 +0000)
committerJoerg Pietschmann <pietsch@apache.org>
Thu, 18 Jul 2002 22:47:41 +0000 (22:47 +0000)
Submitted by: Trond Aasan trondaas@ub.ntnu.no

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@195008 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/apps/StreamRenderer.java

index 3c3f7c4f7d43e18f47df4d444bc85d19ed68f277..6870aeb7c52c37e39a246dee3abb0409ee0e7f8e 100644 (file)
@@ -327,7 +327,8 @@ public class StreamRenderer {
         else
             pageIndex = renderQueue.indexOf(current);
         if ((pageIndex + 1) < renderQueue.size()) {
-            nextPage = (Page)renderQueue.elementAt(pageIndex + 1);
+            nextPage = ((RenderQueueEntry)renderQueue
+                        .elementAt(pageIndex + 1)).getPage();
             if (isWithinPageSequence
                     &&!nextPage.getPageSequence().equals(current.getPageSequence())) {
                 nextPage = null;
@@ -344,15 +345,12 @@ public class StreamRenderer {
             pageIndex = renderQueue.size();
         else
             pageIndex = renderQueue.indexOf(current);
-        // System.out.println("Page index = " + pageIndex);
         if ((pageIndex - 1) >= 0) {
-            previousPage = (Page)renderQueue.elementAt(pageIndex - 1);
+            previousPage = ((RenderQueueEntry)renderQueue
+                            .elementAt(pageIndex - 1)).getPage();
             PageSequence currentPS = current.getPageSequence();
-            // System.out.println("Current PS = '" + currentPS + "'");
             PageSequence previousPS = previousPage.getPageSequence();
-            // System.out.println("Previous PS = '" + previousPS + "'");
             if (isWithinPageSequence &&!previousPS.equals(currentPS)) {
-                // System.out.println("Outside page sequence");
                 previousPage = null;
             }
         }