aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/AbstractRenderer.java
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-02-14 10:12:48 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-02-14 10:12:48 +0000
commit06e1fa6d243ec64dd675110e9344f34cabd566a3 (patch)
tree07577020e668996faa0a18a29cab2b8fb6f6eabb /src/java/org/apache/fop/render/AbstractRenderer.java
parentc29ce0ae80329a756e17c263c1c4886d50708b3f (diff)
downloadxmlgraphics-fop-06e1fa6d243ec64dd675110e9344f34cabd566a3.tar.gz
xmlgraphics-fop-06e1fa6d243ec64dd675110e9344f34cabd566a3.zip
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
Diffstat (limited to 'src/java/org/apache/fop/render/AbstractRenderer.java')
-rw-r--r--src/java/org/apache/fop/render/AbstractRenderer.java37
1 files changed, 9 insertions, 28 deletions
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();