AdRiley commented on code in PR #920:
URL: https://github.com/apache/poi/pull/920#discussion_r2440432846
##########
poi-ooxml/src/main/java/org/apache/poi/xssf/binary/XSSFBSheetHandler.java:
##########
@@ -133,86 +189,107 @@ private void beforeCellValue(byte[] data) {
checkMissedComments(currentRow, cellBuffer.getColNum());
}
- private void handleCellValue(String formattedValue) {
- CellAddress cellAddress = new CellAddress(currentRow,
cellBuffer.getColNum());
+ private void handleStringCellValue(String formattedValue) {
+ CellAddress cellAddress = getCellAddress();
+ XSSFBComment comment = getCellComment(cellAddress);
+ handler.stringCell(cellAddress.formatAsString(), formattedValue,
comment);
+ }
+
+ private void handleDoubleCellValue(double val) {
+ CellAddress cellAddress = getCellAddress();
+ XSSFBComment comment = getCellComment(cellAddress);
+ ExcelNumberFormat nf = getExcelNumberFormat();
+ handler.doubleCell(cellAddress.formatAsString(), val, comment, nf);
+ }
+
+ private CellAddress getCellAddress() {
+ return new CellAddress(currentRow, cellBuffer.getColNum());
+ }
+
+ private XSSFBComment getCellComment(CellAddress cellAddress) {
XSSFBComment comment = null;
if (comments != null) {
- comment = comments.get(cellAddress);
Review Comment:
Typo sorry. Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]