}
return srcStyle;
}
private static void copyComment(Cell srcCell, Cell dstCell) {
final Comment srcComment = srcCell.getCellComment();
Comment dstComment = dstCell.getCellComment();
if (srcComment != null) {
if (dstComment == null) {
final Worksheet dstSheet = (Worksheet)dstCell.getSheet();
final Workbook dstBook = dstSheet.getWorkbook();
final CreationHelper dstFactory = dstBook.getCreationHelper();
final Drawing drawing = dstSheet.createDrawingPatriarch();
final ClientAnchor anchor = dstFactory.createClientAnchor();
dstComment = drawing.createCellComment(anchor);
}
dstComment.setString(srcComment.getString());
dstComment.setAuthor(srcComment.getAuthor());
dstComment.setVisible(srcComment.isVisible());
dstCell.setCellComment(dstComment);
} else { //srcComment is null
if (dstComment != null) {
dstCell.removeCellComment();
}