[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Jun 17 07:06:44 PDT 2011
sc/source/core/tool/scmatrix.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit d46d716461812e03f1bc8541aa8b486a4f7f54ba
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>
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