aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/RegionBody.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/RegionBody.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBody.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/RegionBody.java b/src/java/org/apache/fop/fo/pagination/RegionBody.java
index 0f7a26464..47fb7e8e8 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBody.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBody.java
@@ -81,20 +81,13 @@ public class RegionBody extends Region {
* @see org.apache.fop.fo.pagination.Region#getViewportRectangle(FODimension)
*/
public Rectangle getViewportRectangle (FODimension reldims) {
- /*
- * Use space-before and space-after which will use corresponding
- * absolute margin properties if specified. For indents:
- * try to get corresponding absolute margin property using the
- * writing-mode on the page (not on the region-body!). If that's not
- * set but indent is explicitly set, it will return that.
- */
- int start = commonMarginBlock.startIndent.getValue();
- int end = commonMarginBlock.endIndent.getValue();
- int before = commonMarginBlock.spaceBefore.getOptimum().getLength().getValue();
- int after = commonMarginBlock.spaceAfter.getOptimum().getLength().getValue();
- return new Rectangle(start, before,
- reldims.ipd - start - end,
- reldims.bpd - before - after);
+ int left = commonMarginBlock.marginLeft.getValue();
+ int right = commonMarginBlock.marginRight.getValue();
+ int top = commonMarginBlock.marginTop.getValue();
+ int bottom = commonMarginBlock.marginBottom.getValue();
+ return new Rectangle(left, top,
+ reldims.ipd - left - right,
+ reldims.bpd - top - bottom);
}
/**