}
}
//flag column indices used by this column
- usedColumnIndices.set(colNumber - 1, colNumber - 1 + colRepeat);
+ for (int i = colNumber - 1; i < colNumber - 1 + colRepeat; i++) {
+ usedColumnIndices.set(i);
+ }
//set index for the next column to use
while( usedColumnIndices.get(columnIndex - 1) ) {
columnIndex++;
}
}
}
- usedColumnIndices.set(startIndex, endIndex);
+ for (int i = startIndex; i < endIndex; i++) {
+ usedColumnIndices.set(i);
+ }
setNextColumnIndex();
super.addChildNode(cell);
if (cell.endsRow()) {
*/
public void resetColumnIndex() {
columnIndex = 1;
- usedColumnIndices.clear();
+ for (int i = 0; i < usedColumnIndices.size(); i++) {
+ usedColumnIndices.clear(i);
+ }
PendingSpan pSpan;
for (int i = pendingSpans.size(); --i >= 0;) {
pSpan = (PendingSpan) pendingSpans.get(i);
pendingSpans.set(i, null);
}
}
- usedColumnIndices.set(i, pendingSpans.get(i) != null);
+ if (pendingSpans.get(i) != null) {
+ usedColumnIndices.set(i);
+ } else {
+ usedColumnIndices.clear(i);
+ }
}
if (!firstRow) {
setNextColumnIndex();
}
}
}
- usedColumnIndices.set(startIndex, endIndex);
+ for (int i = startIndex; i < endIndex; i++) {
+ usedColumnIndices.set(i);
+ }
//update columnIndex for the next cell
while (usedColumnIndices.get(columnIndex - 1)) {
columnIndex++;