The OOXML format marks an optional LAMBDA parameter with the _xlop. prefix in the parameter list, while the body refers to the same parameter through the _xlpm. prefix. Calc recognised only _xlpm., so an optional parameter kept its prefix, did not match the bare name used in the body, and lost the mark that made it optional. It failed to bind, and a call that left it out reported an error. Recognise _xlop. as a parameter marker and strip it to the bare name, so the declaration and the body references match. Carry the optional mark onto the parameter token so the compiled code treats it the same way as the native square-bracket form. Write an optional parameter back with the marker the grammar uses: the _xlop. prefix in OOXML and square brackets in the native grammars. Add a test that imports an optional parameter in the OOXML form and checks that ISOMITTED sees it as omitted and that concatenating it yields the other operand. Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Change-Id: Ia1df0fa6ca498f4c607507b3a865b3b367e5c11a Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5782 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com> (cherry picked from commit f198d7a984654aabd5e988d3c327da5552bc68e0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207891 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
Formula Helper Code
Contains parts of the formula parser used outside LibreOffice Calc code that has been pulled out from Calc's formula parser code.
Also contains some functions that are needed by code in both sc and
scaddins. Located here just for convenience. So sue me.