aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/RegionBA.java
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@apache.org>2005-08-31 20:29:33 +0000
committerFinn Bock <bckfnn@apache.org>2005-08-31 20:29:33 +0000
commite194fdd5cfe3f1bc823d93c57420db87eb7efed0 (patch)
treee4e195d6e88bd85e02c48bffac90176543aba0cc /src/java/org/apache/fop/fo/pagination/RegionBA.java
parent0c4637012c7a394bb3ae1b621ca89c7742b0612d (diff)
downloadxmlgraphics-fop-e194fdd5cfe3f1bc823d93c57420db87eb7efed0.tar.gz
xmlgraphics-fop-e194fdd5cfe3f1bc823d93c57420db87eb7efed0.zip
Bugzilla #36379:
Revised percentage resolution system. Submitted by: Manuel Mall <mm.at.arcus.com.au> Slightly modified to avoid early evaluation of getValue(). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265577 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/RegionBA.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBA.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/RegionBA.java b/src/java/org/apache/fop/fo/pagination/RegionBA.java
index 6d35dae20..f732c721f 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBA.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBA.java
@@ -22,6 +22,7 @@ package org.apache.fop.fo.pagination;
import java.awt.Rectangle;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.datatypes.PercentBaseContext;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.PropertyList;
@@ -63,17 +64,18 @@ public abstract class RegionBA extends SideRegion {
* and end regions if they are present.
* @param vpRefRect viewport reference rectangle
* @param wm writing mode
+ * @param siblingContext the context to use to resolve extent on siblings
*/
- protected void adjustIPD(Rectangle vpRefRect, int wm) {
+ protected void adjustIPD(Rectangle vpRefRect, int wm, PercentBaseContext siblingContext) {
int offset = 0;
RegionStart start = (RegionStart) getSiblingRegion(FO_REGION_START);
if (start != null) {
- offset = start.getExtent().getValue();
+ offset = start.getExtent().getValue(siblingContext);
vpRefRect.translate(offset, 0); // move (x, y) units
}
RegionEnd end = (RegionEnd) getSiblingRegion(FO_REGION_END);
if (end != null) {
- offset += end.getExtent().getValue();
+ offset += end.getExtent().getValue(siblingContext);
}
if (offset > 0) {
if (wm == EN_LR_TB || wm == EN_RL_TB) {