// processing, never shrinking but potentially growing on each
// iteration
int i = 0;
while (i < tables.size()) {
TransTable table = (TransTable)tables.get(i);
if (getRemoveTableRule().canRemoveTable(table)) {
int row;
// Re-map the top-level table
mapper.remap(table.getElement(),
getFactory().getElementHelper(),
true);
// "Promote" the nested tables, adding them to the end
// of the tables array so they can be processed in turn
// (they may be single column tables too)
for (row = 0; row < table.getRows(); row++) {
TransCell cell = table.getCell(row, 0);
TransTable nested = cell.getTable();
if ((nested != null) &&
(cell.getStartRow() == row)) {
nested.setParent(null);
tables.add(nested);
cell.setTable(null);
}
}