summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-11-12 23:04:24 +0100
committerKohei Yoshida <libreoffice@kohei.us>2014-11-12 23:50:36 +0000
commitdaf0827f8a13381065d124e9bc46fa36f9cc6e0d (patch)
tree1b9eb344e1b45a3c310b734dda6e7d3dc30a2ac6
parent4e45ae074b56922da08d21142c4465730f024954 (diff)
fdo#86219 use vector replication when obtaining scalar for jump matrix
Change-Id: Id778dd7f649b480538fe757aab70c5e890123f31 (cherry picked from commit 9807d4498cd0c759019e36c822bca3b5ea563600) Reviewed-on: https://gerrit.libreoffice.org/12394 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-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 09ea67185b76..66e02ea7a8b0 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -2207,7 +2207,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);