explicitRowHeight = MinOptMaxUtil.toMinOptMax(rowBPD, tableLM);
}
for (Iterator iter = row.getGridUnits().iterator(); iter.hasNext();) {
GridUnit gu = (GridUnit) iter.next();
if (!gu.isEmpty() && gu.getColSpanIndex() == 0 && gu.isLastGridUnitRowSpan()) {
PrimaryGridUnit primary = gu.getPrimary();
int effectiveCellBPD = 0;
LengthRangeProperty cellBPD = primary.getCell().getBlockProgressionDimension();
if (!cellBPD.getMinimum(tableLM).isAuto()) {
effectiveCellBPD = cellBPD.getMinimum(tableLM).getLength()
.getValue(tableLM);
}
if (!cellBPD.getOptimum(tableLM).isAuto()) {
effectiveCellBPD = cellBPD.getOptimum(tableLM).getLength()
.getValue(tableLM);
}
if (gu.getRowSpanIndex() == 0) {
effectiveCellBPD = Math.max(effectiveCellBPD, explicitRowHeight.opt);
}
effectiveCellBPD = Math.max(effectiveCellBPD, primary.getContentLength());
int borderWidths = primary.getBeforeAfterBorderWidth();
int padding = 0;
CommonBorderPaddingBackground cbpb = primary.getCell()
.getCommonBorderPaddingBackground();
padding += cbpb.getPaddingBefore(false, primary.getCellLM());
padding += cbpb.getPaddingAfter(false, primary.getCellLM());
int effRowHeight = effectiveCellBPD + padding + borderWidths;
for (int prev = rgi - 1; prev >= rgi - gu.getRowSpanIndex(); prev--) {
effRowHeight -= rowHeights[prev].opt;
}
if (effRowHeight > rowHeights[rgi].min) {