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 54c923bdb9
commit a3a4526125
1 changed files with 6 additions and 1 deletions

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;
}
/**