[Libreoffice-commits] .: Branch 'libreoffice-3-4-1' - sc/source
Petr Mladek
pmladek at kemper.freedesktop.org
Mon Jun 20 05:57:00 PDT 2011
sc/source/core/tool/scmatrix.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit c4b6d2f131cc9667f5a3b40c599ea386cf8225d8
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.
Signed-off-by: Jan Holesovsky <kendy at suse.cz>
Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Signed-off-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index b2f4826..fcdf412 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
More information about the Libreoffice-commits
mailing list