diff options
author | Eike Rathke <erack@redhat.com> | 2014-03-10 16:12:53 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-03-10 16:14:50 +0100 |
commit | d4cc603a5f80af746a5f381f28cfa049af5b314a (patch) | |
tree | 75a3041b3d8a22868ab289663b22dfe6fad64213 | |
parent | d7e34f117cfd0f651d3e723baa09528968daf2dd (diff) |
ISO.CEILING without _xlfn. prefix, it is defined in OOXML, fdo#71720 follow-up
Change-Id: I486261d34d62bc5eda0a202cbb1dcb875ffcf39b
-rw-r--r-- | formula/source/core/resource/core_resource.src | 2 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xlformula.cxx | 14 | ||||
-rw-r--r-- | sc/source/filter/oox/formulabase.cxx | 6 |
4 files changed, 13 insertions, 11 deletions
diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src index 30e8d16b6401..28ecee3ee5bc 100644 --- a/formula/source/core/resource/core_resource.src +++ b/formula/source/core/resource/core_resource.src @@ -550,7 +550,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML String SC_OPCODE_ARC_TAN_2 { Text = "ATAN2" ; }; String SC_OPCODE_CEIL { Text = "CEILING" ; }; String SC_OPCODE_CEIL_MS { Text = "_xlfn.CEILING.PRECISE" ; }; - String SC_OPCODE_CEIL_ISO { Text = "_xlfn.ISO.CEILING" ; }; + String SC_OPCODE_CEIL_ISO { Text = "ISO.CEILING" ; }; String SC_OPCODE_FLOOR_MS { Text = "_xlfn.FLOOR.PRECISE" ; }; String SC_OPCODE_FLOOR { Text = "FLOOR" ; }; String SC_OPCODE_ROUND { Text = "ROUND" ; }; diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 2c257a892719..f22e1e2a2173 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -425,7 +425,7 @@ void ScFiltersTest::testFunctionsExcel2010() { 7, true }, { 8, true }, { 9, true }, - { 10, false }, //fdo71720 to be set to true once functions-Excel-2010.xlsx has been rectified + { 10, true }, { 11, true }, { 12, true }, { 13, true }, diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index 2ac4b6987a69..c000ff15e08a 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -380,6 +380,11 @@ static const XclFunctionInfo saFuncTable_8[] = { ocEuroConvert, 255, 4, 6, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY, "EUROCONVERT" } }; + +#define EXC_FUNCENTRY_V_VR( opcode, minparam, maxparam, flags, asciiname ) \ + { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \ + { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) } + /** Functions new in OOXML. */ static const XclFunctionInfo saFuncTable_Oox[] = { @@ -392,13 +397,11 @@ static const XclFunctionInfo saFuncTable_Oox[] = { ocAverageIfs, NOID, 3, MX, V, { RO, RO, VR }, EXC_FUNCFLAG_IMPORTONLY|EXC_FUNCFLAG_PARAMPAIRS, EXC_FUNCNAME( "AVERAGEIFS" ) }, { ocAverageIfs, 255, 4, MX, V, { RO_E, RO, RO, VR }, EXC_FUNCFLAG_EXPORTONLY|EXC_FUNCFLAG_PARAMPAIRS, EXC_FUNCNAME( "AVERAGEIFS" ) }, { ocIfError, NOID, 2, 2, V, { VO, RO }, EXC_FUNCFLAG_IMPORTONLY, EXC_FUNCNAME( "IFERROR" ) }, - { ocIfError, 255, 3, 3, V, { RO_E, VO, RO }, EXC_FUNCFLAG_EXPORTONLY, EXC_FUNCNAME( "IFERROR" ) } -}; + { ocIfError, 255, 3, 3, V, { RO_E, VO, RO }, EXC_FUNCFLAG_EXPORTONLY, EXC_FUNCNAME( "IFERROR" ) }, + EXC_FUNCENTRY_V_VR( ocCeil_ISO, 2, 2, 0, "ISO.CEILING" ), +}; -#define EXC_FUNCENTRY_V_VR( opcode, minparam, maxparam, flags, asciiname ) \ - { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \ - { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) } #define EXC_FUNCENTRY_V_VR_IMPORT( opcode, minparam, maxparam, flags, asciiname ) \ { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) } @@ -483,7 +486,6 @@ static const XclFunctionInfo saFuncTable_2010[] = EXC_FUNCENTRY_V_VR( ocNegBinomDist_MS, 4, 4, 0, "NEGBINOM.DIST" ), EXC_FUNCENTRY_V_VR( ocZTest_MS, 2, 3, 0, "Z.TEST" ), EXC_FUNCENTRY_V_VR( ocCeil_MS, 2, 2, 0, "CEILING.PRECISE" ), - EXC_FUNCENTRY_V_VR( ocCeil_ISO, 2, 2, 0, "ISO.CEILING" ), EXC_FUNCENTRY_V_VR( ocFloor_MS, 2, 2, 0, "FLOOR.PRECISE" ) }; diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 4b8ed7ed9ca5..b44f605f748f 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -197,7 +197,7 @@ const size_t FUNCINFO_PARAMINFOCOUNT = 5; /// Number of parameter const sal_uInt16 FUNCFLAG_VOLATILE = 0x0001; /// Result is volatile (e.g. NOW() function). const sal_uInt16 FUNCFLAG_IMPORTONLY = 0x0002; /// Only used in import filter. const sal_uInt16 FUNCFLAG_EXPORTONLY = 0x0004; /// Only used in export filter. -const sal_uInt16 FUNCFLAG_MACROCALL = 0x0008; /// Function is stored as macro call in Excel (_xlfn. prefix). OOXML name MUST exist. +const sal_uInt16 FUNCFLAG_MACROCALL = 0x0008; /// Function is stored as macro call in BIFF Excel (_xlfn. prefix). OOXML name MUST exist. const sal_uInt16 FUNCFLAG_MACROCALLODF = 0x0010; /// ODF-only function stored as macro call in BIFF Excel (_xlfnodf. prefix). ODF name MUST exist. const sal_uInt16 FUNCFLAG_EXTERNAL = 0x0020; /// Function is external in Calc. const sal_uInt16 FUNCFLAG_MACROFUNC = 0x0040; /// Function is a macro-sheet function. @@ -725,7 +725,8 @@ static const FunctionData saFuncTableOox[] = { "COUNTIFS", "COUNTIFS", 481, NOID, 2, MX, V, { RO, VR }, FUNCFLAG_MACROCALL | FUNCFLAG_PARAMPAIRS }, { "SUMIFS", "SUMIFS", 482, NOID, 3, MX, V, { RO, RO, VR }, FUNCFLAG_MACROCALL | FUNCFLAG_PARAMPAIRS }, { "AVERAGEIF", "AVERAGEIF", 483, NOID, 2, 3, V, { RO, VR, RO }, FUNCFLAG_MACROCALL }, - { "AVERAGEIFS", "AVERAGEIFS", 484, NOID, 3, MX, V, { RO, RO, VR }, FUNCFLAG_MACROCALL | FUNCFLAG_PARAMPAIRS } + { "AVERAGEIFS", "AVERAGEIFS", 484, NOID, 3, MX, V, { RO, RO, VR }, FUNCFLAG_MACROCALL | FUNCFLAG_PARAMPAIRS }, + { "COM.MICROSOFT.ISO.CEILING", "ISO.CEILING", NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALL } }; /** Functions new in Excel 2010. @@ -801,7 +802,6 @@ static const FunctionData saFuncTable2010[] = { "COM.MICROSOFT.NEGBINOM.DIST", "NEGBINOM.DIST", NOID, NOID, 4, 4, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.Z.TEST", "Z.TEST", NOID, NOID, 2, 3, V, { RX, VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.CEILING.PRECISE", "CEILING.PRECISE", NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALL_NEW }, - { "COM.MICROSOFT.ISO.CEILING", "ISO.CEILING", NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.FLOOR.PRECISE", "FLOOR.PRECISE", NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALL_NEW } }; |