summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-06-14 01:07:57 -0400
committerJan Holesovsky <kendy@suse.cz>2011-06-17 16:05:41 +0200
commitd46d716461812e03f1bc8541aa8b486a4f7f54ba (patch)
tree1a853a49ac65e57b3459e39775da1a80af472239
parent18eaab9989d02e05e6c11e707107ad0a90c596eb (diff)
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. Signed-off-by: Jan Holesovsky <kendy@suse.cz>
-rw-r--r--sc/source/core/tool/scmatrix.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index b2f482647..fcdf412c1 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -463,12 +463,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));
- DBG_ERRORFILE("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