aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java16
-rw-r--r--status.xml4
2 files changed, 11 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java b/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
index 155abcd39..f029d9082 100644
--- a/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
+++ b/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
@@ -103,15 +103,13 @@ public class MinOptMaxUtil {
* @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);
}
}
diff --git a/status.xml b/status.xml
index 0b261fec6..64e3dbd1a 100644
--- a/status.xml
+++ b/status.xml
@@ -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.