summaryrefslogtreecommitdiff
path: root/formula/source/core/api/token.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-02-20 17:42:03 +0100
committerEike Rathke <erack@redhat.com>2018-02-20 23:24:17 +0100
commita8d4d4b9edca48b8fb94dbb06d7dd1e689b07b98 (patch)
tree2afa06756b706cd7baf413fcdf55ce329369efe2 /formula/source/core/api/token.cxx
parent226697ae27ef451cad404256e83eef88262f16d1 (diff)
Resolves: tdf#115879 treat NOT as the 1-parameter function that it is
... instead of a low precedence unary operator with an odd behaviour. This wasn't documented nor specified but maybe needed for old(est) binary file format compatibility. Generate an error for anything else than a context of a function with one argument. There might be some corner cases of documents where some old usage leads to error now, of which some may have worked by accident, but some not as intended. Related, the internal not exposed (but available) NEG was classified similar as a unary operator but corectly handled as function at all places. Classified as an ordinary 1-parameter function as well. Change-Id: I3d84a6382243c8d64313e37346f81c857e71be95 Reviewed-on: https://gerrit.libreoffice.org/50055 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'formula/source/core/api/token.cxx')
-rw-r--r--formula/source/core/api/token.cxx1
1 files changed, 0 insertions, 1 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 13d6914392db..1d33b4d93571 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -92,7 +92,6 @@ bool FormulaToken::IsFunction() const
// FuncAutoPilot)
|| eOp == ocMacro || eOp == ocExternal // macros, AddIns
|| eOp == ocAnd || eOp == ocOr // former binary, now x parameters
- || eOp == ocNot || eOp == ocNeg // unary but function
|| (eOp >= ocInternalBegin && eOp <= ocInternalEnd) // internal
));
}