/**
* Index of the first row of the current part present on the current page.
*/
- private int firstRow;
+ private int firstRowIndex;
/**
* Keeps track of the y-offsets of each row on a page.
* This is particularly needed for spanned cells where you need to know the y-offset
this.start = new int[colCount];
this.end = new int[colCount];
this.partBPD = new int[colCount];
- this.firstRow = -1;
+ this.firstRowIndex = -1;
Arrays.fill(end, -1);
}
}
rowFO = tcpos.row.getTableRow();
lastRow = tcpos.row;
+ if (firstRowIndex < 0) {
+ firstRowIndex = lastRow.getIndex();
+ }
Iterator partIter = tcpos.cellParts.iterator();
//Iterate over all grid units in the current step
while (partIter.hasNext()) {
len += pgu.getHalfMaxBeforeBorderWidth();
len += pgu.getHalfMaxAfterBorderWidth();
}
- int startRow = Math.max(pgu.getStartRow(), firstRow);
+ int startRow = Math.max(pgu.getStartRow(), firstRowIndex);
Integer storedOffset = (Integer)rowOffsets.get(new Integer(startRow));
int effYOffset;
if (storedOffset != null) {
private void addAreasForCell(PrimaryGridUnit pgu, int startPos, int endPos,
EffRow row, int contentHeight, int rowHeight) {
- if (firstRow < 0) {
- firstRow = row.getIndex();
- }
//Determine the first row in this sequence
- int startRowIndex = Math.max(pgu.getStartRow(), firstRow);
+ int startRowIndex = Math.max(pgu.getStartRow(), firstRowIndex);
int lastRowIndex = lastRow.getIndex();
// In collapsing-border model, if the cell spans over several columns/rows then
}
void endPart() {
- firstRow = -1;
+ firstRowIndex = -1;
rowOffsets.clear();
}
}