setRightBottomBorderStylesProperties(rightbottomStyle);
}
// 3.1 create header row elements
if (headerRowNumber > 0) {
TableTableHeaderRowsElement headerrows = (TableTableHeaderRowsElement) OdfXMLFactory.newOdfElement(dom,
OdfName.newName(OdfDocumentNamespace.TABLE, "table-header-rows"));
for (int i = 0; i < headerRowNumber; i++) {
TableTableRowElement aRow = (TableTableRowElement) OdfXMLFactory.newOdfElement(dom, OdfName.newName(
OdfDocumentNamespace.TABLE, "table-row"));
for (int j = 0; j < numCols; j++) {
TableTableCellElement aCell = (TableTableCellElement) OdfXMLFactory.newOdfElement(dom, OdfName
.newName(OdfDocumentNamespace.TABLE, "table-cell"));
if (isTextDocument) {
if ((j + 1 == numCols) && (i == 0)) {
aCell.setStyleName(righttopStyle.getStyleNameAttribute());
} else if (i == 0) {
aCell.setStyleName(lefttopStyle.getStyleNameAttribute());
} else if ((j + 1 == numCols) && (i > 0)) {
aCell.setStyleName(rightbottomStyle.getStyleNameAttribute());
} else {
aCell.setStyleName(leftbottomStyle.getStyleNameAttribute());
}
}
aRow.appendChild(aCell);
}
headerrows.appendChild(aRow);
}
newTEle.appendChild(headerrows);
}
// 3.2 create common row elements