]> source.dussan.org Git - poi.git/commitdiff
reduce dependence on CTComment
authorPJ Fanning <fanningpj@apache.org>
Thu, 26 Jul 2018 12:30:32 +0000 (12:30 +0000)
committerPJ Fanning <fanningpj@apache.org>
Thu, 26 Jul 2018 12:30:32 +0000 (12:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1836723 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java

index 28355b6b11f9db0e1b4e823513e8fddd7ce92361..7e00dd389390a3a5eadafffb97fae23df130bc7a 100644 (file)
@@ -166,11 +166,10 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
    private void init(CommentsTable commentsTable) {
        if (commentsTable != null) {
            commentCellRefs = new LinkedList<>();
-           //noinspection deprecation
-           for (CTComment comment : commentsTable.getCTComments().getCommentList().getCommentArray()) {
-               commentCellRefs.add(new CellAddress(comment.getRef()));
+           for (CellAddress cellAddress : commentsTable.getCellComments().keySet()) {
+               commentCellRefs.add(cellAddress);
            }
-       }   
+       }
    }
 
    private boolean isTextTag(String name) {