From e682cc52e3f430f1a413868182809a8cca80703e Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 26 Jul 2018 12:30:32 +0000 Subject: [PATCH] reduce dependence on CTComment git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1836723 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/xssf/eventusermodel/XSSFSheetXMLHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java index 28355b6b11..7e00dd3893 100644 --- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java +++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java @@ -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) { -- 2.39.5