diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-06 21:15:27 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-04-08 18:09:06 +0200 |
commit | 8cea1db917b44ffe731af84b90c3470553d91adc (patch) | |
tree | cd49a61c798c87d853d8b5adc51cd4e58359d340 /sc | |
parent | 695d36f31cf3d56f97ef04e8503854ebb9e57846 (diff) |
Resolves: tdf#100011 (re-)add ocCeil and ocFloor .xls(x) export mappings
This is a combination of 2 commits.
Resolves: tdf#100011 (re-)add ocCeil and ocFloor .xls(x) export mappings
... for CEILING and FLOOR that were lost when introducing CEILING.MATH
and FLOOR.MATH which are semantically identical, but the export needs a
distinct known mapping otherwise the function is stored as a macro call,
which Excel dislikes.
(cherry picked from commit ea01a08763e56a7de66f0c24655a627669c8a7f7)
these FUNCFLAG_EXPORTONLY need also FUNCFLAG_MACROCALL_NEW, tdf#100011 related
Maybe one day we'll actually use these tables also for export
capabilities ...
(cherry picked from commit 4dd95cadcd330aee49b3c84d3e336b808217af46)
f3d55ec008e321d95b21e0d284c7d58d13a2399b
Change-Id: Id371c1732984a8e5567f74fd265b9aee88fb1898
Reviewed-on: https://gerrit.libreoffice.org/36233
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
(cherry picked from commit 84c3729eb210ff255761c4613ba03c4fb5e949f8)
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xlformula.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/oox/formulabase.cxx | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index f22a259693a9..7f83306dc659 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -408,6 +408,9 @@ static const XclFunctionInfo saFuncTable_Oox[] = #define EXC_FUNCENTRY_V_VR_IMPORT( opcode, minparam, maxparam, flags, asciiname ) \ { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) } +#define EXC_FUNCENTRY_V_RO_EXPORT( opcode, minparam, maxparam, flags, asciiname ) \ + { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) } + #define EXC_FUNCENTRY_A_VR( opcode, minparam, maxparam, flags, asciiname ) \ { opcode, NOID, minparam, maxparam, A, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \ { opcode, 255, (minparam)+1, (maxparam)+1, A, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) } @@ -524,6 +527,7 @@ static const XclFunctionInfo saFuncTable_2013[] = EXC_FUNCENTRY_V_VR( ocBitRshift, 2, 2, 0, "BITRSHIFT" ), EXC_FUNCENTRY_V_VR( ocBitXor, 2, 2, 0, "BITXOR" ), EXC_FUNCENTRY_V_VR( ocCeil_Math, 1, 3, 0, "CEILING.MATH" ), + EXC_FUNCENTRY_V_RO_EXPORT( ocCeil, 1, 3, 0, "CEILING.MATH" ), EXC_FUNCENTRY_V_VR( ocCombinA, 2, 2, 0, "COMBINA" ), EXC_FUNCENTRY_V_VR_IMPORT( ocCot, 1, 1, 0, "COT" ), EXC_FUNCENTRY_V_VR_IMPORT( ocCotHyp, 1, 1, 0, "COTH" ), @@ -538,6 +542,7 @@ static const XclFunctionInfo saFuncTable_2013[] = EXC_FUNCENTRY_V_VR( ocNoName, 3, 3, 0, "FINV" ), EXC_FUNCENTRY_V_VR( ocFilterXML, 2, 2, 0, "FILTERXML" ), EXC_FUNCENTRY_V_VR( ocFloor_Math, 1, 3, 0, "FLOOR.MATH" ), + EXC_FUNCENTRY_V_RO_EXPORT( ocFloor, 1, 3, 0, "FLOOR.MATH" ), EXC_FUNCENTRY_V_RO( ocFormula, 1, 1, 0, "FORMULATEXT" ), EXC_FUNCENTRY_V_VR( ocGamma, 1, 1, 0, "GAMMA" ), EXC_FUNCENTRY_V_VR( ocGauss, 1, 1, 0, "GAUSS" ), diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 6247aaf3b89c..c7fba5d04508 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -785,7 +785,7 @@ static const FunctionData saFuncTable2013[] = { "BITRSHIFT", "BITRSHIFT", NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "BITXOR", "BITXOR", NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.CEILING.MATH", "CEILING.MATH", NOID, NOID, 1, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW }, - { "CEILING", "CEILING.MATH", NOID, NOID, 1, 3, V, { VR }, FUNCFLAG_EXPORTONLY }, + { "CEILING", "CEILING.MATH", NOID, NOID, 1, 3, V, { VR }, FUNCFLAG_EXPORTONLY | FUNCFLAG_MACROCALL_NEW }, { "COMBINA", "COMBINA", NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COT", "COT", NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COTH", "COTH", NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALL_NEW }, @@ -796,7 +796,7 @@ static const FunctionData saFuncTable2013[] = { "COM.MICROSOFT.ENCODEURL","ENCODEURL", NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.FILTERXML","FILTERXML", NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.FLOOR.MATH", "FLOOR.MATH", NOID, NOID, 1, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW }, - { "FLOOR", "FLOOR.MATH", NOID, NOID, 1, 3, V, { VR }, FUNCFLAG_EXPORTONLY }, + { "FLOOR", "FLOOR.MATH", NOID, NOID, 1, 3, V, { VR }, FUNCFLAG_EXPORTONLY | FUNCFLAG_MACROCALL_NEW }, // NOTE: this FDIST is not our LEGACY.FDIST { nullptr/*"FDIST"*/, "FDIST", NOID, NOID, 3, 4, V, { VR }, FUNCFLAG_MACROCALL_NEW }, // NOTE: this FINV is not our LEGACY.FINV |