}
private void secondTestTable(RtfSection sect)
throws IOException {
sect.newParagraph().newText("Second test: table with two nested tables in cell 1,1");
final RtfTable tbl = sect.newTable(new DummyTableColumnsInfo());
// first row, normal
{
RtfTableRow r = tbl.newTableRow();
RtfTableCell c = r.newTableCell(160 * MM_TO_TWIPS);
c.newParagraph().newText("second test table: cell 0,0, width 160mm, "
+ "only cell in this row.");
}
// second row contains nested table
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText
("cell 1,0, width 40mm, to the left of nested tables.");
final RtfTableCell c = r.newTableCell(80 * MM_TO_TWIPS);
c.newParagraph().newText("cell 1,1, width 80mm, this text is "
+ "followed by a nested table in the same cell, followed "
+ "by text that says 'BETWEEN', then another table, then 'AFTER'.");
fillNestedTable(c.newTable(new DummyTableColumnsInfo()), 2);
c.newParagraph().newText("BETWEEN");
fillNestedTable(c.newTable(new DummyTableColumnsInfo()), 3);
c.newParagraph().newText("AFTER");
r.newTableCell(40 * MM_TO_TWIPS).newParagraph().newText
("cell 1,2, width 40mm, to the right of nested table.");
}
// third row, normal
{
RtfTableRow r = tbl.newTableRow();
r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText
("cell 2,0, width 80mm, this row has two cells.");
r.newTableCell(80 * MM_TO_TWIPS).newParagraph().newText
("cell 2,1, width 80mm, last cell.");
}