core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source
formula/inc/core_resource.hrc |8 formula/source/core/api/FormulaCompiler.cxx | 26 formula/source/core/api/token.cxx | 25 formula/source/ui/dlg/parawin.cxx |9 include/formula/FormulaCompiler.hxx |7 include/formula/compiler.hxx|2 include/formula/opcode.hxx |4 include/formula/tokenarray.hxx |3 sc/README.md|2 sc/inc/compiler.hxx |3 sc/inc/helpids.h|1 sc/inc/scfuncs.hrc | 12 sc/qa/extras/scfunctionlistobj.cxx |2 sc/qa/unit/data/functions/spreadsheet/fods/let.fods | 4308 sc/qa/unit/data/xlsx/tdf137543.xlsx |binary sc/qa/unit/subsequent_export_test2.cxx | 14 sc/qa/unit/ucalc.cxx|1 sc/source/core/data/funcdesc.cxx|5 sc/source/core/inc/interpre.hxx |8 sc/source/core/tool/compiler.cxx| 40 sc/source/core/tool/interpr1.cxx| 147 sc/source/core/tool/interpr4.cxx|1 sc/source/core/tool/parclass.cxx|3 sc/source/core/tool/token.cxx | 16 sc/source/filter/excel/xlformula.cxx|3 sc/source/filter/oox/formulabase.cxx|1 26 files changed, 4641 insertions(+), 10 deletions(-) New commits: commit 521a56d8d1e12b7471fda6b62b21d51776c9fbaf Author: Balazs Varga AuthorDate: Thu May 30 18:43:09 2024 +0200 Commit: Balazs Varga CommitDate: Thu Jun 6 09:09:47 2024 +0200 tdf#137543 - Add new LET function to Calc Add new LET function to Calc which assigns names to calculation results. TODO: oasis proposal Change-Id: Ia0d56a30751a44a72e364a28b64fd8f617e997dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168349 Tested-by: Gabor Kelemen Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc index 081f71b56772..45e0aa62507d 100644 --- a/formula/inc/core_resource.hrc +++ b/formula/inc/core_resource.hrc @@ -282,6 +282,8 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] = { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT }, { "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY }, { "COM.MICROSOFT.UNIQUE" , SC_OPCODE_UNIQUE }, +{ "COM.MICROSOFT.LET" , SC_OPCODE_LET }, +{ "_xlpm." , SC_OPCODE_STRINGNAME }, { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -737,6 +739,8 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] = { "_xlfn._xlws.SORT" , SC_OPCODE_SORT }, { "_xlfn.SORTBY" , SC_OPCODE_SORTBY }, { "_xlfn.UNIQUE" , SC_OPCODE_UNIQUE }, +{ "_xlfn.LET" , SC_OPCODE_LET }, +{ "_xlpm." , SC_OPCODE_STRINGNAME }, { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -1195,6 +1199,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] = { "SORT" , SC_OPCODE_SORT }, { "SORTBY" , SC_OPCODE_SORTBY }, { "UNIQUE" , SC_OPCODE_UNIQUE }, +{ "LET" , SC_OPCODE_LET }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -1654,6 +1659,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] = { "SORT" , SC_OPCODE_SORT }, { "SORTBY" , SC_OPCODE_SORTBY }, { "UNIQUE" , SC_OPCODE_UNIQUE }, +{ "LET" , SC_OPCODE_LET }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, // ?? first character = I ?? @@ -2111,6 +2117,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH[] = { "SORT" , SC_OPCODE_SORT }, { "SORTBY" , SC_OPCODE_SORTBY }, { "UNIQUE" , SC_OPCODE_UNIQUE }, +{ "LET" , SC_OPCODE_LET }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA }, { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -2549,6 +2556,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES[] = { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT }, { NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY }, { NC_("RID_STRLIST_FUNCTION_NAMES", "UNIQUE") , SC_OPCODE_UNIQUE }, +{ NC_("RID_STRLIST_FUNCTION_NAMES", "LET") , SC_OPCODE_LET }, { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) {
core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source
formula/inc/core_resource.hrc |6 formula/source/core/api/FormulaCompiler.cxx|1 include/formula/compiler.hxx |3 include/formula/opcode.hxx |2 sc/README.md |1 sc/inc/helpids.h |1 sc/inc/scfuncs.hrc | 12 sc/qa/extras/scfunctionlistobj.cxx |2 sc/qa/unit/data/functions/spreadsheet/fods/unique.fods | 5082 + sc/qa/unit/ucalc.cxx |1 sc/source/core/data/funcdesc.cxx |1 sc/source/core/inc/interpre.hxx|1 sc/source/core/tool/interpr1.cxx | 142 sc/source/core/tool/interpr4.cxx |1 sc/source/core/tool/parclass.cxx |1 sc/source/core/tool/token.cxx |1 sc/source/filter/excel/xlformula.cxx |3 sc/source/filter/oox/formulabase.cxx |1 18 files changed, 5259 insertions(+), 3 deletions(-) New commits: commit c1565b8b94548ef85508b0302ef9299f18ff09be Author: Balazs Varga AuthorDate: Fri May 10 17:06:39 2024 +0200 Commit: Balazs Varga CommitDate: Wed May 15 18:10:54 2024 +0200 tdf#126573 Add Excel2021 array function UNIQUE to Calc Add new function called UNIQUE to the function list. (TODO: dynamic array in separate patch, oasis proposal) Change-Id: Ie138aee545995d4af1e66be5a4cf4e99e6e2f581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167484 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc index 81c1e32fd38e..081f71b56772 100644 --- a/formula/inc/core_resource.hrc +++ b/formula/inc/core_resource.hrc @@ -281,6 +281,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] = { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER }, { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT }, { "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY }, +{ "COM.MICROSOFT.UNIQUE" , SC_OPCODE_UNIQUE }, { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -735,6 +736,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] = { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER }, { "_xlfn._xlws.SORT" , SC_OPCODE_SORT }, { "_xlfn.SORTBY" , SC_OPCODE_SORTBY }, +{ "_xlfn.UNIQUE" , SC_OPCODE_UNIQUE }, { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -1192,6 +1194,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] = { "FILTER" , SC_OPCODE_FILTER }, { "SORT" , SC_OPCODE_SORT }, { "SORTBY" , SC_OPCODE_SORTBY }, +{ "UNIQUE" , SC_OPCODE_UNIQUE }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -1650,6 +1653,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] = { "FILTER" , SC_OPCODE_FILTER }, { "SORT" , SC_OPCODE_SORT }, { "SORTBY" , SC_OPCODE_SORTBY }, +{ "UNIQUE" , SC_OPCODE_UNIQUE }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, // ?? first character = I ?? @@ -2106,6 +2110,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH[] = { "FILTER" , SC_OPCODE_FILTER }, { "SORT" , SC_OPCODE_SORT }, { "SORTBY" , SC_OPCODE_SORTBY }, +{ "UNIQUE" , SC_OPCODE_UNIQUE }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA }, { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -2543,6 +2548,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES[] = { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER }, { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT }, { NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY }, +{ NC_("RID_STRLIST_FUNCTION_NAMES", "UNIQUE") , SC_OPCODE_UNIQUE }, { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { NC_("RID_STRLIST_FUNCTION_NAMES", "OFFSET") , SC_OPCODE_OFFSET }, { NC_("RID_STRLIST_FUNCTION_NAMES", "INDEX") , SC_OPCODE_INDEX }, // ?? first character = I ?? diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 3157e767c5aa..e10e8f6a0f95 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1237,6 +1237,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source
formula/inc/core_resource.hrc |6 formula/source/core/api/FormulaCompiler.cxx |3 include/formula/compiler.hxx |3 include/formula/opcode.hxx|2 sc/README.md |1 sc/inc/helpids.h |1 sc/inc/scfuncs.hrc| 16 sc/qa/extras/scfunctionlistobj.cxx|2 sc/qa/unit/data/functions/spreadsheet/fods/randarray.fods | 4106 ++ sc/qa/unit/ucalc.cxx |1 sc/source/core/data/funcdesc.cxx |1 sc/source/core/inc/interpre.hxx |2 sc/source/core/tool/interpr1.cxx | 81 sc/source/core/tool/interpr4.cxx | 10 sc/source/core/tool/parclass.cxx |1 sc/source/core/tool/token.cxx |1 sc/source/filter/excel/xlformula.cxx |3 sc/source/filter/oox/formulabase.cxx |1 18 files changed, 4237 insertions(+), 4 deletions(-) New commits: commit d68f2394afc3372d867ea6157123e51b278ba81b Author: Balazs Varga AuthorDate: Thu May 2 11:03:37 2024 +0200 Commit: Balazs Varga CommitDate: Wed May 8 17:45:36 2024 +0200 tdf#126573 Add Excel2021 array function RANDARRAY to Calc Add new function called RANDARRAY to the function list. (TODO: dynamic array in separate patch, oasis proposal) Change-Id: I34bad3b7e8d631d649a0350d7c1170b26161331d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167003 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Balazs Varga diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc index ec1f81699e7f..81c1e32fd38e 100644 --- a/formula/inc/core_resource.hrc +++ b/formula/inc/core_resource.hrc @@ -475,6 +475,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] = { "ORG.LIBREOFFICE.FOURIER", SC_OPCODE_FOURIER }, { "ORG.LIBREOFFICE.RAND.NV" , SC_OPCODE_RANDOM_NV }, { "ORG.LIBREOFFICE.RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV }, +{ "COM.MICROSOFT.RANDARRAY" , SC_OPCODE_RANDARRAY }, { nullptr, -1 } }; @@ -927,6 +928,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] = { "_xlfn.ORG.LIBREOFFICE.FOURIER", SC_OPCODE_FOURIER }, { "_xlfn.ORG.LIBREOFFICE.RAND.NV" , SC_OPCODE_RANDOM_NV }, { "_xlfn.ORG.LIBREOFFICE.RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV }, +{ "_xlfn.RANDARRAY" , SC_OPCODE_RANDARRAY }, { nullptr, -1 } }; @@ -1384,6 +1386,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] = { "FOURIER", SC_OPCODE_FOURIER }, { "RAND.NV" , SC_OPCODE_RANDOM_NV }, { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV }, +{ "RANDARRAY" , SC_OPCODE_RANDARRAY }, { nullptr, -1 } }; @@ -1840,6 +1843,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] = { "FOURIER", SC_OPCODE_FOURIER }, { "RAND.NV" , SC_OPCODE_RANDOM_NV }, { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV }, +{ "RANDARRAY" , SC_OPCODE_RANDARRAY }, { nullptr, -1 } }; @@ -2295,6 +2299,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH[] = { "FOURIER", SC_OPCODE_FOURIER }, { "RAND.NV" , SC_OPCODE_RANDOM_NV }, { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV }, +{ "RANDARRAY" , SC_OPCODE_RANDARRAY }, { nullptr, -1 } }; @@ -2747,6 +2752,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES[] = { NC_("RID_STRLIST_FUNCTION_NAMES", "FOURIER"), SC_OPCODE_FOURIER }, { NC_("RID_STRLIST_FUNCTION_NAMES", "RAND.NV"), SC_OPCODE_RANDOM_NV }, { NC_("RID_STRLIST_FUNCTION_NAMES", "RANDBETWEEN.NV"), SC_OPCODE_RANDBETWEEN_NV }, +{ NC_("RID_STRLIST_FUNCTION_NAMES", "RANDARRAY"), SC_OPCODE_RANDARRAY }, { {}, -1 } }; diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 0f75df5cc184..3157e767c5aa 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1171,6 +1171,8 @@ bool FormulaCompiler::IsOpCodeVolatile( OpCode eOp ) case ocOffset: // ocDebugVar shows internal value that may change as the internal state changes. case ocDebugVar: +// ocRandArray is a volatile function. +case ocRandArray: bRet = true; break; default: @@ -1234,6 +1236,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode ) case ocFilter : case ocSort : case ocSortBy : +case ocRandArray : return true; default: { diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx index 3bb1ccdce126..4fe03f59cf95
core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source
formula/inc/core_resource.hrc|6 formula/source/core/api/FormulaCompiler.cxx |1 include/formula/compiler.hxx |3 include/formula/opcode.hxx |2 sc/README.md |1 sc/inc/helpids.h |1 sc/inc/scfuncs.hrc | 14 sc/qa/extras/scfunctionlistobj.cxx |2 sc/qa/unit/data/functions/spreadsheet/fods/sequence.fods | 4231 +++ sc/qa/unit/ucalc.cxx |1 sc/source/core/data/funcdesc.cxx |1 sc/source/core/inc/interpre.hxx |1 sc/source/core/tool/interpr4.cxx |1 sc/source/core/tool/interpr5.cxx | 61 sc/source/core/tool/parclass.cxx |1 sc/source/core/tool/token.cxx|1 sc/source/filter/excel/xlformula.cxx |3 sc/source/filter/oox/formulabase.cxx |3 18 files changed, 4330 insertions(+), 4 deletions(-) New commits: commit 35772a003bb30be61f8ba8abe805455e41db0e1e Author: Balazs Varga AuthorDate: Wed Apr 17 17:12:37 2024 +0200 Commit: Balazs Varga CommitDate: Fri Apr 26 09:33:23 2024 +0200 tdf#126573 Add Excel2021 array function SEQUENCE to Calc Add new function called SEQUENCE to the function list. (TODO: dynamic array in separate patch, oasis proposal) Change-Id: I9fa6f2c83536536987542cc00a9eec5c196ada8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166245 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Balazs Varga diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc index 82d3a52c98e8..ec1f81699e7f 100644 --- a/formula/inc/core_resource.hrc +++ b/formula/inc/core_resource.hrc @@ -315,6 +315,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] = { "MDETERM" , SC_OPCODE_MAT_DET }, { "MINVERSE" , SC_OPCODE_MAT_INV }, { "MMULT" , SC_OPCODE_MAT_MULT }, +{ "COM.MICROSOFT.SEQUENCE" , SC_OPCODE_MAT_SEQUENCE }, { "TRANSPOSE" , SC_OPCODE_MAT_TRANS }, { "MUNIT" , SC_OPCODE_MATRIX_UNIT }, { "ORG.OPENOFFICE.GOALSEEK" , SC_OPCODE_BACK_SOLVER }, @@ -767,6 +768,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] = { "MDETERM" , SC_OPCODE_MAT_DET }, { "MINVERSE" , SC_OPCODE_MAT_INV }, { "MMULT" , SC_OPCODE_MAT_MULT }, +{ "_xlfn.SEQUENCE" , SC_OPCODE_MAT_SEQUENCE }, { "TRANSPOSE" , SC_OPCODE_MAT_TRANS }, { "_xlfn.MUNIT" , SC_OPCODE_MATRIX_UNIT }, { "_xlfn.ORG.OPENOFFICE.GOALSEEK" , SC_OPCODE_BACK_SOLVER }, @@ -1222,6 +1224,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] = { "MDETERM" , SC_OPCODE_MAT_DET }, { "MINVERSE" , SC_OPCODE_MAT_INV }, { "MMULT" , SC_OPCODE_MAT_MULT }, +{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE }, { "TRANSPOSE" , SC_OPCODE_MAT_TRANS }, { "MUNIT" , SC_OPCODE_MATRIX_UNIT }, { "GOALSEEK" , SC_OPCODE_BACK_SOLVER }, @@ -1678,6 +1681,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] = { "MDETERM" , SC_OPCODE_MAT_DET }, { "MINVERSE" , SC_OPCODE_MAT_INV }, { "MMULT" , SC_OPCODE_MAT_MULT }, +{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE }, { "TRANSPOSE" , SC_OPCODE_MAT_TRANS }, { "MUNIT" , SC_OPCODE_MATRIX_UNIT }, { "GOALSEEK" , SC_OPCODE_BACK_SOLVER }, @@ -2132,6 +2136,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH[] = { "MDETERM" , SC_OPCODE_MAT_DET }, { "MINVERSE" , SC_OPCODE_MAT_INV }, { "MMULT" , SC_OPCODE_MAT_MULT }, +{ "SEQUENCE" , SC_OPCODE_MAT_SEQUENCE }, { "TRANSPOSE" , SC_OPCODE_MAT_TRANS }, { "MUNIT" , SC_OPCODE_MATRIX_UNIT }, { "GOALSEEK" , SC_OPCODE_BACK_SOLVER }, @@ -2565,6 +2570,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES[] = { NC_("RID_STRLIST_FUNCTION_NAMES", "MDETERM") , SC_OPCODE_MAT_DET }, { NC_("RID_STRLIST_FUNCTION_NAMES", "MINVERSE") , SC_OPCODE_MAT_INV }, { NC_("RID_STRLIST_FUNCTION_NAMES", "MMULT") , SC_OPCODE_MAT_MULT }, +{ NC_("RID_STRLIST_FUNCTION_NAMES", "SEQUENCE") , SC_OPCODE_MAT_SEQUENCE }, { NC_("RID_STRLIST_FUNCTION_NAMES", "TRANSPOSE") , SC_OPCODE_MAT_TRANS }, { NC_("RID_STRLIST_FUNCTION_NAMES", "MUNIT") , SC_OPCODE_MATRIX_UNIT }, { NC_("RID_STRLIST_FUNCTION_NAMES", "GOALSEEK") , SC_OPCODE_BACK_SOLVER }, diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 278628cbd648..0f75df5cc184 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1224,6 +1224,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode ) case ocLogest : case ocLinest : case
core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source
formula/inc/core_resource.hrc |6 formula/source/core/api/FormulaCompiler.cxx|1 include/formula/compiler.hxx |3 include/formula/opcode.hxx |2 sc/README.md |1 sc/inc/helpids.h |1 sc/inc/scfuncs.hrc | 12 sc/qa/extras/scfunctionlistobj.cxx |2 sc/qa/unit/data/functions/spreadsheet/fods/sortby.fods | 5743 + sc/qa/unit/ucalc.cxx |1 sc/source/core/data/funcdesc.cxx |1 sc/source/core/inc/interpre.hxx|3 sc/source/core/tool/interpr1.cxx | 235 sc/source/core/tool/interpr3.cxx | 69 sc/source/core/tool/interpr4.cxx |1 sc/source/core/tool/parclass.cxx |1 sc/source/core/tool/token.cxx |1 sc/source/filter/excel/xlformula.cxx |3 sc/source/filter/oox/formulabase.cxx |3 19 files changed, 6045 insertions(+), 44 deletions(-) New commits: commit bfb4c58ae708c75949559290bdfdd9afcef6aa91 Author: Balazs Varga AuthorDate: Wed Mar 20 01:49:58 2024 +0100 Commit: Balazs Varga CommitDate: Tue Mar 26 10:20:38 2024 +0100 tdf#126573 Add Excel2021 array function SORTBY to Calc TODO/WIP: oasis proposal More information about how this new function works: https://support.microsoft.com/en-au/office/sortby-function-cd2d7a62-1b93-435c-b561-d6a35134f28f https://exceljet.net/functions/sortby-function Change-Id: I4538a32f7f75056d3055369fc5f4483d24fd1089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165069 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Balazs Varga diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc index 3d4e822353ef..82d3a52c98e8 100644 --- a/formula/inc/core_resource.hrc +++ b/formula/inc/core_resource.hrc @@ -280,6 +280,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] = { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER }, { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT }, +{ "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY }, { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -731,6 +732,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] = { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER }, { "_xlfn._xlws.SORT" , SC_OPCODE_SORT }, +{ "_xlfn.SORTBY" , SC_OPCODE_SORTBY }, { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -1185,6 +1187,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] = { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "FILTER" , SC_OPCODE_FILTER }, { "SORT" , SC_OPCODE_SORT }, +{ "SORTBY" , SC_OPCODE_SORTBY }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -1640,6 +1643,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] = { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "FILTER" , SC_OPCODE_FILTER }, { "SORT" , SC_OPCODE_SORT }, +{ "SORTBY" , SC_OPCODE_SORTBY }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, // ?? first character = I ?? @@ -2093,6 +2097,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH[] = { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "FILTER" , SC_OPCODE_FILTER }, { "SORT" , SC_OPCODE_SORT }, +{ "SORTBY" , SC_OPCODE_SORTBY }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA }, { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -2527,6 +2532,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES[] = { NC_("RID_STRLIST_FUNCTION_NAMES", "HLOOKUP") , SC_OPCODE_H_LOOKUP }, { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER }, { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT }, +{ NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY }, { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { NC_("RID_STRLIST_FUNCTION_NAMES", "OFFSET") , SC_OPCODE_OFFSET }, { NC_("RID_STRLIST_FUNCTION_NAMES", "INDEX") , SC_OPCODE_INDEX }, // ?? first character = I ?? diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index
core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source
formula/inc/core_resource.hrc|6 formula/source/core/api/FormulaCompiler.cxx |1 include/formula/compiler.hxx |3 include/formula/opcode.hxx |2 sc/README.md |1 sc/inc/helpids.h |1 sc/inc/scfuncs.hrc | 14 sc/inc/sortparam.hxx | 176 sc/inc/table.hxx |1 sc/qa/extras/scfunctionlistobj.cxx |2 sc/qa/unit/data/functions/spreadsheet/fods/sort.fods | 5816 +++ sc/qa/unit/ucalc.cxx |1 sc/source/core/data/funcdesc.cxx |1 sc/source/core/data/sortparam.cxx|9 sc/source/core/data/table3.cxx | 175 sc/source/core/inc/interpre.hxx | 21 sc/source/core/tool/interpr1.cxx | 203 sc/source/core/tool/interpr3.cxx | 363 + sc/source/core/tool/interpr4.cxx |1 sc/source/core/tool/parclass.cxx |1 sc/source/core/tool/token.cxx|1 sc/source/filter/excel/xlformula.cxx |3 sc/source/filter/oox/formulabase.cxx |3 23 files changed, 6623 insertions(+), 182 deletions(-) New commits: commit 45435a680be065e44eba385bb2523b27b77fb451 Author: Balazs Varga AuthorDate: Wed Mar 13 11:07:10 2024 +0100 Commit: Balazs Varga CommitDate: Mon Mar 25 15:54:01 2024 +0100 tdf#126573 Add Excel2021 array function SORT to Calc TODO/WIP: oasis proposal More information about how this new function works: https://support.microsoft.com/en-au/office/sort-function-22f63bd0-ccc8-492f-953d-c20e8e44b86c https://exceljet.net/functions/sort-function Note: Move ScSortInfoArray class to sortparam.hxx, which is a more logical place. Change-Id: I70e720e93ba0414d54cb3437de0bfa066508fe30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164778 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc index f0efc468ab6f..3d4e822353ef 100644 --- a/formula/inc/core_resource.hrc +++ b/formula/inc/core_resource.hrc @@ -279,6 +279,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] = { "COM.MICROSOFT.XLOOKUP" , SC_OPCODE_X_LOOKUP }, { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER }, +{ "COM.MICROSOFT.SORT" , SC_OPCODE_SORT }, { "ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -729,6 +730,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] = { "_xlfn.XLOOKUP" , SC_OPCODE_X_LOOKUP }, { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER }, +{ "_xlfn._xlws.SORT" , SC_OPCODE_SORT }, { "_xlfn.ORG.OPENOFFICE.MULTIRANGE" , SC_OPCODE_MULTI_AREA }, // legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -1182,6 +1184,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] = { "XLOOKUP" , SC_OPCODE_X_LOOKUP }, { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "FILTER" , SC_OPCODE_FILTER }, +{ "SORT" , SC_OPCODE_SORT }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -1636,6 +1639,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] = { "XLOOKUP" , SC_OPCODE_X_LOOKUP }, { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "FILTER" , SC_OPCODE_FILTER }, +{ "SORT" , SC_OPCODE_SORT }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA },// legacy for range list (union) { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, // ?? first character = I ?? @@ -2088,6 +2092,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES_ENGLISH[] = { "XLOOKUP" , SC_OPCODE_X_LOOKUP }, { "HLOOKUP" , SC_OPCODE_H_LOOKUP }, { "FILTER" , SC_OPCODE_FILTER }, +{ "SORT" , SC_OPCODE_SORT }, { "MULTIRANGE" , SC_OPCODE_MULTI_AREA }, { "OFFSET" , SC_OPCODE_OFFSET }, { "INDEX" , SC_OPCODE_INDEX }, @@ -2521,6 +2526,7 @@ const std::pair RID_STRLIST_FUNCTION_NAMES[] = { NC_("RID_STRLIST_FUNCTION_NAMES", "XLOOKUP") , SC_OPCODE_X_LOOKUP }, { NC_("RID_STRLIST_FUNCTION_NAMES", "HLOOKUP") , SC_OPCODE_H_LOOKUP }, { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER }, +{ NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT }, { NC_("RID_STRLIST_FUNCTION_NAMES", "MULTIRANGE") , SC_OPCODE_MULTI_AREA }, // legacy for range list (union)