private void outputEmptyCellComment(CellReference cellRef) {
String cellRefString = cellRef.formatAsString();
XSSFComment comment = commentsTable.findCellComment(cellRefString);
- output.emptyCellComment(cellRefString, comment);
+ output.cell(cellRefString, null, comment);
}
private enum EmptyCellCommentsCheckType {
public void startRow(int rowNum);
/** A row with the (zero based) row number has ended */
public void endRow(int rowNum);
- /** A cell, with the given formatted value, and possibly a comment, was encountered */
+ /**
+ * A cell, with the given formatted value (may be null),
+ * and possibly a comment (may be null), was encountered */
public void cell(String cellReference, String formattedValue, XSSFComment comment);
- /** A comment for an otherwise-empty cell was encountered */
- public void emptyCellComment(String cellReference, XSSFComment comment);
/** A header or footer has been encountered */
public void headerFooter(String text, boolean isHeader, String tagName);
}
this.headerFooterMap = includeHeadersFooters ? new HashMap<String, String>() : null;
}
+ @Override
public void startRow(int rowNum) {
firstCellOfRow = true;
}
+ @Override
public void endRow(int rowNum) {
output.append('\n');
}
+ @Override
public void cell(String cellRef, String formattedValue, XSSFComment comment) {
if(firstCellOfRow) {
firstCellOfRow = false;
}
}
- public void emptyCellComment(String cellRef, XSSFComment comment) {
- cell(cellRef, null, comment);
- }
-
+ @Override
public void headerFooter(String text, boolean isHeader, String tagName) {
if (headerFooterMap != null) {
headerFooterMap.put(tagName, text);