sc/source/core/tool/interpr5.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
New commits: commit 38e247046ec38cdab0f7d56614a183dcfc49389c Author: Åukasz Hryniuk <lukasz.hryn...@wp.pl> Date: Sun Mar 22 17:22:29 2015 +0100 tdf#89387 Change summing loop to SumSquare method Change-Id: I996a984763f9fece9074f8bc318db25f01b8f4ed Reviewed-on: https://gerrit.libreoffice.org/14954 Tested-by: David Tardon <dtar...@redhat.com> Reviewed-by: David Tardon <dtar...@redhat.com> diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 81bcdfc..c030c8d 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1786,14 +1786,8 @@ void ScInterpreter::ScSumXMY2() } else { - double fVal, fSum = 0.0; - SCSIZE nCount = pResMat->GetElementCount(); - for (SCSIZE i = 0; i < nCount; i++) - if (!pResMat->IsString(i)) - { - fVal = pResMat->GetDouble(i); - fSum += fVal * fVal; - } + ScMatrix::IterateResult aRes = pResMat->SumSquare(false); + double fSum = aRes.mfRest; PushDouble(fSum); } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits