Files
odfstudio/formula
Tomaž Vajngerl 454999a9e9 sc: rewrite _xlfn.ANCHORARRAY on XLSX import to the # operator
The XLSX f-element stores the spilled-range operator as the
prefix call _xlfn.ANCHORARRAY(<ref>). The compiler did not
know the wrapper, so _xlfn.ANCHORARRAY(C2) + 10 imported as a
name error.

Map _xlfn.ANCHORARRAY to ocSpill in the OOXML symbol table so
the wrapper compiles to the same RPN as <ref>#. A new
liftAnchorArrayToPostfix pass then rewrites the source-order
parse array to <ref># so the cell reads back as <ref># in the
formula bar.

Token-level tests cover the lift on a bare reference and an
arithmetic composition, and a file-import test loads an XLSX
fixture to confirm cells read back as # inside UNIQUE and SUM.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I687150ac0bb26d02ced9297dc2039c15655d5c0a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5788
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 91e9a978c85458dc5a7c557588da1c402bc43887)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207906
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-10 01:09:43 +02:00
..
…
…
…

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.