return new FastHtmlFormattedDataBuilder(gridLayout, htmlPrinter, recorder.getRecordedBounds());
}
public void produceTemplate(final LogicalPageBox pageBox)
{
TableContentProducer contentProducer = TemplatingOutputProcessor.produceTableLayout(pageBox, sheetLayout, metaData);
final SheetLayout sheetLayout = contentProducer.getSheetLayout();
final int columnCount = contentProducer.getColumnCount();
final int startRow = contentProducer.getFinishedRows();
final int finishRow = contentProducer.getFilledRows();
gridLayout = new FastGridLayout();
for (int row = startRow; row < finishRow; row++)
{
gridLayout.addRow(row - startRow, sheetLayout.getRowHeight(row));
for (short col = 0; col < columnCount; col++)
{
final CellMarker.SectionType sectionType = contentProducer.getSectionType(row, col);
final RenderBox content = contentProducer.getContent(row, col);
if (content == null)
{
final RenderBox backgroundBox = contentProducer.getBackground(row, col);
final CellBackground background;
if (backgroundBox != null)
{
background = cellBackgroundProducer.getBackgroundForBox
(pageBox, sheetLayout, col, row, 1, 1, true, sectionType, backgroundBox);
}
else
{
background = cellBackgroundProducer.getBackgroundAt(pageBox, sheetLayout, col, row, true, sectionType);
}
if (background != null)
{
gridLayout.addBackground(new CellLayoutInfo(col, row, background));
}
else
{
gridLayout.addBackground(new CellLayoutInfo(col, row, null));
}
continue;
}
if (content.isCommited() == false)
{
throw new InvalidReportStateException("Uncommited content encountered");
}
final long contentOffset = contentProducer.getContentOffset(row, col);
final TableRectangle rect = sheetLayout.getTableBounds
(content.getX(), content.getY() + contentOffset,
content.getWidth(), content.getHeight(), null);
if (rect.isOrigin(col, row) == false)
{