]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
WrapperLayoutManagerMaker was used by RetrieveMarker. This caused a ClassCastExceptio...
authorJeremias Maerki <jeremias@apache.org>
Fri, 15 Jul 2005 20:50:33 +0000 (20:50 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 15 Jul 2005 20:50:33 +0000 (20:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@219246 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java

index 74c4d160b71b68a7c888f74bbbee8c6b30f7504a..8395e339a9d7cf3644091169a76dde74d288d54b 100644 (file)
@@ -94,7 +94,7 @@ public class LayoutManagerMapping implements LayoutManagerMaker {
         makers.put(BasicLink.class, new BasicLinkLayoutManagerMaker());
         makers.put(Block.class, new BlockLayoutManagerMaker());
         makers.put(Leader.class, new LeaderLayoutManagerMaker());
-        makers.put(RetrieveMarker.class, new WrapperLayoutManagerMaker());
+        makers.put(RetrieveMarker.class, new RetrieveMarkerLayoutManagerMaker());
         makers.put(Character.class, new CharacterLayoutManagerMaker());
         makers.put(ExternalGraphic.class,
                    new ExternalGraphicLayoutManagerMaker());
@@ -330,6 +330,20 @@ public class LayoutManagerMapping implements LayoutManagerMaker {
         }
     }
      
+    public class RetrieveMarkerLayoutManagerMaker extends Maker {
+        public void make(FONode node, List lms) {
+            Iterator baseIter;
+            baseIter = node.getChildNodes();
+            if (baseIter == null) {
+                return;
+            }
+            while (baseIter.hasNext()) {
+                FONode child = (FONode) baseIter.next();
+                makeLayoutManagers(child, lms);
+            }
+        }       
+    }
+
     public class WrapperLayoutManagerMaker extends Maker {
         public void make(FONode node, List lms) {
             //We insert the wrapper LM before it's children so an ID