[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Thu Mar 6 12:45:24 PST 2014
sc/source/core/tool/token.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit ebdf24c6731ccffb6dbd6e3487cd919890c844b3
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Feb 14 20:39:18 2014 -0500
fdo#72691: Allow overwriting of string value with numeric one.
This can legitimately happen when you have a matrix with a reference to
another cell inside, and the referenced cell originally contained a
string value then later overwritten by a numeric value.
Example. Put a "Text" in A1, and in B1 put a 1x1 matrix {=A1}. It
displays "Text" in B1. Then put 11 in A1. Prior to this change, B1
would become blank. With this change, B1 will display 11.
Change-Id: I3feba3a8658e1a5ebf6f9e5ac34de2d579464ddb
(cherry picked from commit 9bf907a8278cecd816368db7b8c4ab745a914a59)
Reviewed-on: https://gerrit.libreoffice.org/8066
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 3dff6a9..cd14c4c 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1084,6 +1084,9 @@ void ScMatrixFormulaCellToken::SetUpperLeftDouble( double f )
case svDouble:
const_cast<FormulaToken*>(xUpperLeft.get())->GetDoubleAsReference() = f;
break;
+ case svString:
+ xUpperLeft = new FormulaDoubleToken( f);
+ break;
case svUnknown:
if (!xUpperLeft)
{
More information about the Libreoffice-commits
mailing list