]> source.dussan.org Git - poi.git/commitdiff
small refactor
authorPJ Fanning <fanningpj@apache.org>
Sat, 13 Feb 2021 23:33:24 +0000 (23:33 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 13 Feb 2021 23:33:24 +0000 (23:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886495 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

index cdc404b0289c4e29c8974a8d8a38ea05244003d7..b4ed883854689ae13bb3661d591561dd003ac10d 100644 (file)
@@ -793,18 +793,14 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet  {
             return null;
         }
 
-        final int row = address.getRow();
-        final int column = address.getColumn();
-
-        CellAddress ref = new CellAddress(row, column);
-        CTComment ctComment = sheetComments.getCTComment(ref);
+        CTComment ctComment = sheetComments.getCTComment(address);
         if(ctComment == null) {
             return null;
         }
 
         XSSFVMLDrawing vml = getVMLDrawing(false);
         return new XSSFComment(sheetComments, ctComment,
-                vml == null ? null : vml.findCommentShape(row, column));
+                vml == null ? null : vml.findCommentShape(address.getRow(), address.getColumn()));
     }
 
     /**