final CommentsTable sheetComments = getCommentsTable(false);
if(sheetComments != null){
//TODO shift Note's anchor in the associated /xl/drawing/vmlDrawings#.vml
CTCommentList lst = sheetComments.getCTComments().getCommentList();
for (final Iterator<CTComment> it = lst.getCommentList().iterator(); it.hasNext();) {
CTComment comment = it.next();
CellReference ref = new CellReference(comment.getRef());
final int colnum = ref.getCol();
final int rownum = ref.getRow();
if(lCol <= colnum && colnum <= rCol && tRow <= rownum && rownum <= bRow){
int newColNum = colnum + nCol;
int newRowNum = rownum + nRow;
if (newColNum < 0 || newColNum > maxcol
|| newRowNum < 0 || newRowNum > maxrow) { //out of bound, shall remove it
it.remove();
} else {
ref = new CellReference(newRowNum, newColNum);
comment.setRef(ref.formatAsString());
}
}
}
}
}