]> source.dussan.org Git - poi.git/commitdiff
fix TextJoin use case that was not handled
authorPJ Fanning <fanningpj@apache.org>
Sat, 7 Aug 2021 10:32:22 +0000 (10:32 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 7 Aug 2021 10:32:22 +0000 (10:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892062 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java

index 1148267b63a1b58be8a1312d0561ba4671e6bd04..5c64fd8bcd6f7ea4b69c7cfa3356987c968b899c 100644 (file)
@@ -104,9 +104,9 @@ final class TextJoinFunction implements FreeRefFunction {
         if (eval instanceof AreaEval) {
             AreaEval ae = (AreaEval)eval;
             List<ValueEval> 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;