From: Adrian Cumiskey Date: Thu, 14 Feb 2008 10:12:48 +0000 (+0000) Subject: When I first saw this it surprised me, it seems to have been here for quite some... X-Git-Tag: fop-0_95beta~69 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=06e1fa6d243ec64dd675110e9344f34cabd566a3;p=xmlgraphics-fop.git When I first saw this it surprised me, it seems to have been here for quite some time. The code block directly following this if/else condition was identical so I removed the copy/paste duplication and refactored it. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@627698 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java index 86820066f..32c4b33c4 100644 --- a/src/java/org/apache/fop/render/AbstractRenderer.java +++ b/src/java/org/apache/fop/render/AbstractRenderer.java @@ -171,15 +171,7 @@ public abstract class AbstractRenderer return this.currentPageViewport; } - /** - * Prepare a page for rendering. This is called if the renderer supports - * out of order rendering. The renderer should prepare the page so that a - * page further on in the set of pages can be rendered. The body of the - * page should not be rendered. The page will be rendered at a later time - * by the call to render page. - * - * {@inheritDoc} - */ + /** {@inheritDoc} */ public void preparePage(PageViewport page) { } /** @@ -562,31 +554,20 @@ public abstract class AbstractRenderer int saveIP = currentIPPosition; int saveBP = currentBPPosition; - if (block.getPositioning() == Block.ABSOLUTE) { - currentIPPosition += block.getXOffset(); - currentBPPosition += block.getYOffset(); - currentBPPosition += block.getSpaceBefore(); + currentIPPosition += block.getXOffset(); + currentBPPosition += block.getYOffset(); + currentBPPosition += block.getSpaceBefore(); - handleBlockTraits(block); + handleBlockTraits(block); - if (children != null) { - renderBlocks(block, children); - } + if (children != null) { + renderBlocks(block, children); + } + if (block.getPositioning() == Block.ABSOLUTE) { // absolute blocks do not effect the layout currentBPPosition = saveBP; } else { - // relative blocks are offset - currentIPPosition += block.getXOffset(); - currentBPPosition += block.getYOffset(); - currentBPPosition += block.getSpaceBefore(); - - handleBlockTraits(block); - - if (children != null) { - renderBlocks(block, children); - } - // stacked and relative blocks effect stacking currentIPPosition = saveIP; currentBPPosition = saveBP + block.getAllocBPD();