sc/inc/scfuncs.hrc                   |   20 ++++++++------------
 sc/source/core/data/funcdesc.cxx     |    8 ++++----
 sc/source/core/tool/parclass.cxx     |    4 ++--
 sc/source/filter/excel/xlformula.cxx |    4 ++--
 sc/source/filter/oox/formulabase.cxx |    4 ++--
 5 files changed, 18 insertions(+), 22 deletions(-)

New commits:
commit 2a0746e1b5b81b0b062ac955afc691746326a0a4
Author:     Olivier Hallot <olivier.hal...@libreoffice.org>
AuthorDate: Wed Feb 12 14:06:48 2025 -0300
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Tue Aug 26 21:38:34 2025 +0200

    tdf#165119 Also fix # of param for VSTACK, HSTACK
    
    + based on https://gerrit.libreoffice.org/c/core/+/181439
    
    Change-Id: I86c7e534bda881d84b47e81c9f36fd1cafbf59d9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181506
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 1be7c7a3f200cab41cb718399e39e7e13e45aa2e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190128
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index 8f9e795955b7..5987ef9d201f 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -4303,8 +4303,8 @@ const TranslateId SC_OPCODE_HSTACK_ARY[] =
     NC_("SC_OPCODE_HSTACK", "Appends arrays horizontally to create a larger 
array"),
     NC_("SC_OPCODE_HSTACK", "Array"),
     NC_("SC_OPCODE_HSTACK", "The first array to append."),
-    NC_("SC_OPCODE_HSTACK", "Array 2"),
-    NC_("SC_OPCODE_HSTACK", "Array 2, Array 3,... The following arrays to 
append. if an array has fewer rows, #N/A error will be returned in the 
additional rows."),
+    NC_("SC_OPCODE_HSTACK", "Array "),
+    NC_("SC_OPCODE_HSTACK", "Array 1, Array 2,... The following arrays to 
append. If an array has fewer rows, #N/A error will be returned in the 
additional rows."),
 };
 
 // -=*# Resource for function VSTACK #*=-
@@ -4313,8 +4313,8 @@ const TranslateId SC_OPCODE_VSTACK_ARY[] =
     NC_("SC_OPCODE_VSTACK", "Appends arrays vertically to create a larger 
array"),
     NC_("SC_OPCODE_VSTACK", "Array"),
     NC_("SC_OPCODE_VSTACK", "The first array to append."),
-    NC_("SC_OPCODE_VSTACK", "Array 2"),
-    NC_("SC_OPCODE_VSTACK", "Array 2, Array 3,... The following arrays to 
append. if an array has fewer columns, #N/A error will be returned in the 
additional columns."),
+    NC_("SC_OPCODE_VSTACK", "Array "),
+    NC_("SC_OPCODE_VSTACK", "Array 1, Array 2,... The following arrays to 
append. If an array has fewer columns, #N/A error will be returned in the 
additional columns."),
 };
 
 // -=*# Resource for function TAKE #*=-
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 06a8f76270b1..95710008b3ec 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -797,8 +797,8 @@ ScFunctionList::ScFunctionList( bool bEnglishFunctionNames )
         { SC_OPCODE_CHOOSEROWS, ENTRY(SC_OPCODE_CHOOSEROWS_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_CHOOSEROWS_MS, VAR_ARGS + 1, { 0, 0 }, 0 },
         { SC_OPCODE_DROP, ENTRY(SC_OPCODE_DROP_ARY), 0, ID_FUNCTION_GRP_TABLE, 
HID_FUNC_DROP_MS, 3, { 0, 0, 1 }, 0 },
         { SC_OPCODE_EXPAND, ENTRY(SC_OPCODE_EXPAND_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_EXPAND_MS, 4, { 0, 0, 1, 1 }, 0 },
-        { SC_OPCODE_HSTACK, ENTRY(SC_OPCODE_HSTACK_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_HSTACK_MS, VAR_ARGS + 1, { 0, 1 }, 0 },
-        { SC_OPCODE_VSTACK, ENTRY(SC_OPCODE_VSTACK_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_VSTACK_MS, VAR_ARGS + 1, { 0, 1 }, 0 },
+        { SC_OPCODE_HSTACK, ENTRY(SC_OPCODE_HSTACK_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_HSTACK_MS, VAR_ARGS + 1, { 0, 0 }, 0 },
+        { SC_OPCODE_VSTACK, ENTRY(SC_OPCODE_VSTACK_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_VSTACK_MS, VAR_ARGS + 1, { 0, 0 }, 0 },
         { SC_OPCODE_TAKE, ENTRY(SC_OPCODE_TAKE_ARY), 0, ID_FUNCTION_GRP_TABLE, 
HID_FUNC_TAKE_MS, 3, { 0, 1, 1 }, 0 },
         { SC_OPCODE_TOCOL, ENTRY(SC_OPCODE_TOCOL_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_TOCOL_MS, 3, { 0, 1, 1 }, 0 },
         { SC_OPCODE_TOROW, ENTRY(SC_OPCODE_TOROW_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_TOROW_MS, 3, { 0, 1, 1 }, 0 },
commit de58e43c3239aa3c80aaefd9eb758fe6e1d3a321
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Feb 11 16:44:36 2025 +0100
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Tue Aug 26 21:38:23 2025 +0200

    tdf#165119: fix number of parameters in CHOOSECOLS/CHOOSEROWS
    
    Change-Id: I39fee81e0fc8aaa33265a3539bd4e6dff5d9d2e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181439
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 7a2fec66b5f2c527b79db312135e3691bb8b56ac)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190127
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index ab93fde00834..8f9e795955b7 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -4257,10 +4257,8 @@ const TranslateId SC_OPCODE_CHOOSECOLS_ARY[] =
     NC_("SC_OPCODE_CHOOSECOLS", "Returns the specified columns from an 
array."),
     NC_("SC_OPCODE_CHOOSECOLS", "Array"),
     NC_("SC_OPCODE_CHOOSECOLS", "The array containing the columns to be 
returned in the new array."),
-    NC_("SC_OPCODE_CHOOSECOLS", "Column 1"),
-    NC_("SC_OPCODE_CHOOSECOLS", "The number of the first column to be 
returned."),
-    NC_("SC_OPCODE_CHOOSECOLS", "Column 2"),
-    NC_("SC_OPCODE_CHOOSECOLS", "Column 2, Column 3,... The list of column 
numbers to be returned.")
+    NC_("SC_OPCODE_CHOOSECOLS", "Column "),
+    NC_("SC_OPCODE_CHOOSECOLS", "Column 1, Column 2,... The list of column 
numbers to be returned.")
 };
 
 // -=*# Resource for function CHOOSEROWS #*=-
@@ -4269,10 +4267,8 @@ const TranslateId SC_OPCODE_CHOOSEROWS_ARY[] =
     NC_("SC_OPCODE_CHOOSEROWS", "Returns the specified rows from an array."),
     NC_("SC_OPCODE_CHOOSEROWS", "Array"),
     NC_("SC_OPCODE_CHOOSEROWS", "The array containing the rows to be returned 
in the new array."),
-    NC_("SC_OPCODE_CHOOSEROWS", "Row 1"),
-    NC_("SC_OPCODE_CHOOSEROWS", "The number of the first row to be returned."),
-    NC_("SC_OPCODE_CHOOSEROWS", "Row 2"),
-    NC_("SC_OPCODE_CHOOSEROWS", "Row 2, Row 3,... The list of row numbers to 
be returned.")
+    NC_("SC_OPCODE_CHOOSEROWS", "Row "),
+    NC_("SC_OPCODE_CHOOSEROWS", "Row 1, Row 2,... The list of row numbers to 
be returned.")
 };
 
 // -=*# Resource for function DROP #*=-
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index e879636e5b71..06a8f76270b1 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -793,8 +793,8 @@ ScFunctionList::ScFunctionList( bool bEnglishFunctionNames )
         { SC_OPCODE_SORTBY, ENTRY(SC_OPCODE_SORTBY_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_SORTBY_MS, PAIRED_VAR_ARGS + 1, { 0, 0, 1 }, 0 
},
         { SC_OPCODE_MAT_SEQUENCE, ENTRY(SC_OPCODE_MAT_SEQUENCE_ARY), 0, 
ID_FUNCTION_GRP_MATRIX, HID_FUNC_MSEQUENCE_MS, 4, { 0, 1, 1, 1 }, 0 },
         { SC_OPCODE_RANDARRAY, ENTRY(SC_OPCODE_RANDARRAY_ARY), 0, 
ID_FUNCTION_GRP_MATH, HID_FUNC_RANDARRAY_MS, 5, { 1, 1, 1, 1, 1 }, 0 },
-        { SC_OPCODE_CHOOSECOLS, ENTRY(SC_OPCODE_CHOOSECOLS_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_CHOOSECOLS_MS, VAR_ARGS + 2, { 0, 0, 1 }, 0 },
-        { SC_OPCODE_CHOOSEROWS, ENTRY(SC_OPCODE_CHOOSEROWS_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_CHOOSEROWS_MS, VAR_ARGS + 2, { 0, 0, 1 }, 0 },
+        { SC_OPCODE_CHOOSECOLS, ENTRY(SC_OPCODE_CHOOSECOLS_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_CHOOSECOLS_MS, VAR_ARGS + 1, { 0, 0 }, 0 },
+        { SC_OPCODE_CHOOSEROWS, ENTRY(SC_OPCODE_CHOOSEROWS_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_CHOOSEROWS_MS, VAR_ARGS + 1, { 0, 0 }, 0 },
         { SC_OPCODE_DROP, ENTRY(SC_OPCODE_DROP_ARY), 0, ID_FUNCTION_GRP_TABLE, 
HID_FUNC_DROP_MS, 3, { 0, 0, 1 }, 0 },
         { SC_OPCODE_EXPAND, ENTRY(SC_OPCODE_EXPAND_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_EXPAND_MS, 4, { 0, 0, 1, 1 }, 0 },
         { SC_OPCODE_HSTACK, ENTRY(SC_OPCODE_HSTACK_ARY), 0, 
ID_FUNCTION_GRP_TABLE, HID_FUNC_HSTACK_MS, VAR_ARGS + 1, { 0, 1 }, 0 },
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index e556817fec9d..204c9a943f7d 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -57,8 +57,8 @@ const ScParameterClassification::RawData 
ScParameterClassification::pRawData[] =
     { ocIfError,         {{ Array, Reference                                   
  }, 0, Value }},
     { ocIfNA,            {{ Array, Reference                                   
  }, 0, Value }},
     { ocChoose,          {{ Array, Reference                                   
  }, 1, Value }},
-    { ocChooseCols,      {{ ReferenceOrRefArray, ReferenceOrRefArray, 
ReferenceOrRefArray, }, 2, ForceArrayReturn }},
-    { ocChooseRows,      {{ ReferenceOrRefArray, ReferenceOrRefArray, 
ReferenceOrRefArray, }, 2, ForceArrayReturn }},
+    { ocChooseCols,      {{ ReferenceOrRefArray, ReferenceOrRefArray           
  }, 1, ForceArrayReturn }},
+    { ocChooseRows,      {{ ReferenceOrRefArray, ReferenceOrRefArray           
  }, 1, ForceArrayReturn }},
     { ocLet,             {{ Value, ReferenceOrRefArray, ReferenceOrRefArray, 
}, 2, ForceArrayReturn } },
     // Other specials.
     { ocArrayClose,      {{ Bounds                                             
  }, 0, Bounds }},
diff --git a/sc/source/filter/excel/xlformula.cxx 
b/sc/source/filter/excel/xlformula.cxx
index 871f48c2080e..cbb211b19cd0 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -619,8 +619,8 @@ const XclFunctionInfo saFuncTable_2021[] =
  */
 const XclFunctionInfo saFuncTable_2024[] =
 {
-    EXC_FUNCENTRY_V_VR(  ocChooseCols, 2,  MX, 0,  "CHOOSECOLS" ),
-    EXC_FUNCENTRY_V_VR(  ocChooseRows, 2,  MX, 0,  "CHOOSEROWS" ),
+    EXC_FUNCENTRY_V_VR(  ocChooseCols, 1,  MX, 0,  "CHOOSECOLS" ),
+    EXC_FUNCENTRY_V_VR(  ocChooseRows, 1,  MX, 0,  "CHOOSEROWS" ),
     EXC_FUNCENTRY_V_VR(  ocDrop,       1,  3,  0,  "DROP" ),
     EXC_FUNCENTRY_V_VR(  ocExpand,     2,  4,  0,  "EXPAND" ),
     EXC_FUNCENTRY_V_VR(  ocHStack,     1,  MX, 0,  "HSTACK" ),
diff --git a/sc/source/filter/oox/formulabase.cxx 
b/sc/source/filter/oox/formulabase.cxx
index 72934ef1cdce..d722b75a9837 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -894,8 +894,8 @@ const FunctionData saFuncTable2021[] =
 /* FIXME: BIFF?? function identifiers available? Where to obtain? */
 const FunctionData saFuncTable2024[] =
 {
-    { "COM.MICROSOFT.CHOOSECOLS",          "CHOOSECOLS",          NOID,   
NOID,   2,  MX, A, { VO }, FuncFlags::MACROCALL_NEW },
-    { "COM.MICROSOFT.CHOOSEROWS",          "CHOOSEROWS",          NOID,   
NOID,   2,  MX, A, { VO }, FuncFlags::MACROCALL_NEW },
+    { "COM.MICROSOFT.CHOOSECOLS",          "CHOOSECOLS",          NOID,   
NOID,   1,  MX, A, { VO }, FuncFlags::MACROCALL_NEW },
+    { "COM.MICROSOFT.CHOOSEROWS",          "CHOOSEROWS",          NOID,   
NOID,   1,  MX, A, { VO }, FuncFlags::MACROCALL_NEW },
     { "COM.MICROSOFT.DROP",                "DROP",                NOID,   
NOID,   1,  3,  A, { VO }, FuncFlags::MACROCALL_NEW },
     { "COM.MICROSOFT.EXPAND",              "EXPAND",              NOID,   
NOID,   2,  4,  A, { VO }, FuncFlags::MACROCALL_NEW },
     { "COM.MICROSOFT.HSTACK",              "HSTACK",              NOID,   
NOID,   1,  MX, A, { VO }, FuncFlags::MACROCALL_NEW },

Reply via email to