PrimaryGridUnit[] gridUnits = new PrimaryGridUnit[colCount];
int[] start = new int[colCount];
int[] end = new int[colCount];
+ int[] partLength = new int[colCount];
//Iterate over all steps
while (parentIter.hasNext()) {
+ start[i] + "-" + end[i]);
int len = calcCellHeightFromContents(
gridUnits[i].getElements(), start[i], end[i]);
+ partLength[i] = len;
log.debug("len of part: " + len);
maxLen = Math.max(maxLen, len);
maxLen = Math.max(maxLen, getExplicitCellHeight(gridUnits[i]));
log.debug("flushing..." + i + " "
+ start[i] + "-" + end[i]);
addAreasForCell(gridUnits[i], start[i], end[i],
- layoutContext, lastRow, yoffset, maxLen);
+ layoutContext, lastRow, yoffset, partLength[i], maxLen);
gridUnits[i] = null;
start[i] = 0;
end[i] = 0;
if (gridUnits[i] != null) {
int len = calcCellHeightFromContents(
gridUnits[i].getElements(), start[i], end[i]);
+ partLength[i] = len;
log.debug("len of part: " + len);
maxLen = Math.max(maxLen, len);
maxLen = Math.max(maxLen, getExplicitCellHeight(gridUnits[i]));
if (gridUnits[i] != null) {
log.debug("final flushing " + i + " " + start[i] + "-" + end[i]);
addAreasForCell(gridUnits[i], start[i], end[i],
- layoutContext, lastRow, yoffset, maxLen);
+ layoutContext, lastRow, yoffset, partLength[i], maxLen);
}
}
private void addAreasForCell(PrimaryGridUnit gu, int start, int end,
LayoutContext layoutContext, TableRowIterator.EffRow row,
- int yoffset, int rowHeight) {
+ int yoffset, int contentHeight, int rowHeight) {
Cell cellLM = gu.getCellLM();
cellLM.setXOffset(getXOffsetOfGridUnit(gu));
cellLM.setYOffset(yoffset);
+ cellLM.setContentHeight(contentHeight);
cellLM.setRowHeight(rowHeight);
//cellLM.setRowHeight(row.getHeight().opt);
cellLM.addAreas(new KnuthPossPosIter(gu.getElements(),