sc/source/core/tool/interpr4.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
New commits: commit 8feca2e3146171f76a8aa0b38fff54f327afddaf Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Wed Feb 23 13:24:16 2022 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Wed Feb 23 16:22:33 2022 +0100 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.lu...@collabora.com> diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 27170ca94490..9abd5729c557 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -281,7 +281,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; @@ -364,7 +365,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; @@ -461,7 +463,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;