summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-11-12 23:04:24 +0100
committerEike Rathke <erack@redhat.com>2014-11-12 23:08:43 +0100
commit9807d4498cd0c759019e36c822bca3b5ea563600 (patch)
tree0062f2089e503769452df0d788ff8ce3dee2d294
parent187ffc5e9966c3f2c09965b5ab8ebb43e12300e9 (diff)
fdo#86219 use vector replication when obtaining scalar for jump matrix
Change-Id: Id778dd7f649b480538fe757aab70c5e890123f31
-rw-r--r--sc/source/core/tool/interpr4.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 276713b52e50..2b2dd651f2e6 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -2160,7 +2160,8 @@ double ScInterpreter::GetDoubleFromMatrix(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->GetDouble( nC, nR);
SetError( errNoValue);