summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2024-12-23 20:21:47 +0100
committerEike Rathke <erack@redhat.com>2024-12-24 00:21:18 +0100
commitf91f3484bbac46ed762bf9ff356b690224e20096 (patch)
tree094d98123af7ac019345b581217bb63b56b1f44d
parentce67fc823880ac81dbf66f66c97fde21e9e5a733 (diff)
Excel im-/export function name mapping for EASTERSUNDAY, tdf#162177 follow-up
Which isn't exactly needed because compiler uses RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML but the mapping is used for css::sheet::XFormulaOpCodeMapper even if that is almost (?) dead in Excel context. Gave warnings like warn: sc:566679:566679:sc/source/filter/oox/formulabase.cxx:1381: OpCodeProviderImpl: :initFuncOpCode - no opcode mapping for function ODF 'ORG.OPENOFFICE.EASTERSUNDAY' <-> OOXML '_xlfn.ORG.OPENOFFICE.EASTERSUNDAY' Change-Id: I0e7a74ef24fd03bd533b486bd11dab1f6287e2c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179262 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/filter/oox/formulabase.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index 739fc213fd15..e2c4ee475d6e 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -920,14 +920,20 @@ const FunctionData saFuncTableOOoLO[] =
{ "ORG.OPENOFFICE.ERRORTYPE", "ORG.OPENOFFICE.ERRORTYPE", NOID, NOID, 1, 1, V, { VR }, FuncFlags::MACROCALL_NEW },
{ "ORG.OPENOFFICE.MULTIRANGE", "ORG.OPENOFFICE.MULTIRANGE", NOID, NOID, 1, MX, V, { RX }, FuncFlags::MACROCALL_NEW },
{ "ORG.OPENOFFICE.GOALSEEK", "ORG.OPENOFFICE.GOALSEEK", NOID, NOID, 3, 3, V, { VR }, FuncFlags::MACROCALL_NEW },
- { "ORG.OPENOFFICE.EASTERSUNDAY","ORG.OPENOFFICE.EASTERSUNDAY", NOID, NOID, 1, 1, V, { VR }, FuncFlags::MACROCALL_NEW },
+ // EASTERSUNDAY is defined as of ODFF 1.4 (was ORG.OPENOFFICE.EASTERSUNDAY).
+ // Note that we still write it as _xlfn.ORG.OPENOFFICE.EASTERSUNDAY through
+ // RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML because Excel _might_ expect it
+ // (does it?).
+ { "EASTERSUNDAY", "EASTERSUNDAY", NOID, NOID, 1, 1, V, { VR }, FuncFlags::MACROCALL_NEW },
+ { "EASTERSUNDAY", "ORG.OPENOFFICE.EASTERSUNDAY", NOID, NOID, 1, 1, V, { VR }, FuncFlags::MACROCALL_NEW | FuncFlags::IMPORTONLY },
{ "ORG.OPENOFFICE.CURRENT", "ORG.OPENOFFICE.CURRENT", NOID, NOID, 0, 0, V, { VR }, FuncFlags::MACROCALL_NEW },
{ "ORG.OPENOFFICE.STYLE", "ORG.OPENOFFICE.STYLE", NOID, NOID, 1, 3, V, { VR }, FuncFlags::MACROCALL_NEW },
// And the import for the wrongly written functions even without _xlfn.
{ "ORG.OPENOFFICE.ERRORTYPE", "ERRORTYPE", NOID, NOID, 1, 1, V, { VR }, FuncFlags::IMPORTONLY },
{ "ORG.OPENOFFICE.MULTIRANGE", "MULTIRANGE", NOID, NOID, 1, MX, V, { RX }, FuncFlags::IMPORTONLY },
{ "ORG.OPENOFFICE.GOALSEEK", "GOALSEEK", NOID, NOID, 3, 3, V, { VR }, FuncFlags::IMPORTONLY },
- { "ORG.OPENOFFICE.EASTERSUNDAY","EASTERSUNDAY", NOID, NOID, 1, 1, V, { VR }, FuncFlags::IMPORTONLY },
+ // EASTERSUNDAY is defined as of ODFF 1.4
+ { "EASTERSUNDAY", "EASTERSUNDAY", NOID, NOID, 1, 1, V, { VR }, FuncFlags::IMPORTONLY },
{ "ORG.OPENOFFICE.CURRENT", "CURRENT", NOID, NOID, 0, 0, V, { VR }, FuncFlags::IMPORTONLY },
{ "ORG.OPENOFFICE.STYLE", "STYLE", NOID, NOID, 1, 3, V, { VR }, FuncFlags::IMPORTONLY },
// Other functions.