summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-11-22 09:51:32 +0100
committerJulien Nabet <serval2412@yahoo.fr>2015-11-22 09:24:34 +0000
commite110397a2816037b421bdcdeed0a2fdab5cd99d7 (patch)
tree3b2d311f7c863de1b9403030808f8a0adcdd689b /sw
parentb388be4ec8a23337af5569ded370773a7b93fa55 (diff)
tdf#95687: Wrong function names in Formula Writer are considered as SUM
New fix which deals with specific "foo" case Change-Id: I479b30abf22315ddca6151cba220574029cb1a91 Reviewed-on: https://gerrit.libreoffice.org/20113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/calc.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 1317ec2bb204..d3bdf5d7ea1c 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -713,7 +713,16 @@ SwCalcOper SwCalc::GetToken()
}
aVarName = aName;
eCurrOper = CALC_NAME;
- bSetError = false;
+ // Deal with specific "foo" case
+ if (sLowerCaseName.equals("foo"))
+ {
+ // "foo" function doesn't really exist but is sometimes used
+ // internally for setProperties method for example
+ // (see PythonTest_sw_python, set_expression)
+ bSetError = (sCommand.startsWith("foo("))?true:false;
+ }
+ else
+ bSetError = true;
}
else if ( aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING )
{