summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-02-23 13:24:16 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-03-23 09:09:04 +0100
commit462287f618049446a1a956ae6cb00fde858888b0 (patch)
tree2ae9ecbc853219bb41d658a313fe67c2d94efb4f
parent5c6bc72426937c949957531eb1ad07986f3a8042 (diff)
handle hardcoded MAXCOL/MAXROW in ScInterpreter
The change from <= to < is intentional to compensate for the change from MAXCOLCOUNT to MAXCOL (there's no MAXCOLCOUNT_JUMBO and I don't want to add it). Change-Id: I223b2fd3b1a9e22e82f6a31d16d44c98ae43876d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130436 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--sc/source/core/tool/interpr4.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 1a0eed81302f..ec23c5c02543 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -280,7 +280,8 @@ bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
// Old Add-Ins are hard limited to sal_uInt16 values.
- static_assert(MAXCOLCOUNT <= SAL_MAX_UINT16, "Add check for columns > SAL_MAX_UINT16!");
+ static_assert(MAXCOL < SAL_MAX_UINT16 && MAXCOL_JUMBO < SAL_MAX_UINT16,
+ "Add check for columns > SAL_MAX_UINT16!");
if (nRow1 > SAL_MAX_UINT16 || nRow2 > SAL_MAX_UINT16)
return false;
@@ -363,7 +364,8 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
// Old Add-Ins are hard limited to sal_uInt16 values.
- static_assert(MAXCOLCOUNT <= SAL_MAX_UINT16, "Add check for columns > SAL_MAX_UINT16!");
+ static_assert(MAXCOL < SAL_MAX_UINT16 && MAXCOL_JUMBO < SAL_MAX_UINT16,
+ "Add check for columns > SAL_MAX_UINT16!");
if (nRow1 > SAL_MAX_UINT16 || nRow2 > SAL_MAX_UINT16)
return false;
@@ -460,7 +462,8 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
{
// Old Add-Ins are hard limited to sal_uInt16 values.
- static_assert(MAXCOLCOUNT <= SAL_MAX_UINT16, "Add check for columns > SAL_MAX_UINT16!");
+ static_assert(MAXCOL < SAL_MAX_UINT16 && MAXCOL_JUMBO < SAL_MAX_UINT16,
+ "Add check for columns > SAL_MAX_UINT16!");
if (nRow1 > SAL_MAX_UINT16 || nRow2 > SAL_MAX_UINT16)
return false;