[Libreoffice-commits] .: Branch 'feature/calc-matrix-rework' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Dec 16 16:28:17 PST 2010


 sc/source/core/tool/scmatrix.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e053bd2006b6e5d939426d02be26e35144c135f3
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Dec 16 19:27:09 2010 -0500

    Fixed a silly bug with serious consequences.
    
    This was causing the calculation of LINEST to be totally incorrect.

diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 652b26a..e67e067 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -634,8 +634,8 @@ void ScMatrixImpl::FillDouble( double fVal, SCSIZE nC1, SCSIZE nR1, SCSIZE nC2,
 {
     if (ValidColRow( nC1, nR1) && ValidColRow( nC2, nR2))
     {
-        for (SCSIZE i = nR1; i < nR2; ++i)
-            for (SCSIZE j = nC1; j < nC2; ++j)
+        for (SCSIZE i = nR1; i <= nR2; ++i)
+            for (SCSIZE j = nC1; j <= nC2; ++j)
                 maMat.set(i, j, fVal);
     }
     else


More information about the Libreoffice-commits mailing list