sc/source/core/tool/interpr4.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit ccc49b79a8425138d46e7be2acf3ef43b5aa232f Author: Eike Rathke <er...@redhat.com> Date: Fri May 20 18:21:10 2016 +0200 use vector replication for single row/column arrays ... also in GetStringFromMatrix() and GetDoubleOrStringFromMatrix(), not only in GetDoubleFromMatrix(). Change-Id: Idb4bd7d7ed7574cf80d2998d1e5bfa5a6015b833 diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index fb17217..6f3ba05 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -2154,12 +2154,11 @@ svl::SharedString ScInterpreter::GetStringFromMatrix(const ScMatrixRef& pMat) SCSIZE nCols, nRows, nC, nR; pMat->GetDimensions( nCols, nRows); pJumpMatrix->GetPos( nC, nR); - if ( nC < nCols && nR < nRows ) - { + // Use vector replication for single row/column arrays. + if ( (nC < nCols || nCols == 1) && (nR < nRows || nRows == 1) ) return pMat->GetString( *pFormatter, nC, nR); - } - else - SetError( errNoValue); + + SetError( errNoValue); } return svl::SharedString::getEmptyString(); } @@ -2200,7 +2199,8 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix( SCSIZE nCols, nRows, nC, nR; pMat->GetDimensions( nCols, nRows); pJumpMatrix->GetPos( nC, nR); - if ( nC < nCols && nR < nRows ) + // Use vector replication for single row/column arrays. + if ( (nC < nCols || nCols == 1) && (nR < nRows || nRows == 1) ) { nMatVal = pMat->Get( nC, nR); nMatValType = nMatVal.nType; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits