]> source.dussan.org Git - poi.git/commitdiff
[bug-63463] fix issue with shifting rows. Thanks to David Gauntt.
authorPJ Fanning <fanningpj@apache.org>
Thu, 30 May 2019 07:56:33 +0000 (07:56 +0000)
committerPJ Fanning <fanningpj@apache.org>
Thu, 30 May 2019 07:56:33 +0000 (07:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1860384 13f79535-47bb-0310-9956-ffa450edef68

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

index 57df559f959097d9d661921ec14d4bda233b57f1..21a925731345536d2ca6284928b7d0a24f979dec 100644 (file)
@@ -562,10 +562,11 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
         int rownum = getRowNum() + n;
         String msg = "Row[rownum=" + getRowNum() + "] contains cell(s) included in a multi-cell array formula. " +
                 "You cannot change part of an array.";
+        setRowNum(rownum);
         for(Cell c : this){
             ((XSSFCell)c).updateCellReferencesForShifting(msg);
-          }
-        setRowNum(rownum);
+        }
+
     }
 
     /**