[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Wed Nov 12 14:09:15 PST 2014


 sc/source/core/tool/interpr4.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9807d4498cd0c759019e36c822bca3b5ea563600
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Nov 12 23:04:24 2014 +0100

    fdo#86219 use vector replication when obtaining scalar for jump matrix
    
    Change-Id: Id778dd7f649b480538fe757aab70c5e890123f31

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 276713b..2b2dd65 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);


More information about the Libreoffice-commits mailing list