aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/layoutmgr/table/Row.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/apache/fop/layoutmgr/table/Row.java')
-rw-r--r--src/org/apache/fop/layoutmgr/table/Row.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/org/apache/fop/layoutmgr/table/Row.java b/src/org/apache/fop/layoutmgr/table/Row.java
index d9f2c46fd..3784bb984 100644
--- a/src/org/apache/fop/layoutmgr/table/Row.java
+++ b/src/org/apache/fop/layoutmgr/table/Row.java
@@ -167,8 +167,10 @@ public class Row extends BlockStackingLayoutManager {
if (stackSize.min > min) {
min = stackSize.min;
}
- // the optimum is the average of all optimums
- opt += stackSize.opt;
+ // the optimum is the minimum of all optimums
+ if (stackSize.opt > opt) {
+ opt = stackSize.opt;
+ }
// the maximum is the largest maximum
if (stackSize.max > max) {
max = stackSize.max;
@@ -176,10 +178,6 @@ public class Row extends BlockStackingLayoutManager {
breakList.add(childBreaks);
}
- opt = opt / cellcount;
- if (opt < min) {
- opt = min;
- }
rowHeight = opt;
MinOptMax rowSize = new MinOptMax(min, opt, max);