From: PJ Fanning Date: Sat, 7 Aug 2021 10:32:22 +0000 (+0000) Subject: fix TextJoin use case that was not handled X-Git-Tag: REL_5_1_0~76 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4ad008ef126203ca10b78ea93884eca1c34654f8;p=poi.git fix TextJoin use case that was not handled git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892062 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java b/poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java index 1148267b63..5c64fd8bcd 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java @@ -104,9 +104,9 @@ final class TextJoinFunction implements FreeRefFunction { if (eval instanceof AreaEval) { AreaEval ae = (AreaEval)eval; List list = new ArrayList<>(); - for (int r = 0; r < ae.getHeight(); r++) { - for (int c = 0; c < ae.getWidth(); c++) { - list.add(ae.getRelativeValue(r, c)); + for (int r = ae.getFirstRow(); r <= ae.getLastRow(); r++) { + for (int c = ae.getFirstColumn(); c <= ae.getLastColumn(); c++) { + list.add(OperandResolver.getSingleValue(ae.getAbsoluteValue(r, c), r, c)); } } return list;