You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ad...@apache.org on 2005/09/25 12:43:38 UTC

svn commit: r291399 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java

Author: adelmelle
Date: Sun Sep 25 03:43:32 2005
New Revision: 291399

URL: http://svn.apache.org/viewcvs?rev=291399&view=rev
Log:
Minor tweak: avoid test for auto if value is indefinite

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java?rev=291399&r1=291398&r2=291399&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PageDimensionMaker.java Sun Sep 25 03:43:32 2005
@@ -53,8 +53,8 @@
         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 @@
                                      || 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);
         }
         



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org