From 7ef085af37acf285072610572fda1687b7acf340 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 30 May 2019 07:56:33 +0000 Subject: [PATCH] [bug-63463] fix issue with shifting rows. Thanks to David Gauntt. 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java index 57df559f95..21a9257313 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java @@ -562,10 +562,11 @@ public class XSSFRow implements Row, Comparable { 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); + } + } /** -- 2.39.5