sw/source/core/bastyp/calc.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
New commits: commit a15b9b44d933ef06efbc231d66b79815ba69ceff Author: Mike Kaganski <[email protected]> Date: Wed Nov 25 13:15:13 2015 +1000 tdf#61228: formatting and commenting Change-Id: Ic5d1090722945dce338973e9e3091546ed792057 Reviewed-on: https://gerrit.libreoffice.org/20160 Tested-by: Jenkins <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 8b12d87..7864657 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -1317,18 +1317,20 @@ SwSbxValue SwCalc::Prim() break; case CALC_NAME: - switch(SwCalcOper nOper = GetToken()) + switch(SwCalcOper eOper = GetToken()) { case CALC_ASSIGN: - { - SwCalcExp* n = VarInsert(aVarName); - GetToken(); - nErg = n->nValue = Expr(); - } - break; + { + SwCalcExp* n = VarInsert(aVarName); + GetToken(); + nErg = n->nValue = Expr(); + } + break; default: nErg = VarLook(aVarName)->nValue; - if (nErg.IsVoidValue() && (nOper == CALC_LP)) + // Explicitly disallow unknown function names (followed by "("), + // allow unknown variable names (equal to zero) + if (nErg.IsVoidValue() && (eOper == CALC_LP)) eError = CALC_SYNTAX; else bChkPow = true; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
