summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-08-20 01:12:05 +0200
committerEike Rathke <erack@redhat.com>2020-08-20 02:14:40 +0200
commitff3955db7161b8644699d7a0128ec4a6e7e525ec (patch)
tree549319e70b5e4bf1077ea7a24ac87db7e67bfe55 /sc
parente69fafe1873e4afbe739f21f7a82a069cf7eb5b2 (diff)
Resolves: tdf#109409 TEXTJOIN() CONCAT() handle array/matrix row-wise
... like references, instead of column-wise. Change-Id: If3ada9b197dd15c95b0da50464c70844fb7685ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101034 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr8.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 95580dde72db..1ab5a79aee30 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1474,9 +1474,9 @@ void ScInterpreter::ScConcat_MS()
SetError(FormulaError::IllegalArgument);
else
{
- for ( SCSIZE j = 0; j < nC; j++ )
+ for (SCSIZE k = 0; k < nR; ++k)
{
- for (SCSIZE k = 0; k < nR; k++ )
+ for (SCSIZE j = 0; j < nC; ++j)
{
if ( pMat->IsStringOrEmpty( j, k ) )
{
@@ -1603,9 +1603,9 @@ void ScInterpreter::ScTextJoin_MS()
SetError(FormulaError::IllegalArgument);
else
{
- for ( SCSIZE j = 0; j < nC; j++ )
+ for (SCSIZE k = 0; k < nR; ++k)
{
- for (SCSIZE k = 0; k < nR; k++ )
+ for (SCSIZE j = 0; j < nC; ++j)
{
if ( !pMat->IsEmpty( j, k ) )
{
@@ -1783,9 +1783,9 @@ void ScInterpreter::ScTextJoin_MS()
else
{
OUString aStr;
- for ( SCSIZE j = 0; j < nC; j++ )
+ for (SCSIZE k = 0; k < nR; ++k)
{
- for (SCSIZE k = 0; k < nR; k++ )
+ for (SCSIZE j = 0; j < nC; ++j)
{
if ( !pMat->IsEmpty( j, k ) )
{