[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sc/source

Eike Rathke erack at redhat.com
Wed Nov 12 15:51:05 PST 2014


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

New commits:
commit daf0827f8a13381065d124e9bc46fa36f9cc6e0d
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
    (cherry picked from commit 9807d4498cd0c759019e36c822bca3b5ea563600)
    Reviewed-on: https://gerrit.libreoffice.org/12394
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 09ea671..66e02ea 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);


More information about the Libreoffice-commits mailing list