public void endCell(ICellContent cell) throws BirtException { if (!isNestTable()) { if (cellEmitter != null) { cellEmitter = null; return; } else { emitter.endCell(layout.getWrappedCellContent(cell)); } } else { if (cellEmitter != null) { cellEmitter.endCell(cell); } else { emitter.endCell(cell); } } }
protected void flushRow(int rowId, int colId, boolean withStart) throws BirtException { int colCount = layout.getColCount(); int columnId = layout.getColumnId(colId); Row row = layout.getRow(rowId); IRowContent rowContent = (IRowContent) row.getContent(); if (withStart) { emitter.startRow(rowContent); } for (int j = columnId; j < colCount; j++) { Cell cell = row.getCell(j); if (cell.getStatus() == Cell.CELL_USED) { CellContent content = (CellContent) cell.getContent(); CellContentWrapper tempCell = new CellContentWrapper(content.cell); tempCell.setColumn(cell.getColId()); tempCell.setRowSpan(cell.getRowSpan()); tempCell.setColSpan(cell.getColSpan()); emitter.startCell(tempCell); if (content.buffer != null) { content.buffer.flush(); } emitter.endCell(tempCell); } if (cell.getStatus() == Cell.CELL_EMPTY) { IReportContent report = rowContent.getReportContent(); ICellContent cellContent = report.createCellContent(); cellContent.setParent(rowContent); cellContent.setColumn(cell.getColId() + 1); cellContent.setRowSpan(cell.getRowSpan()); cellContent.setColSpan(cell.getColSpan()); emitter.startCell(cellContent); emitter.endCell(cellContent); } } emitter.endRow(rowContent); }