textTableLast.addRow(helpRows);
}
int helpCount = count - helpRows;
while (helpCount > 0) {
int insert = helpCount;
TextTablePropertyStore tablePropertyStore = new TextTablePropertyStore(
textTableManagement.getFirstTextTable());
if (tablePropertyStore.repeatHeadline()) {
insert = insert + 1;
}
if (helpCount * columnCount > ITextTable.MAX_CELLS_IN_TABLE) {
insert = maxRowsInTable;
}
ITextTable textTable = textDocument.getTextTableService()
.constructTextTable(1, columnCount);
ITextTableProperties properties = textTable.getProperties();
properties.setRepeatHeadline(tablePropertyStore
.repeatHeadline());
textDocument.getTextService().getTextContentService()
.insertTextContentAfter(textTable, textTableLast);
properties.setTableColumnSeparators(tablePropertyStore
.getTableColumnSeparators());
IDestinationPosition destinationPosition = new DestinationPosition(
textTable.getCell("A1"));
if (tablePropertyStore.repeatHeadline()) {
textTableCellRangeHeaderClone.getCloneService()
.cloneToPositionNoReturn(destinationPosition,
null);
destinationPosition = new DestinationPosition(textTable
.getCell("A2"));