ensure xssfsheet getCellComments returns comments with client anchors set

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1837014 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-07-30 02:08:37 +00:00
parent f84dc3885c
commit 6e0a009b8f

View File

@ -843,7 +843,12 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
if (sheetComments == null) {
return Collections.emptyMap();
}
return sheetComments.getCellComments();
// the cell comments in sheetComments.getCellComments() do not have the client anchors set
Map<CellAddress, XSSFComment> map = new HashMap<>();
for(CellAddress address : sheetComments.getCellComments().keySet()) {
map.put(address, getCellComment(address));
}
return map;
}
/**