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

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Nov 1 18:53:31 PDT 2011


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

New commits:
commit 65d15137bae588574107680846097fe5c4d7c533
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Nov 1 21:56:10 2011 +0100

    prevent access to non existing mdds elements (fdo#41807)
    
    Signed-off-by: Kohei Yoshida <kohei.yoshida at suse.com>

diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index ac1c7a4..3074e36 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -592,8 +592,10 @@ bool ScMatrixImpl::IsEmpty( SCSIZE nC, SCSIZE nR ) const
 bool ScMatrixImpl::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
 {
     // 'Empty path' is empty plus non-zero flag.
-    ValidColRowReplicated( nC, nR );
-    return maMat.get_type(nR, nC) == ::mdds::element_empty && maMat.get_flag(nR, nC) != 0;
+    if (ValidColRowReplicated( nC, nR ))
+        return maMat.get_type(nR, nC) == ::mdds::element_empty && maMat.get_flag(nR, nC) != 0;
+    else
+        return true;
 }
 
 bool ScMatrixImpl::IsValue( SCSIZE nIndex ) const


More information about the Libreoffice-commits mailing list