Fixed some typos in comments and metadata for LET

Removed LET from sc/README.md's list of functions supporting
wildcards and regular expressions, since it doesn't interact
with either.

Changed LET's return type from ForceArrayReturn to Value, since
it usually doesn't return an array.

Change-Id: I99168d274483ddea5ba338d4e019cf433fe88c45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205977
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Ben Urban
2026-06-29 14:45:57 +02:00
committed by Xisco Fauli
parent 88550ce19c
commit 58c2fbaea0
5 changed files with 12 additions and 14 deletions
+1 -1
View File
@@ -1203,7 +1203,7 @@ bool FormulaCompiler::IsOpCodeVolatile( OpCode eOp )
// one parameter:
case ocFormula:
case ocInfo:
// more than one parameters:
// more than one parameter:
// ocIndirect otherwise would have to do
// StopListening and StartListening on a reference for every
// interpreted value.
+1 -1
View File
@@ -226,7 +226,7 @@ enum OpCode : sal_uInt16
ocNeg = 179,
ocStopOneParameter = 180,
// Functions with more than one parameters
// Functions with more than one parameter
ocStartTwoParameters = 201,
ocArcTan2 = 201,
ocCeil = 202,
-2
View File
@@ -83,8 +83,6 @@ https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocume
* Information Functions
* COUNTIF
* COUNTIFS
* Lambda Functions
* LET
* Lookup Functions
* HLOOKUP
* LOOKUP
+9 -9
View File
@@ -3278,7 +3278,7 @@ bool ScCompiler::ParseOpCode( const OUString& rName, bool bInArray )
bool ScCompiler::ParseOpCode2( std::u16string_view rName )
{
// If we have Pivot Table field names, means we are parsing a pivot table
// calculation field, which are not support any OpCode2 tokens, only there
// calculation field, which do not support any OpCode2 tokens, only their
// own field names.
if (!maPivotFieldNames.empty())
return false;
@@ -3829,7 +3829,7 @@ bool ScCompiler::ParseNamedRange( const OUString& rUpperName, bool onlyCheck )
{
// ParseNamedRange is called only from NextNewToken, with an upper-case string
// If we have Pivot Table field names, means we are parsing a pivot table
// calculation field, which are not support any name based tokens, only there
// calculation field, which do not support any name-based tokens, only their
// own field names.
if (!maPivotFieldNames.empty())
return false;
@@ -3897,7 +3897,7 @@ bool ScCompiler::ParseExternalNamedRange( const OUString& rSymbol, bool& rbInval
rbInvalidExternalNameRange = false;
// If we have Pivot Table field names, means we are parsing a pivot table
// calculation field, which are not support any name based tokens, only there
// calculation field, which do not support any name-based tokens, only their
// own field names.
if (!maPivotFieldNames.empty())
return false;
@@ -3935,7 +3935,7 @@ bool ScCompiler::ParseExternalNamedRange( const OUString& rSymbol, bool& rbInval
bool ScCompiler::ParseDBRange( const OUString& rName )
{
// If we have Pivot Table field names, means we are parsing a pivot table
// calculation field, which are not support any name based tokens, only there
// calculation field, which do not support any name-based tokens, only their
// own field names.
if (!maPivotFieldNames.empty())
return false;
@@ -3994,7 +3994,7 @@ bool ScCompiler::ParseDPFieldName( const OUString& rName )
bool ScCompiler::ParseColRowName( const OUString& rName )
{
// If we have Pivot Table field names, means we are parsing a pivot table
// calculation field, which are not support any name based tokens, only there
// calculation field, which do not support any name-based tokens, only their
// own field names.
if (!maPivotFieldNames.empty())
return false;
@@ -5336,10 +5336,10 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
if (pFunctionStack != &aFuncs[0])
delete [] pFunctionStack;
// remember pArr, in case a subsequent CompileTokenArray() is executed.
// remember mpArr, in case a subsequent CompileTokenArray() is executed.
std::unique_ptr<ScTokenArray> pNew(new ScTokenArray( std::move(aArr) ));
pNew->GenHash();
// coverity[escape : FALSE] - ownership of pNew is retained by caller, so pArr remains valid
// coverity[escape : FALSE] - ownership of pNew is retained by caller, so mpArr remains valid
mpArr = pNew.get();
maArrIterator = FormulaTokenArrayPlainIterator(*mpArr);
@@ -5369,9 +5369,9 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
ScTokenArray aTokenArray(rDoc);
if( ScTokenConversion::ConvertToTokenArray( rDoc, aTokenArray, aTokenSeq ) )
{
// remember pArr, in case a subsequent CompileTokenArray() is executed.
// remember mpArr, in case a subsequent CompileTokenArray() is executed.
std::unique_ptr<ScTokenArray> pNew(new ScTokenArray( std::move(aTokenArray) ));
// coverity[escape : FALSE] - ownership of pNew is retained by caller, so pArr remains valid
// coverity[escape : FALSE] - ownership of pNew is retained by caller, so mpArr remains valid
mpArr = pNew.get();
maArrIterator = FormulaTokenArrayPlainIterator(*mpArr);
return pNew;
+1 -1
View File
@@ -59,7 +59,7 @@ const ScParameterClassification::RawData ScParameterClassification::pRawData[] =
{ ocChoose, {{ Array, Reference }, 1, Value }},
{ ocChooseCols, {{ ReferenceOrRefArray, ReferenceOrRefArray }, 1, ForceArrayReturn }},
{ ocChooseRows, {{ ReferenceOrRefArray, ReferenceOrRefArray }, 1, ForceArrayReturn }},
{ ocLet, {{ Value, ReferenceOrRefArray, ReferenceOrRefArray, }, 2, ForceArrayReturn } },
{ ocLet, {{ Value, ReferenceOrRefArray, ReferenceOrRefArray }, 2, Value }},
// Other specials.
{ ocArrayClose, {{ Bounds }, 0, Bounds }},
{ ocArrayColSep, {{ Bounds }, 0, Bounds }},