You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2018/07/30 02:08:37 UTC

svn commit: r1837014 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

Author: fanningpj
Date: Mon Jul 30 02:08:37 2018
New Revision: 1837014

URL: http://svn.apache.org/viewvc?rev=1837014&view=rev
Log:
ensure xssfsheet getCellComments returns comments with client anchors set

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1837014&r1=1837013&r2=1837014&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Mon Jul 30 02:08:37 2018
@@ -843,7 +843,12 @@ public class XSSFSheet extends POIXMLDoc
         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;
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org