aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2011-01-09 01:26:33 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2011-01-09 01:26:33 +0000
commite5e7806fd2c179759902a4fa90c8cd58849835be (patch)
tree1027ae6059baaaf29a26d4921252655e825d4908
parent23e1125a2bc0b1ede23e66384fef96eb7e6631d4 (diff)
downloadxmlgraphics-fop-e5e7806fd2c179759902a4fa90c8cd58849835be.tar.gz
xmlgraphics-fop-e5e7806fd2c179759902a4fa90c8cd58849835be.zip
Commit changes forgotten in r757256...
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1056861 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBefore.java24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/RegionBefore.java b/src/java/org/apache/fop/fo/pagination/RegionBefore.java
index 71ea26818..728336c98 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBefore.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBefore.java
@@ -25,7 +25,7 @@ import java.awt.Rectangle;
// FOP
import org.apache.fop.datatypes.FODimension;
import org.apache.fop.datatypes.LengthBase;
-import org.apache.fop.datatypes.SimplePercentBaseContext;
+import org.apache.fop.datatypes.PercentBaseContext;
import org.apache.fop.fo.FONode;
/**
@@ -53,25 +53,9 @@ public class RegionBefore extends RegionBA {
/* Special rules apply to resolving extent as values are resolved relative
* to the page size and reference orientation.
*/
- SimplePercentBaseContext pageWidthContext;
- SimplePercentBaseContext pageHeightContext;
- if (spm.getReferenceOrientation() % 180 == 0) {
- pageWidthContext = new SimplePercentBaseContext(null,
- LengthBase.CUSTOM_BASE,
- spm.getPageWidth().getValue());
- pageHeightContext = new SimplePercentBaseContext(null,
- LengthBase.CUSTOM_BASE,
- spm.getPageHeight().getValue());
- } else {
- // invert width and height since top left are rotated by 90 (cl or ccl)
- pageWidthContext = new SimplePercentBaseContext(null,
- LengthBase.CUSTOM_BASE,
- spm.getPageHeight().getValue());
- pageHeightContext = new SimplePercentBaseContext(null,
- LengthBase.CUSTOM_BASE,
- spm.getPageWidth().getValue());
- }
- SimplePercentBaseContext neighbourContext;
+ PercentBaseContext pageWidthContext = getPageWidthContext(LengthBase.CUSTOM_BASE);
+ PercentBaseContext pageHeightContext = getPageHeightContext(LengthBase.CUSTOM_BASE);
+ PercentBaseContext neighbourContext;
Rectangle vpRect;
if (spm.getWritingMode() == EN_LR_TB || spm.getWritingMode() == EN_RL_TB) {
neighbourContext = pageWidthContext;