// destination row. Note that comments can
// exist for cells which are null
if(moveComments) {
// This code would get simpler if NoteRecords could be organised by HSSFRow.
for(int i=noteRecs.length-1; i>=0; i--) {
NoteRecord nr = noteRecs[i];
if (nr.getRow() != rowNum || nr.getColumn() < lCol || nr.getColumn() > rCol) {
continue;
}
HSSFComment comment = getCellComment(rowNum, nr.getColumn());
if (comment != null) {
comment.setRow(rowNum + nRow);
int colNum = nr.getColumn()+nCol;
if (colNum >= 0 && colNum <= maxcol) {
comment.setColumn(colNum);
}
}
}