{
dataCell = (DataCell) prevCell;
}
else if (prevCell instanceof PlaceHolderCell)
{
PlaceHolderCell placeHolderCell = (PlaceHolderCell) prevCell;
dataCell = placeHolderCell.getSourceCell();
}
else
{
throw new IllegalStateException("Unexpected cell type.");
}
// oh no, a spanned cell that conflicts with the current cell.
// that means: Push the insertation point to the left ..
// and add placeholders to the current row-info-struct ..
final int colSpan = prevCell.getColSpan();
// reduce the rowspan by one, as this is a new row ..
final int rowSpan = prevCell.getRowSpan() - 1;
for (int i = 0; i < colSpan; i++)
{
final PlaceHolderCell placeHolderCell =
new PlaceHolderCell
(dataCell, rowSpan, colSpan - i);
infoStruct.addCell(placeHolderCell);
}
cellPosition += prevCell.getColSpan();
}