[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Jun 13 22:09:04 PDT 2011
sc/source/core/tool/scmatrix.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 478533a86b29341e00128fb6eda8237dfb9cf3cf
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Jun 14 01:07:57 2011 -0400
Properly return empty string when asked, as it did previosly.
Refactoring of ScMatrix changed this behavior by accident. Let's
bring back the old behavior.
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index f90f782..e7a23e8 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -462,12 +462,15 @@ const String& ScMatrixImpl::GetString(SCSIZE nC, SCSIZE nR) const
{
if (ValidColRowOrReplicated( nC, nR ))
{
- if (maMat.get_type(nR, nC) == ::mdds::element_string)
- return *maMat.get_string(nR, nC);
- else
+ switch (maMat.get_type(nR, nC))
{
- SetErrorAtInterpreter( GetError(nC, nR));
- OSL_FAIL("ScMatrixImpl::GetString: access error, no string");
+ case ::mdds::element_string:
+ return *maMat.get_string(nR, nC);
+ case ::mdds::element_empty:
+ return ScGlobal::GetEmptyString();
+ default:
+ SetErrorAtInterpreter( GetError(nC, nR));
+ OSL_FAIL("ScMatrixImpl::GetString: access error, no string");
}
}
else
More information about the Libreoffice-commits
mailing list