Kaydet (Commit) d667e321 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Mike Kaganski

tdf#61228: Wrong function names in Formula Writer are considered as SUM

Unknown names make the formula fail
PythonTest_sw_python, especially set_expression is ok
Variables are taken into account

Thanks to Mike Kaganski for his help on this patch.

Change-Id: Ia6f9c54d90ce88138fd9c9df9422b34ce8223ca2
Reviewed-on: https://gerrit.libreoffice.org/20122Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMike Kaganski <mikekaganski@hotmail.com>
üst 994d80fd
...@@ -1317,15 +1317,20 @@ SwSbxValue SwCalc::Prim() ...@@ -1317,15 +1317,20 @@ SwSbxValue SwCalc::Prim()
break; break;
case CALC_NAME: case CALC_NAME:
if( GetToken() == CALC_ASSIGN ) switch(SwCalcOper nOper = GetToken())
{ {
SwCalcExp* n = VarInsert( aVarName ); case CALC_ASSIGN:
{
SwCalcExp* n = VarInsert(aVarName);
GetToken(); GetToken();
nErg = n->nValue = Expr(); nErg = n->nValue = Expr();
} }
break;
default:
nErg = VarLook(aVarName)->nValue;
if (nErg.IsVoidValue() && (nOper == CALC_LP))
eError = CALC_SYNTAX;
else else
{
nErg = VarLook( aVarName )->nValue;
bChkPow = true; bChkPow = true;
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment