]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix for adding absolutely positioned block without children.
authorJeremias Maerki <jeremias@apache.org>
Mon, 7 Feb 2005 11:00:19 +0000 (11:00 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 7 Feb 2005 11:00:19 +0000 (11:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198386 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/AbstractRenderer.java

index 25db6080bc3f51699c3aaf97fa63635c3aabfe3c..ab017e0079ecaba1f409a4d62860d052e2aaac02 100644 (file)
@@ -513,12 +513,14 @@ public abstract class AbstractRenderer
      */
     protected void renderBlock(Block block) {
         List children = block.getChildAreas();
-        if (children == null) {
-            handleBlockTraits(block);
-            // simply move position
-            currentBPPosition += block.getAllocBPD();
-        } else if (block instanceof BlockViewport) {
-            renderBlockViewport((BlockViewport) block, children);
+        if (block instanceof BlockViewport) {
+            if (children != null) {
+                renderBlockViewport((BlockViewport) block, children);
+            } else {
+                handleBlockTraits(block);
+                // simply move position
+                currentBPPosition += block.getAllocBPD();
+            }
         } else {
             // save position and offset
             int saveIP = currentIPPosition;
@@ -530,7 +532,9 @@ public abstract class AbstractRenderer
 
                 handleBlockTraits(block);
 
-                renderBlocks(block, children);
+                if (children != null) {
+                    renderBlocks(block, children);
+                }
 
                 // absolute blocks do not effect the layout
                 currentBPPosition = saveBP;
@@ -541,7 +545,9 @@ public abstract class AbstractRenderer
 
                 handleBlockTraits(block);
 
-                renderBlocks(block, children);
+                if (children != null) {
+                    renderBlocks(block, children);
+                }
 
                 // stacked and relative blocks effect stacking
                 currentIPPosition = saveIP;