xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vhenneb...@apache.org
Subject svn commit: r739376 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java status.xml
Date Fri, 30 Jan 2009 18:56:34 GMT
Author: vhennebert
Date: Fri Jan 30 18:56:34 2009
New Revision: 739376

URL: http://svn.apache.org/viewvc?rev=739376&view=rev
Log:
Bugzilla #46638: MinOptMaxUtil.toMinOptMax was converting LengthRangeProperty objects into
illegal MinOptMax objects (in some cases opt could be inferior to min).

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java?rev=739376&r1=739375&r2=739376&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java Fri Jan 30
18:56:34 2009
@@ -103,15 +103,13 @@
      * @return the requested MinOptMax instance
      */
     public static MinOptMax toMinOptMax(LengthRangeProperty prop, PercentBaseContext context)
{
-        MinOptMax mom = new MinOptMax(
-                (prop.getMinimum(context).isAuto()
-                        ? 0 : prop.getMinimum(context).getLength().getValue(context)),
-                (prop.getOptimum(context).isAuto()
-                        ? 0 : prop.getOptimum(context).getLength().getValue(context)),
-                (prop.getMaximum(context).isAuto()
-                        ? Integer.MAX_VALUE
-                        : prop.getMaximum(context).getLength().getValue(context)));
-        return mom;
+        int min = prop.getMinimum(context).isAuto() ? 0
+                : prop.getMinimum(context).getLength().getValue(context);
+        int opt = prop.getOptimum(context).isAuto() ? min
+                : prop.getOptimum(context).getLength().getValue(context);
+        int max = prop.getMaximum(context).isAuto() ? Integer.MAX_VALUE
+                : prop.getMaximum(context).getLength().getValue(context);
+        return new MinOptMax(min, opt, max);
     }
 
 }

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=739376&r1=739375&r2=739376&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Fri Jan 30 18:56:34 2009
@@ -58,6 +58,10 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Code" dev="VH" type="fix" fixes-bug="46638">
+        MinOptMaxUtil.toMinOptMax was converting LengthRangeProperty objects into illegal
MinOptMax 
+        objects (in some cases opt could be inferior to min).
+      </action>
       <action context="Layout" dev="VH" type="add" fixes-bug="46315" due-to="Georg Datterl">
         Added extension to disable column balancing before blocks spanning the whole page,
in 
         multiple-column documents.



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


Mime
View raw message