formula/source/core/api/FormulaCompiler.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit e8766959f0f48c1570b8248ead7d65c9cefeb43b Author: Simon Chenery <[email protected]> AuthorDate: Tue Feb 24 21:11:00 2026 +0100 Commit: David Gilbert <[email protected]> CommitDate: Sun Mar 1 18:27:57 2026 +0100 tdf#147021 avoid use of SAL_N_ELEMENTS macro in FormulaCompiler.cxx Change-Id: I09457280ba43d3cce5c998d1c50d606fc4a124e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200264 Reviewed-by: David Gilbert <[email protected]> Tested-by: Jenkins diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 9a7729ef5dba..5ff039a704df 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -533,7 +533,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create { FormulaMapGroupSpecialOffset::WHITESPACE , ocWhitespace } , { FormulaMapGroupSpecialOffset::TABLE_REF , ocTableRef } }; - const size_t nCount = SAL_N_ELEMENTS(aMap); + const size_t nCount = std::size(aMap); // Preallocate vector elements. FormulaOpCodeMapEntry aEntry; aEntry.Token.OpCode = getOpCodeUnknown(); @@ -569,7 +569,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create SC_OPCODE_CLOSE, SC_OPCODE_SEP, }; - lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, SAL_N_ELEMENTS(aOpCodes) ); + lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, std::size(aOpCodes) ); } if ((nGroups & FormulaMapGroup::ARRAY_SEPARATORS) != 0) { @@ -579,7 +579,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create SC_OPCODE_ARRAY_ROW_SEP, SC_OPCODE_ARRAY_COL_SEP }; - lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, SAL_N_ELEMENTS(aOpCodes) ); + lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, std::size(aOpCodes) ); } if ((nGroups & FormulaMapGroup::UNARY_OPERATORS) != 0) { @@ -629,7 +629,7 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create SC_OPCODE_AND, SC_OPCODE_OR }; - lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, SAL_N_ELEMENTS(aOpCodes) ); + lclPushOpCodeMapEntries( aVec, mpTable.get(), aOpCodes, std::size(aOpCodes) ); // functions with 2 or more parameters. for (sal_uInt16 nOp = SC_OPCODE_START_2_PAR; nOp < SC_OPCODE_STOP_2_PAR && nOp < mnSymbols; ++nOp) {
