aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2005-09-25 10:43:32 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2005-09-25 10:43:32 +0000
commita06109161ead1b7c351bc2fc7beb93f3ff7553ff (patch)
tree8ea78c1779a638045bb073bf9bbf2639b1cdd9cc /src/java/org
parente83ae89e75c0b656c1c0e320b1e2132fb18073c9 (diff)
downloadxmlgraphics-fop-a06109161ead1b7c351bc2fc7beb93f3ff7553ff.tar.gz
xmlgraphics-fop-a06109161ead1b7c351bc2fc7beb93f3ff7553ff.zip
Minor tweak: avoid test for auto if value is indefinite
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@291399 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/fo/properties/PageDimensionMaker.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java b/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java
index 47183e38f..0c165ca29 100644
--- a/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java
+++ b/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java
@@ -53,8 +53,8 @@ public class PageDimensionMaker extends LengthProperty.Maker {
Property p = super.get(0, propertyList, tryInherit, tryDefault);
FObj fo = propertyList.getFObj();
String fallbackValue = (propId == Constants.PR_PAGE_HEIGHT)
- ? fo.getFOEventHandler().getUserAgent().getPageHeight()
- : fo.getFOEventHandler().getUserAgent().getPageWidth();
+ ? fo.getFOEventHandler().getUserAgent().getPageHeight()
+ : fo.getFOEventHandler().getUserAgent().getPageWidth();
if (p.getEnum() == Constants.EN_INDEFINITE) {
int otherId = (propId == Constants.PR_PAGE_HEIGHT)
@@ -78,18 +78,20 @@ public class PageDimensionMaker extends LengthProperty.Maker {
|| refOrientation == -270))) {
//set page-width to "auto" = use the fallback from FOUserAgent
if (propId == Constants.PR_PAGE_WIDTH) {
+ fo.getLogger().warn("Both page-width and page-height set to "
+ + "\"indefinite\". Forcing page-width to \"auto\"");
return make(propertyList, fallbackValue, fo);
}
} else {
//set page-height to "auto" = use fallback from FOUserAgent
+ fo.getLogger().warn("Both page-width and page-height set to "
+ + "\"indefinite\". Forcing page-height to \"auto\"");
if (propId == Constants.PR_PAGE_HEIGHT) {
return make(propertyList, fallbackValue, fo);
}
}
}
- }
-
- if (p.isAuto()) {
+ } else if (p.isAuto()) {
return make(propertyList, fallbackValue, fo);
}