[Libreoffice-commits] .: sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Tue Nov 1 14:40:57 PDT 2011
sc/source/core/tool/scmatrix.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit cf0dd2113527ba0a601c5c59de7f7f44da161d21
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)
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 6044003..1767fce 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -591,8 +591,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