//the maRowElement/mnRepeatedIndex should also be updated according to the original index in the repeated column
void splitRepeatedRows() {
int repeateNum = getRowsRepeatedNumber();
if (repeateNum > 1) {
OdfTable table = getTable();
TableTableElement tableEle = table.getOdfElement();
//change this repeated row to several single rows
TableTableRowElement ownerRowElement = null;
int repeatedRowIndex = mnRepeatedIndex;
Node refElement = maRowElement;
Node oldRowElement = maRowElement;
for (int i = repeateNum - 1; i >= 0; i--) {
TableTableRowElement newRow = (TableTableRowElement) maRowElement.cloneNode(true);
newRow.removeAttributeNS(OdfDocumentNamespace.TABLE.getUri(), "number-rows-repeated");
tableEle.insertBefore(newRow, refElement);
refElement = newRow;
if (repeatedRowIndex == i) {
ownerRowElement = newRow;
} else {
table.updateRowRepository(maRowElement, i, newRow, 0);
}
}
if (ownerRowElement != null) {
table.updateRowRepository(maRowElement, mnRepeatedIndex, ownerRowElement, 0);
}
tableEle.removeChild(oldRowElement);
mRowsRepeatedNumber = -1;
}
}