LibreOffice Module sc (master) 1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
ScInterpreter Class Reference

#include <interpre.hxx>

Collaboration diagram for ScInterpreter:
[legend]

Public Types

enum  VolatileType {
  VOLATILE ,
  VOLATILE_MACRO ,
  NOT_VOLATILE
}
 

Public Member Functions

ScMatrixRef GetNewMat (SCSIZE nC, SCSIZE nR, bool bEmpty=false)
 
ScMatrixRef GetNewMat (SCSIZE nC, SCSIZE nR, const std::vector< double > &rValues)
 
VolatileType GetVolatileType () const
 
double ConvertStringToValue (const OUString &, FormulaError &rError, SvNumFormatType &rCurFmtType)
 For matrix back calls into the current interpreter. More...
 
 ScInterpreter (ScFormulaCell *pCell, ScDocument &rDoc, ScInterpreterContext &rContext, const ScAddress &, ScTokenArray &, bool bForGroupThreading=false)
 
 ~ScInterpreter ()
 
void Init (ScFormulaCell *pCell, const ScAddress &rPos, ScTokenArray &rTokArray)
 
formula::StackVar Interpret ()
 
void SetError (FormulaError nError)
 
void AssertFormulaMatrix ()
 
void SetLinkManager (sfx2::LinkManager *pLinkMgr)
 
FormulaError GetError () const
 
formula::StackVar GetResultType () const
 
const svl::SharedStringGetStringResult () const
 
double GetNumResult () const
 
const formula::FormulaConstTokenRefGetResultToken () const
 
SvNumFormatType GetRetFormatType () const
 
sal_uLong GetRetFormatIndex () const
 

Static Public Member Functions

static void SetGlobalConfig (const ScCalcConfig &rConfig)
 
static const ScCalcConfigGetGlobalConfig ()
 
static void GlobalExit ()
 
static utl::SearchParam::SearchType DetectSearchType (std::u16string_view rStr, const ScDocument &rDoc)
 Detect if string should be used as regular expression or wildcard expression or literal string. More...
 
static double div (const double &fNumerator, const double &fDenominator)
 Fail safe division, returning a FormulaError::DivisionByZero coded into a double if denominator is 0.0. More...
 
static double ScGetGCD (double fx, double fy)
 
static double phi (double x)
 
static double integralPhi (double x)
 
static double gaussinv (double x)
 
static double GetPercentile (::std::vector< double > &rArray, double fPercentile)
 

Private Member Functions

void MakeMatNew (ScMatrixRef &rMat, SCSIZE nC, SCSIZE nR)
 
void MergeCalcConfig ()
 Merge global and document specific settings. More...
 
bool MustHaveParamCount (short nAct, short nMust)
 
bool MustHaveParamCount (short nAct, short nMust, short nMax)
 
bool MustHaveParamCountMin (short nAct, short nMin)
 
void PushParameterExpected ()
 
void PushIllegalParameter ()
 
void PushIllegalArgument ()
 
void PushNoValue ()
 
void PushNA ()
 
void ReplaceCell (ScAddress &)
 
bool IsTableOpInRange (const ScRange &)
 
sal_uInt32 GetCellNumberFormat (const ScAddress &rPos, ScRefCellValue &rCell)
 
double ConvertStringToValue (const OUString &)
 
double GetCellValue (const ScAddress &, ScRefCellValue &rCell)
 
double GetCellValueOrZero (const ScAddress &, ScRefCellValue &rCell)
 
double GetValueCellValue (const ScAddress &, double fOrig)
 Only ValueCell, formula cells already store the result rounded. More...
 
void GetCellString (svl::SharedString &rStr, ScRefCellValue &rCell)
 
bool CreateDoubleArr (SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
 
bool CreateStringArr (SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
 
bool CreateCellArr (SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
 
void Push (const formula::FormulaToken &r)
 Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is not formula::FormulaErrorToken. More...
 
void PushWithoutError (const formula::FormulaToken &r)
 Does not substitute with formula::FormulaErrorToken in case nGlobalError is set. More...
 
void PushTempToken (formula::FormulaToken *)
 Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is not formula::FormulaErrorToken. More...
 
void PushTokenRef (const formula::FormulaConstTokenRef &)
 Pushes the token or substitutes with formula::FormulaErrorToken in case nGlobalError is set and the token passed is not formula::FormulaErrorToken. More...
 
void PushTempTokenWithoutError (const formula::FormulaToken *)
 Does not substitute with formula::FormulaErrorToken in case nGlobalError is set. More...
 
bool IfErrorPushError ()
 If nGlobalError is set push formula::FormulaErrorToken. More...
 
void PushCellResultToken (bool bDisplayEmptyAsString, const ScAddress &rAddress, SvNumFormatType *pRetTypeExpr, sal_uInt32 *pRetIndexExpr, bool bFinalResult=false)
 Obtain cell result / content from address and push as temp token. More...
 
formula::FormulaConstTokenRef PopToken ()
 
void Pop ()
 
void PopError ()
 
double PopDouble ()
 
const svl::SharedStringPopString ()
 
void ValidateRef (const ScSingleRefData &rRef)
 
void ValidateRef (const ScComplexRefData &rRef)
 
void ValidateRef (const ScRefList &rRefList)
 
void SingleRefToVars (const ScSingleRefData &rRef, SCCOL &rCol, SCROW &rRow, SCTAB &rTab)
 
void PopSingleRef (ScAddress &)
 
void PopSingleRef (SCCOL &rCol, SCROW &rRow, SCTAB &rTab)
 
void DoubleRefToRange (const ScComplexRefData &, ScRange &, bool bDontCheckForTableOp=false)
 
void PopDoubleRef (ScRange &rRange, short &rParam, size_t &rRefInList)
 If formula::StackVar formula::svDoubleRef pop ScDoubleRefToken and return values of ScComplexRefData. More...
 
void PopDoubleRef (ScRange &, bool bDontCheckForTableOp=false)
 
void DoubleRefToVars (const formula::FormulaToken *p, SCCOL &rCol1, SCROW &rRow1, SCTAB &rTab1, SCCOL &rCol2, SCROW &rRow2, SCTAB &rTab2)
 
ScDBRangeBasePopDBDoubleRef ()
 
void PopDoubleRef (SCCOL &rCol1, SCROW &rRow1, SCTAB &rTab1, SCCOL &rCol2, SCROW &rRow2, SCTAB &rTab2)
 
const ScComplexRefDataGetStackDoubleRef (size_t rRefInList=0)
 
void PopExternalSingleRef (sal_uInt16 &rFileId, OUString &rTabName, ScSingleRefData &rRef)
 
void PopExternalSingleRef (ScExternalRefCache::TokenRef &rToken, ScExternalRefCache::CellFormat *pFmt=nullptr)
 Guarantees that nGlobalError is set if rToken could not be obtained. More...
 
void PopExternalSingleRef (sal_uInt16 &rFileId, OUString &rTabName, ScSingleRefData &rRef, ScExternalRefCache::TokenRef &rToken, ScExternalRefCache::CellFormat *pFmt=nullptr)
 Guarantees that nGlobalError is set if rToken could not be obtained. More...
 
void PopExternalDoubleRef (sal_uInt16 &rFileId, OUString &rTabName, ScComplexRefData &rRef)
 
void PopExternalDoubleRef (ScExternalRefCache::TokenArrayRef &rArray)
 
void PopExternalDoubleRef (ScMatrixRef &rMat)
 
void GetExternalDoubleRef (sal_uInt16 nFileId, const OUString &rTabName, const ScComplexRefData &aData, ScExternalRefCache::TokenArrayRef &rArray)
 
bool PopDoubleRefOrSingleRef (ScAddress &rAdr)
 
void PopDoubleRefPushMatrix ()
 
void PopRefListPushMatrixOrRef ()
 
bool ConvertMatrixParameters ()
 
void MatrixJumpConditionToMatrix ()
 
void ConvertMatrixJumpConditionToMatrix ()
 
bool MatrixParameterConversion ()
 
bool IsInArrayContext () const
 
ScMatrixRef PopMatrix ()
 
sc::RangeMatrix PopRangeMatrix ()
 
void QueryMatrixType (const ScMatrixRef &xMat, SvNumFormatType &rRetTypeExpr, sal_uInt32 &rRetIndexExpr)
 
formula::FormulaTokenCreateFormulaDoubleToken (double fVal, SvNumFormatType nFmt=SvNumFormatType::NUMBER)
 
formula::FormulaTokenCreateDoubleOrTypedToken (double fVal)
 
void PushDouble (double nVal)
 
void PushInt (int nVal)
 
void PushStringBuffer (const sal_Unicode *pString)
 
void PushString (const OUString &rStr)
 
void PushString (const svl::SharedString &rString)
 
void PushSingleRef (SCCOL nCol, SCROW nRow, SCTAB nTab)
 
void PushDoubleRef (SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
 
void PushExternalSingleRef (sal_uInt16 nFileId, const OUString &rTabName, SCCOL nCol, SCROW nRow, SCTAB nTab)
 
void PushExternalDoubleRef (sal_uInt16 nFileId, const OUString &rTabName, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
 
void PushSingleRef (const ScRefAddress &rRef)
 
void PushDoubleRef (const ScRefAddress &rRef1, const ScRefAddress &rRef2)
 
void PushMatrix (const sc::RangeMatrix &rMat)
 
void PushMatrix (const ScMatrixRef &pMat)
 
void PushError (FormulaError nError)
 
formula::StackVar GetRawStackType ()
 Raw stack type without default replacements. More...
 
formula::StackVar GetStackType ()
 Stack type with replacement of defaults, e.g. svMissing and formula::svEmptyCell will result in formula::svDouble. More...
 
formula::StackVar GetStackType (sal_uInt8 nParam)
 
sal_uInt8 GetByte () const
 
void ReverseStack (sal_uInt8 nParamCount)
 
bool DoubleRefToPosSingleRef (const ScRange &rRange, ScAddress &rAdr)
 
double GetDoubleFromMatrix (const ScMatrixRef &pMat)
 
double GetDouble ()
 
double GetDoubleWithDefault (double nDefault)
 
bool IsMissing () const
 
sal_Int32 double_to_int32 (double fVal)
 
sal_Int32 GetInt32 ()
 if GetDouble() not within int32 limits sets nGlobalError and returns SAL_MAX_INT32 More...
 
sal_Int32 GetInt32WithDefault (sal_Int32 nDefault)
 if GetDoubleWithDefault() not within int32 limits sets nGlobalError and returns SAL_MAX_INT32 More...
 
sal_Int16 GetInt16 ()
 if GetDouble() not within int16 limits sets nGlobalError and returns SAL_MAX_INT16 More...
 
sal_uInt32 GetUInt32 ()
 if GetDouble() not within uint32 limits sets nGlobalError and returns SAL_MAX_UINT32 More...
 
bool GetBool ()
 
bool GetDoubleOrString (double &rValue, svl::SharedString &rString)
 returns TRUE if double (or error, check nGlobalError), else FALSE More...
 
svl::SharedString GetString ()
 
svl::SharedString GetStringFromMatrix (const ScMatrixRef &pMat)
 
svl::SharedString GetStringFromDouble (const double fVal)
 
ScMatValType GetDoubleOrStringFromMatrix (double &rDouble, svl::SharedString &rString)
 
ScMatrixRef CreateMatrixFromDoubleRef (const formula::FormulaToken *pToken, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
 
ScTokenMatrixMapGetTokenMatrixMap ()
 
ScMatrixRef GetMatrix ()
 
ScMatrixRef GetMatrix (short &rParam, size_t &rInRefList)
 
sc::RangeMatrix GetRangeMatrix ()
 
void ScTableOp ()
 
void CurFmtToFuncFmt ()
 
sal_Int32 GetStringPositionArgument ()
 Obtain a sal_Int32 suitable as string position or length argument. More...
 
bool CheckStringResultLen (OUString &rResult, sal_Int32 nIncrease)
 
bool CheckStringResultLen (OUStringBuffer &rResult, sal_Int32 nIncrease)
 
void TreatDoubleError (double &rVal)
 
bool LookupQueryWithCache (ScAddress &o_rResultPos, const ScQueryParam &rParam, const ScComplexRefData *refData) const
 
void ScIfJump ()
 
void ScIfError (bool bNAonly)
 
void ScChooseJump ()
 
bool JumpMatrix (short nStackLevel)
 
double Compare (ScQueryOp eOp)
 
sc::RangeMatrix CompareMat (ScQueryOp eOp, sc::CompareOptions *pOptions=nullptr)
 
ScMatrixRef QueryMat (const ScMatrixRef &pMat, sc::CompareOptions &rOptions)
 
void ScEqual ()
 
void ScNotEqual ()
 
void ScLess ()
 
void ScGreater ()
 
void ScLessEqual ()
 
void ScGreaterEqual ()
 
void ScAnd ()
 
void ScOr ()
 
void ScXor ()
 
void ScNot ()
 
void ScNeg ()
 
void ScPercentSign ()
 
void ScIntersect ()
 
void ScRangeFunc ()
 
void ScUnionFunc ()
 
void ScPi ()
 
void ScRandom ()
 
void ScRandbetween ()
 
void ScRandomImpl (const std::function< double(double fFirst, double fLast)> &RandomFunc, double fFirst, double fLast)
 
void ScTrue ()
 
void ScFalse ()
 
void ScDeg ()
 
void ScRad ()
 
void ScSin ()
 
void ScCos ()
 
void ScTan ()
 
void ScCot ()
 
void ScArcSin ()
 
void ScArcCos ()
 
void ScArcTan ()
 
void ScArcCot ()
 
void ScSinHyp ()
 
void ScCosHyp ()
 
void ScTanHyp ()
 
void ScCotHyp ()
 
void ScArcSinHyp ()
 
void ScArcCosHyp ()
 
void ScArcTanHyp ()
 
void ScArcCotHyp ()
 
void ScCosecant ()
 
void ScSecant ()
 
void ScCosecantHyp ()
 
void ScSecantHyp ()
 
void ScExp ()
 
void ScLn ()
 
void ScLog10 ()
 
void ScSqrt ()
 
void ScIsEmpty ()
 
bool IsString ()
 
void ScIsString ()
 
void ScIsNonString ()
 
void ScIsLogical ()
 
void ScType ()
 
void ScCell ()
 
void ScCellExternal ()
 
void ScIsRef ()
 
void ScIsValue ()
 
void ScIsFormula ()
 
void ScFormula ()
 
void ScRoman ()
 
void ScArabic ()
 
void ScIsNV ()
 
void ScIsErr ()
 
void ScIsError ()
 
bool IsEven ()
 
void ScIsEven ()
 
void ScIsOdd ()
 
void ScN ()
 
void ScCode ()
 
void ScTrim ()
 
void ScUpper ()
 
void ScProper ()
 
void ScLower ()
 
void ScLen ()
 
void ScT ()
 
void ScValue ()
 
void ScNumberValue ()
 
void ScClean ()
 
void ScChar ()
 
void ScJis ()
 
void ScAsc ()
 
void ScUnicode ()
 
void ScUnichar ()
 
void ScMin (bool bTextAsZero=false)
 
void ScMax (bool bTextAsZero=false)
 
size_t GetRefListArrayMaxSize (short nParamCount)
 Check for array of references to determine the maximum size of a return column vector if in array context. More...
 
bool SwitchToArrayRefList (ScMatrixRef &xResMat, SCSIZE nMatRows, double fCurrent, const std::function< void(SCSIZE i, double fCurrent)> &MatOpFunc, bool bDoMatOp)
 Switch to array reference list if current TOS is one and create/init or update matrix and return true. More...
 
void IterateParameters (ScIterFunc, bool bTextAsZero=false)
 
void ScSumSQ ()
 
void ScSum ()
 
void ScProduct ()
 
void ScAverage (bool bTextAsZero=false)
 
void ScCount ()
 
void ScCount2 ()
 
void GetStVarParams (bool bTextAsZero, double(*VarResult)(double fVal, size_t nValCount))
 
void ScVar (bool bTextAsZero=false)
 
void ScVarP (bool bTextAsZero=false)
 
void ScStDev (bool bTextAsZero=false)
 
void ScStDevP (bool bTextAsZero=false)
 
void ScRawSubtract ()
 The purpose of RAWSUBTRACT() is exactly to not apply any error correction, approximation etc. More...
 
void ScColumns ()
 
void ScRows ()
 
void ScSheets ()
 
void ScColumn ()
 
void ScRow ()
 
void ScSheet ()
 
void ScMatch ()
 
void IterateParametersIf (ScIterFuncIf)
 
void ScCountIf ()
 
void ScSumIf ()
 
void ScAverageIf ()
 
void IterateParametersIfs (double(*ResultFunc)(const sc::ParamIfsResult &rRes))
 
void ScSumIfs ()
 
void ScAverageIfs ()
 
void ScCountIfs ()
 
void ScCountEmptyCells ()
 
void ScLookup ()
 
void ScHLookup ()
 
void ScVLookup ()
 
void ScSubTotal ()
 
std::unique_ptr< ScDBQueryParamBaseGetDBParams (bool &rMissingField)
 
void DBIterator (ScIterFunc)
 
void ScDBSum ()
 
void ScDBCount ()
 
void ScDBCount2 ()
 
void ScDBAverage ()
 
void ScDBGet ()
 
void ScDBMax ()
 
void ScDBMin ()
 
void ScDBProduct ()
 
void GetDBStVarParams (double &rVal, double &rValCount)
 
void ScDBStdDev ()
 
void ScDBStdDevP ()
 
void ScDBVar ()
 
void ScDBVarP ()
 
void ScIndirect ()
 
void ScAddressFunc ()
 
void ScOffset ()
 
void ScIndex ()
 
void ScMultiArea ()
 
void ScAreas ()
 
void ScCurrency ()
 
void ScReplace ()
 
void ScFixed ()
 
void ScFind ()
 
void ScExact ()
 
void ScLeft ()
 
void ScRight ()
 
void ScSearch ()
 
void ScMid ()
 
void ScText ()
 
void ScSubstitute ()
 
void ScRept ()
 
void ScRegex ()
 
void ScConcat ()
 
void ScConcat_MS ()
 
void ScTextJoin_MS ()
 
void ScIfs_MS ()
 
void ScSwitch_MS ()
 
void ScMinIfs_MS ()
 
void ScMaxIfs_MS ()
 
void ScExternal ()
 
void ScMissing ()
 
void ScMacro ()
 
bool SetSbxVariable (SbxVariable *pVar, const ScAddress &)
 
FormulaError GetErrorType ()
 
void ScErrorType ()
 
void ScErrorType_ODF ()
 
void ScDBArea ()
 
void ScColRowNameAuto ()
 
void ScGetPivotData ()
 
void ScHyperLink ()
 
void ScBahtText ()
 
void ScBitAnd ()
 
void ScBitOr ()
 
void ScBitXor ()
 
void ScBitRshift ()
 
void ScBitLshift ()
 
void ScTTT ()
 
void ScDebugVar ()
 
double GetDateSerial (sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bStrict)
 Obtain the date serial number for a given date. More...
 
void ScGetActDate ()
 
void ScGetActTime ()
 
void ScGetYear ()
 
void ScGetMonth ()
 
void ScGetDay ()
 
void ScGetDayOfWeek ()
 
void ScGetWeekOfYear ()
 
void ScGetIsoWeekOfYear ()
 
void ScWeeknumOOo ()
 
void ScEasterSunday ()
 
FormulaError GetWeekendAndHolidayMasks (const sal_uInt8 nParamCount, const sal_uInt32 nNullDate, ::std::vector< double > &rSortArray, bool bWeekendMask[7])
 
FormulaError GetWeekendAndHolidayMasks_MS (const sal_uInt8 nParamCount, const sal_uInt32 nNullDate, ::std::vector< double > &rSortArray, bool bWeekendMask[7], bool bWorkdayFunction)
 
void ScNetWorkdays (bool bOOXML_Version)
 
void ScWorkday_MS ()
 
void ScGetHour ()
 
void ScGetMin ()
 
void ScGetSec ()
 
void ScPlusMinus ()
 
void ScAbs ()
 
void ScInt ()
 
void ScEven ()
 
void ScOdd ()
 
void ScCeil (bool bODFF)
 tdf69552 ODFF1.2 function CEILING and Excel function CEILING.MATH In essence, the difference between the two is that ODFF-CEILING needs to have arguments value and significance of the same sign and with CEILING.MATH the sign of argument significance is irrevelevant. More...
 
void ScCeil_MS ()
 
void ScCeil_Precise ()
 
void ScFloor (bool bODFF)
 tdf69552 ODFF1.2 function FLOOR and Excel function FLOOR.MATH In essence, the difference between the two is that ODFF-FLOOR needs to have arguments value and significance of the same sign and with FLOOR.MATH the sign of argument significance is irrevelevant. More...
 
void ScFloor_MS ()
 
void ScFloor_Precise ()
 
void RoundNumber (rtl_math_RoundingMode eMode)
 
void ScRound ()
 
void ScRoundUp ()
 
void ScRoundDown ()
 
void ScGetDateValue ()
 
void ScGetTimeValue ()
 
void ScArcTan2 ()
 
void ScLog ()
 
void ScGetDate ()
 
void ScGetTime ()
 
void ScGetDiffDate ()
 
void ScGetDiffDate360 ()
 
void ScGetDateDif ()
 
void ScPower ()
 
void ScAmpersand ()
 
void ScAdd ()
 
void ScSub ()
 
void ScMul ()
 
void ScDiv ()
 
void ScPow ()
 
void ScCurrent ()
 
void ScStyle ()
 
void ScDde ()
 
void ScBase ()
 
void ScDecimal ()
 
void ScConvertOOo ()
 
void ScEuroConvert ()
 
void ScRoundSignificant ()
 
void ScNPV ()
 
void ScIRR ()
 
void ScMIRR ()
 
void ScISPMT ()
 
void ScPV ()
 
void ScSYD ()
 
void ScDDB ()
 
void ScDB ()
 
void ScVDB ()
 
void ScPDuration ()
 
void ScSLN ()
 
void ScPMT ()
 
void ScRRI ()
 
void ScFV ()
 
void ScNper ()
 
void ScRate ()
 
double ScGetIpmt (double fRate, double fPer, double fNper, double fPv, double fFv, bool bPayInAdvance, double &fPmt)
 
void ScIpmt ()
 
void ScPpmt ()
 
void ScCumIpmt ()
 
void ScCumPrinc ()
 
void ScEffect ()
 
void ScNominal ()
 
void ScMod ()
 
void ScIntercept ()
 
void ScGCD ()
 
void ScLCM ()
 
void ScMatValue ()
 
void ScMatDet ()
 
void ScMatInv ()
 
void ScMatMult ()
 
void ScMatTrans ()
 
void ScEMat ()
 
void ScMatRef ()
 
ScMatrixRef MatConcat (const ScMatrixRef &pMat1, const ScMatrixRef &pMat2)
 
void ScSumProduct ()
 
void ScSumX2MY2 ()
 
void ScSumX2DY2 ()
 
void ScSumXMY2 ()
 
void ScGrowth ()
 
bool CalculateSkew (KahanSum &fSum, double &fCount, std::vector< double > &values)
 
void CalculateSkewOrSkewp (bool bSkewp)
 
void CalculateSlopeIntercept (bool bSlope)
 
void CalculateSmallLarge (bool bSmall)
 
void CalculatePearsonCovar (bool _bPearson, bool _bStexy, bool _bSample)
 
bool CalculateTest (bool _bTemplin, const SCSIZE nC1, const SCSIZE nC2, const SCSIZE nR1, const SCSIZE nR2, const ScMatrixRef &pMat1, const ScMatrixRef &pMat2, double &fT, double &fF)
 
void CalculateLookup (bool bHLookup)
 
bool FillEntry (ScQueryEntry &rEntry)
 
void CalculateAddSub (bool _bSub)
 
void CalculateTrendGrowth (bool _bGrowth)
 
void CalculateRGPRKP (bool _bRKP)
 
void CalculateSumX2MY2SumX2DY2 (bool _bSumX2DY2)
 
void CalculateMatrixValue (const ScMatrix *pMat, SCSIZE nC, SCSIZE nR)
 
bool CheckMatrix (bool _bLOG, sal_uInt8 &nCase, SCSIZE &nCX, SCSIZE &nCY, SCSIZE &nRX, SCSIZE &nRY, SCSIZE &M, SCSIZE &N, ScMatrixRef &pMatX, ScMatrixRef &pMatY)
 
void ScLinest ()
 
void ScLogest ()
 
void ScForecast ()
 
void ScForecast_Ets (ScETSType eETSType)
 
void ScFourier ()
 
void ScNoName ()
 
void ScBadName ()
 
double GetBetaDist (double x, double alpha, double beta)
 
double GetBetaDistPDF (double fX, double fA, double fB)
 
double GetChiDist (double fChi, double fDF)
 You must ensure fDF>0.0. More...
 
double GetChiSqDistCDF (double fX, double fDF)
 You must ensure fDF>0.0. More...
 
double GetFDist (double x, double fF1, double fF2)
 
double GetTDist (double T, double fDF, int nType)
 
double Fakultaet (double x)
 
double GetGamma (double x)
 You must ensure non integer arguments for fZ<1. More...
 
double GetBeta (double fAlpha, double fBeta)
 
double GetBinomDistPMF (double x, double n, double p)
 
double GetHypGeomDist (double x, double n, double M, double N)
 Calculates a value of the hypergeometric distribution. More...
 
void ScLogGamma ()
 
void ScGamma ()
 
void ScPhi ()
 
void ScGauss ()
 
void ScStdNormDist ()
 
void ScStdNormDist_MS ()
 
void ScFisher ()
 
void ScFisherInv ()
 
void ScFact ()
 
void ScNormDist (int nMinParamCount)
 
void ScGammaDist (bool bODFF)
 
void ScGammaInv ()
 
void ScExpDist ()
 
void ScBinomDist ()
 
void ScPoissonDist (bool bODFF)
 
void ScCombin ()
 
void ScCombinA ()
 
void ScPermut ()
 
void ScPermutationA ()
 
void ScB ()
 
void ScHypGeomDist (int nMinParamCount)
 Calculates a value of the hypergeometric distribution. More...
 
void ScLogNormDist (int nMinParamCount)
 
void ScLogNormInv ()
 
void ScTDist ()
 
void ScTDist_MS ()
 
void ScTDist_T (int nTails)
 
void ScFDist ()
 
void ScFDist_LT ()
 
void ScChiDist (bool bODFF)
 
void ScChiSqDist ()
 
void ScChiSqDist_MS ()
 
void ScChiSqInv ()
 
void ScWeibull ()
 
void ScBetaDist ()
 
void ScBetaDist_MS ()
 Microsoft version has parameters in different order Also, upper and lowerbound are optional and have default values and different constraints apply. More...
 
void ScFInv ()
 
void ScFInv_LT ()
 
void ScTInv (int nType)
 
void ScChiInv ()
 
void ScBetaInv ()
 
void ScCritBinom ()
 
void ScNegBinomDist ()
 
void ScNegBinomDist_MS ()
 
void ScKurt ()
 
void ScHarMean ()
 
void ScGeoMean ()
 
void ScStandard ()
 
void ScSkew ()
 
void ScSkewp ()
 
void ScMedian ()
 
double GetMedian (::std::vector< double > &rArray)
 
double GetPercentileExclusive (::std::vector< double > &rArray, double fPercentile)
 
std::vector< double > GetTopNumberArray (SCSIZE &rCol, SCSIZE &rRow)
 
void GetNumberSequenceArray (sal_uInt8 nParamCount, ::std::vector< double > &rArray, bool bConvertTextInArray)
 
void GetSortArray (sal_uInt8 nParamCount, ::std::vector< double > &rSortArray, ::std::vector< tools::Long > *pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray)
 
void ScModalValue ()
 
void ScModalValue_MS (bool bSingle)
 
void ScAveDev ()
 
void ScAggregate ()
 
void ScDevSq ()
 
void ScZTest ()
 
void ScTTest ()
 
void ScFTest ()
 
void ScChiTest ()
 
void ScRank (bool bAverage)
 
void ScPercentile (bool bInclusive)
 
void ScPercentrank (bool bInclusive)
 
void ScLarge ()
 
void ScSmall ()
 
void ScFrequency ()
 
void ScQuartile (bool bInclusive)
 
void ScNormInv ()
 
void ScSNormInv ()
 
void ScConfidence ()
 
void ScConfidenceT ()
 
void ScTrimMean ()
 
void ScProbability ()
 
void ScCorrel ()
 
void ScCovarianceP ()
 
void ScCovarianceS ()
 
void ScPearson ()
 
void ScRSQ ()
 
void ScSTEYX ()
 
void ScSlope ()
 
void ScTrend ()
 
void ScInfo ()
 
void ScLenB ()
 
void ScRightB ()
 
void ScLeftB ()
 
void ScMidB ()
 
void ScReplaceB ()
 
void ScFindB ()
 
void ScSearchB ()
 
void ScFilterXML ()
 
void ScWebservice ()
 
void ScEncodeURL ()
 Returns a string in which all non-alphanumeric characters except stroke and underscore (-_) have been replaced with a percent (%) sign followed by hex digits. More...
 
void ScColor ()
 
void ScErf ()
 
void ScErfc ()
 
double GetGammaContFraction (double fA, double fX)
 You must ensure fA>0.0 && fX>0.0 valid results only if fX > fA+1.0 uses continued fraction with odd items. More...
 
double GetGammaSeries (double fA, double fX)
 You must ensure fA>0.0 && fX>0.0 valid results only if fX <= fA+1.0 uses power series. More...
 
double GetLowRegIGamma (double fA, double fX)
 You must ensure fA>0.0 && fX>0.0) More...
 
double GetUpRegIGamma (double fA, double fX)
 You must ensure fA>0.0 && fX>0.0) More...
 
double GetGammaDistPDF (double fX, double fAlpha, double fLambda)
 Gamma distribution, probability density function. More...
 
double GetGammaDist (double fX, double fAlpha, double fLambda)
 Gamma distribution, cumulative distribution function. More...
 
double GetTInv (double fAlpha, double fSize, int nType)
 

Static Private Member Functions

static ScCalcConfigGetOrCreateGlobalConfig ()
 
static FormulaError GetCellErrCode (const ScRefCellValue &rCell)
 
static bool CheckStringPositionArgument (double &fVal)
 Check if a double is suitable as string position or length argument. More...
 
static sal_Int16 GetDayOfWeek (sal_Int32 n)
 
static void RoundSignificant (double fX, double fDigits, double &fRes)
 
static double ScGetPV (double fRate, double fNper, double fPmt, double fFv, bool bPayInAdvance)
 
static double ScGetDDB (double fCost, double fSalvage, double fLife, double fPeriod, double fFactor)
 
static double ScInterVDB (double fCost, double fSalvage, double fLife, double fLife1, double fPeriod, double fFactor)
 
static double ScGetPMT (double fRate, double fNper, double fPv, double fFv, bool bPayInAdvance)
 
static double ScGetFV (double fRate, double fNper, double fPmt, double fPv, bool bPayInAdvance)
 
static bool RateIteration (double fNper, double fPayment, double fPv, double fFv, bool bPayType, double &fGuess)
 
static void MEMat (const ScMatrixRef &mM, SCSIZE n)
 
static double taylor (const double *pPolynom, sal_uInt16 nMax, double x)
 
static double gauss (double x)
 
static double GetChiSqDistPDF (double fX, double fDF)
 
static double BinomKoeff (double n, double k)
 
static double GetLogGamma (double x)
 You must ensure fZ>0. More...
 
static double GetLogBeta (double fAlpha, double fBeta)
 
static void QuickSort (::std::vector< double > &rSortArray, ::std::vector< tools::Long > *pIndexOrder)
 
static double GetPercentrank (::std::vector< double > &rArray, double fVal, bool bInclusive)
 

Private Attributes

ScCalcConfig maCalcConfig
 
formula::FormulaTokenIterator aCode
 
ScAddress aPos
 
ScTokenArraypArr
 
ScInterpreterContextmrContext
 
ScDocumentmrDoc
 
sfx2::LinkManagermpLinkManager
 
svl::SharedStringPoolmrStrPool
 
formula::FormulaConstTokenRef xResult
 
ScJumpMatrixpJumpMatrix
 
ScTokenMatrixMap maTokenMatrixMap
 
ScFormulaCellpMyFormulaCell
 
SvNumberFormatterpFormatter
 
const formula::FormulaTokenpCur
 
ScTokenStackpStackObj
 
const formula::FormulaToken ** pStack
 
FormulaError nGlobalError
 
sal_uInt16 sp
 
sal_uInt16 maxsp
 
sal_uInt32 nFuncFmtIndex
 
sal_uInt32 nCurFmtIndex
 
sal_uInt32 nRetFmtIndex
 
SvNumFormatType nFuncFmtType
 
SvNumFormatType nCurFmtType
 
SvNumFormatType nRetFmtType
 
FormulaError mnStringNoValueError
 
SubtotalFlags mnSubTotalFlags
 
sal_uInt8 cPar
 
bool bCalcAsShown
 
bool bMatrixFormula
 
VolatileType meVolatileType
 

Static Private Attributes

static ScCalcConfigmpGlobalConfig = nullptr
 
static thread_local std::unique_ptr< ScTokenStackpGlobalStack
 
static thread_local bool bGlobalStackInUse = false
 
static const double fMaxGammaArgument = 171.624376956302
 

Friends

class ScGammaDistFunction
 
class ScBetaDistFunction
 
class ScTDistFunction
 
class ScFDistFunction
 
class ScChiDistFunction
 
class ScChiSqDistFunction
 

Detailed Description

Definition at line 137 of file interpre.hxx.

Member Enumeration Documentation

◆ VolatileType

Enumerator
VOLATILE 
VOLATILE_MACRO 
NOT_VOLATILE 

Definition at line 166 of file interpre.hxx.

Constructor & Destructor Documentation

◆ ScInterpreter()

ScInterpreter::ScInterpreter ( ScFormulaCell pCell,
ScDocument rDoc,
ScInterpreterContext rContext,
const ScAddress rPos,
ScTokenArray r,
bool  bForGroupThreading = false 
)

◆ ~ScInterpreter()

ScInterpreter::~ScInterpreter ( )

Definition at line 3846 of file interpr4.cxx.

References bGlobalStackInUse, pGlobalStack, and pStackObj.

Member Function Documentation

◆ AssertFormulaMatrix()

void ScInterpreter::AssertFormulaMatrix ( )

Definition at line 4777 of file interpr4.cxx.

References bMatrixFormula.

Referenced by ScSimpleFormulaCalculator::Calculate().

◆ BinomKoeff()

double ScInterpreter::BinomKoeff ( double  n,
double  k 
)
staticprivate

Definition at line 460 of file interpr3.cxx.

References n.

Referenced by ScCombin(), and ScCombinA().

◆ CalculateAddSub()

void ScInterpreter::CalculateAddSub ( bool  _bSub)
private

◆ CalculateLookup()

void ScInterpreter::CalculateLookup ( bool  bHLookup)
private

◆ CalculateMatrixValue()

void ScInterpreter::CalculateMatrixValue ( const ScMatrix pMat,
SCSIZE  nC,
SCSIZE  nR 
)
private

◆ CalculatePearsonCovar()

void ScInterpreter::CalculatePearsonCovar ( bool  _bPearson,
bool  _bStexy,
bool  _bSample 
)
private

◆ CalculateRGPRKP()

void ScInterpreter::CalculateRGPRKP ( bool  _bRKP)
private

◆ CalculateSkew()

bool ScInterpreter::CalculateSkew ( KahanSum fSum,
double &  fCount,
std::vector< double > &  values 
)
private

◆ CalculateSkewOrSkewp()

void ScInterpreter::CalculateSkewOrSkewp ( bool  bSkewp)
private

Definition at line 3316 of file interpr3.cxx.

References CalculateSkew(), KahanSum::get(), PushDouble(), PushError(), PushIllegalArgument(), v, and values.

Referenced by ScSkew(), and ScSkewp().

◆ CalculateSlopeIntercept()

void ScInterpreter::CalculateSlopeIntercept ( bool  bSlope)
private

◆ CalculateSmallLarge()

void ScInterpreter::CalculateSmallLarge ( bool  bSmall)
private

◆ CalculateSumX2MY2SumX2DY2()

void ScInterpreter::CalculateSumX2MY2SumX2DY2 ( bool  _bSumX2DY2)
private

◆ CalculateTest()

bool ScInterpreter::CalculateTest ( bool  _bTemplin,
const SCSIZE  nC1,
const SCSIZE  nC2,
const SCSIZE  nR1,
const SCSIZE  nR2,
const ScMatrixRef pMat1,
const ScMatrixRef pMat2,
double &  fT,
double &  fF 
)
private

Definition at line 2580 of file interpr3.cxx.

References KahanSum::get(), get(), i, and PushNoValue().

Referenced by ScTTest().

◆ CalculateTrendGrowth()

void ScInterpreter::CalculateTrendGrowth ( bool  _bGrowth)
private

◆ CheckMatrix()

bool ScInterpreter::CheckMatrix ( bool  _bLOG,
sal_uInt8 nCase,
SCSIZE nCX,
SCSIZE nCY,
SCSIZE nRX,
SCSIZE nRY,
SCSIZE M,
SCSIZE N,
ScMatrixRef pMatX,
ScMatrixRef pMatY 
)
private

Definition at line 2272 of file interpr5.cxx.

References GetNewMat(), i, log, M, N, and PushIllegalArgument().

Referenced by CalculateRGPRKP(), and CalculateTrendGrowth().

◆ CheckStringPositionArgument()

bool ScInterpreter::CheckStringPositionArgument ( double &  fVal)
inlinestaticprivate

Check if a double is suitable as string position or length argument.

If fVal is Inf or NaN it is changed to -1, if it is less than 0 it is sanitized to 0, if it is greater than some implementation defined max string length it is sanitized to that max.

Returns
TRUE if double value fVal is suitable as string argument and was not sanitized. FALSE if not and fVal was adapted.

Definition at line 1077 of file interpre.hxx.

References SAL_MAX_INT32.

Referenced by GetStringPositionArgument(), and ScRegex().

◆ CheckStringResultLen() [1/2]

bool ScInterpreter::CheckStringResultLen ( OUString &  rResult,
sal_Int32  nIncrease 
)
inlineprivate

◆ CheckStringResultLen() [2/2]

bool ScInterpreter::CheckStringResultLen ( OUStringBuffer &  rResult,
sal_Int32  nIncrease 
)
inlineprivate

Definition at line 1119 of file interpre.hxx.

References kScInterpreterMaxStrLen, and SetError().

◆ Compare()

double ScInterpreter::Compare ( ScQueryOp  eOp)
private

◆ CompareMat()

sc::RangeMatrix ScInterpreter::CompareMat ( ScQueryOp  eOp,
sc::CompareOptions pOptions = nullptr 
)
private

◆ ConvertMatrixJumpConditionToMatrix()

void ScInterpreter::ConvertMatrixJumpConditionToMatrix ( )
private

◆ ConvertMatrixParameters()

bool ScInterpreter::ConvertMatrixParameters ( )
private

◆ ConvertStringToValue() [1/2]

double ScInterpreter::ConvertStringToValue ( const OUString &  rStr)
private

◆ ConvertStringToValue() [2/2]

double ScInterpreter::ConvertStringToValue ( const OUString &  rStr,
FormulaError rError,
SvNumFormatType rCurFmtType 
)

For matrix back calls into the current interpreter.

Uses rError instead of nGlobalError and rCurFmtType instead of nCurFmtType.

Definition at line 172 of file interpr4.cxx.

References ScGlobal::ConvertStringToValue(), maCalcConfig, mnStringNoValueError, and pFormatter.

◆ CreateCellArr()

bool ScInterpreter::CreateCellArr ( SCCOL  nCol1,
SCROW  nRow1,
SCTAB  nTab1,
SCCOL  nCol2,
SCROW  nRow2,
SCTAB  nTab2,
sal_uInt8 pCellArr 
)
private

◆ CreateDoubleArr()

bool ScInterpreter::CreateDoubleArr ( SCCOL  nCol1,
SCROW  nRow1,
SCTAB  nTab1,
SCCOL  nCol2,
SCROW  nRow2,
SCTAB  nTab2,
sal_uInt8 pCellArr 
)
private

◆ CreateDoubleOrTypedToken()

formula::FormulaToken * ScInterpreter::CreateDoubleOrTypedToken ( double  fVal)
private

Definition at line 1779 of file interpr4.cxx.

References CreateFormulaDoubleToken(), and nFuncFmtType.

Referenced by PushDouble(), and PushInt().

◆ CreateFormulaDoubleToken()

formula::FormulaToken * ScInterpreter::CreateFormulaDoubleToken ( double  fVal,
SvNumFormatType  nFmt = SvNumFormatType::NUMBER 
)
private

◆ CreateMatrixFromDoubleRef()

ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef ( const formula::FormulaToken pToken,
SCCOL  nCol1,
SCROW  nRow1,
SCTAB  nTab1,
SCCOL  nCol2,
SCROW  nRow2,
SCTAB  nTab2 
)
private

◆ CreateStringArr()

bool ScInterpreter::CreateStringArr ( SCCOL  nCol1,
SCROW  nRow1,
SCTAB  nTab1,
SCCOL  nCol2,
SCROW  nRow2,
SCTAB  nTab2,
sal_uInt8 pCellArr 
)
private

◆ CurFmtToFuncFmt()

void ScInterpreter::CurFmtToFuncFmt ( )
inlineprivate

Definition at line 453 of file interpre.hxx.

References nCurFmtIndex, nCurFmtType, nFuncFmtIndex, and nFuncFmtType.

Referenced by IterateParameters(), ScMax(), and ScMin().

◆ DBIterator()

void ScInterpreter::DBIterator ( ScIterFunc  eFunc)
private

◆ DetectSearchType()

utl::SearchParam::SearchType ScInterpreter::DetectSearchType ( std::u16string_view  rStr,
const ScDocument rDoc 
)
static

◆ div()

double ScInterpreter::div ( const double &  fNumerator,
const double &  fDenominator 
)
inlinestatic

Fail safe division, returning a FormulaError::DivisionByZero coded into a double if denominator is 0.0.

Definition at line 1143 of file interpre.hxx.

References sc::div().

Referenced by DBIterator(), GetPercentrank(), IterateParametersIf(), ScDiv(), ScMIRR(), and ScSLN().

◆ double_to_int32()

sal_Int32 ScInterpreter::double_to_int32 ( double  fVal)
private

Definition at line 2175 of file interpr4.cxx.

References GetDoubleErrorValue(), SAL_MAX_INT32, SAL_MIN_INT32, and SetError().

Referenced by GetInt32(), and GetInt32WithDefault().

◆ DoubleRefToPosSingleRef()

bool ScInterpreter::DoubleRefToPosSingleRef ( const ScRange rRange,
ScAddress rAdr 
)
private

◆ DoubleRefToRange()

void ScInterpreter::DoubleRefToRange ( const ScComplexRefData rCRef,
ScRange rRange,
bool  bDontCheckForTableOp = false 
)
private

◆ DoubleRefToVars()

void ScInterpreter::DoubleRefToVars ( const formula::FormulaToken p,
SCCOL rCol1,
SCROW rRow1,
SCTAB rTab1,
SCCOL rCol2,
SCROW rRow2,
SCTAB rTab2 
)
private

◆ Fakultaet()

double ScInterpreter::Fakultaet ( double  x)
private

Definition at line 439 of file interpr3.cxx.

References SetError(), and x.

Referenced by ScFact().

◆ FillEntry()

bool ScInterpreter::FillEntry ( ScQueryEntry rEntry)
private

◆ gauss()

double ScInterpreter::gauss ( double  x)
staticprivate

Definition at line 215 of file interpr3.cxx.

References phi(), taylor(), and x.

Referenced by ScGauss(), and ScZTest().

◆ gaussinv()

double ScInterpreter::gaussinv ( double  x)
static

Definition at line 268 of file interpr3.cxx.

References log, t, x, and z.

Referenced by ScConfidence(), ScLogNormInv(), ScNormInv(), and ScSNormInv().

◆ GetBeta()

double ScInterpreter::GetBeta ( double  fAlpha,
double  fBeta 
)
private

Definition at line 800 of file interpr3.cxx.

References fMaxGammaArgument, GetGamma(), and lcl_getLanczosSum().

Referenced by GetBetaDistPDF(), GetTDist(), and ScFDist_LT().

◆ GetBetaDist()

double ScInterpreter::GetBetaDist ( double  x,
double  alpha,
double  beta 
)
private

◆ GetBetaDistPDF()

double ScInterpreter::GetBetaDistPDF ( double  fX,
double  fA,
double  fB 
)
private

Definition at line 862 of file interpr3.cxx.

References GetBeta(), GetLogBeta(), log, and SetError().

Referenced by GetBetaDist(), GetBinomDistPMF(), ScBetaDist(), ScBetaDist_MS(), and ScCritBinom().

◆ GetBinomDistPMF()

double ScInterpreter::GetBinomDistPMF ( double  x,
double  n,
double  p 
)
private

Definition at line 1232 of file interpr3.cxx.

References GetBetaDistPDF(), i, max, n, p, and x.

Referenced by ScB(), and ScBinomDist().

◆ GetBool()

bool ScInterpreter::GetBool ( )
inlineprivate

◆ GetByte()

sal_uInt8 ScInterpreter::GetByte ( ) const
inlineprivate

Definition at line 415 of file interpre.hxx.

References cPar.

Referenced by CalculateLookup(), CalculatePearsonCovar(), CalculateRGPRKP(), CalculateSkew(), CalculateSlopeIntercept(), CalculateSmallLarge(), CalculateSumX2MY2SumX2DY2(), CalculateTrendGrowth(), GetDBParams(), GetStVarParams(), IterateParameters(), IterateParametersIf(), IterateParametersIfs(), RoundNumber(), ScAddressFunc(), ScAggregate(), ScAnd(), ScArcTan2(), ScAreas(), ScAsc(), ScAveDev(), ScAverageIfs(), ScB(), ScBadName(), ScBahtText(), ScBase(), ScBetaDist(), ScBetaDist_MS(), ScBetaInv(), ScBinomDist(), ScBitAnd(), ScBitLshift(), ScBitOr(), ScBitRshift(), ScBitXor(), ScCeil(), ScCeil_MS(), ScCeil_Precise(), ScCell(), ScChiDist(), ScChiInv(), ScChiSqDist(), ScChiSqDist_MS(), ScChiSqInv(), ScChiTest(), ScColor(), ScColumn(), ScColumns(), ScCombin(), ScCombinA(), ScConcat(), ScConcat_MS(), ScConfidence(), ScConfidenceT(), ScConvertOOo(), ScCountEmptyCells(), ScCountIf(), ScCountIfs(), ScCritBinom(), ScCumIpmt(), ScCumPrinc(), ScCurrency(), ScDB(), ScDDB(), ScDde(), ScDebugVar(), ScDecimal(), ScEasterSunday(), ScEffect(), ScEMat(), ScEncodeURL(), ScErf(), ScErfc(), ScEuroConvert(), ScExact(), ScExpDist(), ScExternal(), ScFDist(), ScFDist_LT(), ScFilterXML(), ScFind(), ScFindB(), ScFInv(), ScFInv_LT(), ScFixed(), ScFloor(), ScFloor_MS(), ScFloor_Precise(), ScForecast(), ScForecast_Ets(), ScFourier(), ScFrequency(), ScFTest(), ScFV(), ScGammaDist(), ScGammaInv(), ScGCD(), ScGeoMean(), ScGetDate(), ScGetDateDif(), ScGetDayOfWeek(), ScGetDiffDate(), ScGetDiffDate360(), ScGetIsoWeekOfYear(), ScGetPivotData(), ScGetTime(), ScGetWeekOfYear(), ScHarMean(), ScHyperLink(), ScHypGeomDist(), ScIfs_MS(), ScIndex(), ScIndirect(), ScInfo(), ScIpmt(), ScIRR(), ScISPMT(), ScJis(), ScLCM(), ScLeft(), ScLeftB(), ScLog(), ScLogNormDist(), ScLogNormInv(), ScLookup(), ScMacro(), ScMatch(), ScMatDet(), ScMatInv(), ScMatMult(), ScMatTrans(), ScMatValue(), ScMax(), ScMaxIfs_MS(), ScMedian(), ScMid(), ScMidB(), ScMin(), ScMinIfs_MS(), ScMIRR(), ScMod(), ScModalValue(), ScModalValue_MS(), ScMultiArea(), ScNegBinomDist(), ScNegBinomDist_MS(), ScNetWorkdays(), ScNominal(), ScNormDist(), ScNormInv(), ScNper(), ScNPV(), ScNumberValue(), ScOffset(), ScOr(), ScPDuration(), ScPercentile(), ScPercentrank(), ScPermut(), ScPermutationA(), ScPMT(), ScPoissonDist(), ScPower(), ScPpmt(), ScProbability(), ScPV(), ScQuartile(), ScRandbetween(), ScRank(), ScRate(), ScRawSubtract(), ScRegex(), ScReplace(), ScReplaceB(), ScRept(), ScRight(), ScRightB(), ScRoman(), ScRoundSignificant(), ScRow(), ScRows(), ScRRI(), ScSearch(), ScSearchB(), ScSheet(), ScSheets(), ScSLN(), ScStandard(), ScStdNormDist_MS(), ScStyle(), ScSubstitute(), ScSubTotal(), ScSumIfs(), ScSumProduct(), ScSumXMY2(), ScSwitch_MS(), ScSYD(), ScTableOp(), ScTDist(), ScTDist_MS(), ScTDist_T(), ScText(), ScTextJoin_MS(), ScTInv(), ScTrimMean(), ScTTest(), ScTTT(), ScUnichar(), ScUnicode(), ScVDB(), ScWebservice(), ScWeeknumOOo(), ScWeibull(), ScWorkday_MS(), ScXor(), and ScZTest().

◆ GetCellErrCode()

FormulaError ScInterpreter::GetCellErrCode ( const ScRefCellValue rCell)
staticprivate

◆ GetCellNumberFormat()

sal_uInt32 ScInterpreter::GetCellNumberFormat ( const ScAddress rPos,
ScRefCellValue rCell 
)
private

◆ GetCellString()

void ScInterpreter::GetCellString ( svl::SharedString rStr,
ScRefCellValue rCell 
)
private

◆ GetCellValue()

double ScInterpreter::GetCellValue ( const ScAddress rPos,
ScRefCellValue rCell 
)
private

◆ GetCellValueOrZero()

double ScInterpreter::GetCellValueOrZero ( const ScAddress rPos,
ScRefCellValue rCell 
)
private

◆ GetChiDist()

double ScInterpreter::GetChiDist ( double  fChi,
double  fDF 
)
private

You must ensure fDF>0.0.

Definition at line 669 of file interpr3.cxx.

References GetUpRegIGamma().

Referenced by ScChiDistFunction::GetValue(), ScChiDist(), and ScChiTest().

◆ GetChiSqDistCDF()

double ScInterpreter::GetChiSqDistCDF ( double  fX,
double  fDF 
)
private

You must ensure fDF>0.0.

Definition at line 681 of file interpr3.cxx.

References GetLowRegIGamma().

Referenced by ScChiSqDistFunction::GetValue(), ScChiSqDist(), and ScChiSqDist_MS().

◆ GetChiSqDistPDF()

double ScInterpreter::GetChiSqDistPDF ( double  fX,
double  fDF 
)
staticprivate

Definition at line 689 of file interpr3.cxx.

References GetLogGamma(), and log.

Referenced by ScChiSqDist(), and ScChiSqDist_MS().

◆ GetDateSerial()

double ScInterpreter::GetDateSerial ( sal_Int16  nYear,
sal_Int16  nMonth,
sal_Int16  nDay,
bool  bStrict 
)
private

Obtain the date serial number for a given date.

Parameters
bStrictIf false, nYear < 100 takes the two-digit year setting into account, and rollover of invalid calendar dates takes place, e.g. 1999-02-31 => 1999-03-03. If true, the date passed must be a valid Gregorian calendar date. No two-digit expanding or rollover is done.

Date must be Gregorian, i.e. >= 1582-10-15.

Definition at line 59 of file interpr2.cxx.

References Date::AddDays(), SvNumberFormatter::ExpandTwoDigitYear(), SvNumberFormatter::GetNullDate(), Date::IsValidAndGregorian(), pFormatter, and SetError().

Referenced by ScEasterSunday(), and ScGetDate().

◆ GetDayOfWeek()

sal_Int16 ScInterpreter::GetDayOfWeek ( sal_Int32  n)
inlinestaticprivate

Definition at line 1148 of file interpre.hxx.

References n.

Referenced by ScNetWorkdays(), and ScWorkday_MS().

◆ GetDBParams()

std::unique_ptr< ScDBQueryParamBase > ScInterpreter::GetDBParams ( bool &  rMissingField)
private

◆ GetDBStVarParams()

void ScInterpreter::GetDBStVarParams ( double &  rVal,
double &  rValCount 
)
private

◆ GetDouble()

double ScInterpreter::GetDouble ( )
private

Definition at line 2085 of file interpr4.cxx.

References ConvertStringToValue(), DoubleRefToPosSingleRef(), GetCellValue(), GetDoubleFromMatrix(), GetRawStackType(), getString(), mrDoc, nCurFmtIndex, nCurFmtType, nFuncFmtIndex, nFuncFmtType, nGlobalError, Pop(), PopDouble(), PopDoubleRef(), PopError(), PopExternalDoubleRef(), PopExternalSingleRef(), PopMatrix(), PopSingleRef(), PopString(), SetError(), svDouble, svDoubleRef, svEmptyCell, svError, svExternalDoubleRef, svExternalSingleRef, svMatrix, svMissing, svSingleRef, and svString.

Referenced by CalculateAddSub(), CalculateLookup(), CalculateSkew(), Compare(), CompareMat(), FillEntry(), GetBool(), GetDBParams(), GetDoubleWithDefault(), GetInt16(), GetInt32(), GetInt32WithDefault(), GetMatrix(), GetStringPositionArgument(), GetStVarParams(), GetUInt32(), IterateParameters(), IterateParametersIf(), IterateParametersIfs(), JumpMatrix(), RoundNumber(), ScAbs(), ScArcCos(), ScArcCosHyp(), ScArcCot(), ScArcCotHyp(), ScArcSin(), ScArcSinHyp(), ScArcTan(), ScArcTan2(), ScArcTanHyp(), ScAveDev(), ScB(), ScBahtText(), ScBase(), ScBetaDist(), ScBetaDist_MS(), ScBetaInv(), ScBinomDist(), ScBitAnd(), ScBitLshift(), ScBitOr(), ScBitRshift(), ScBitXor(), ScCeil(), ScCeil_MS(), ScCeil_Precise(), ScChar(), ScChiDist(), ScChiInv(), ScChiSqDist(), ScChiSqDist_MS(), ScChiSqInv(), ScColor(), ScCombin(), ScCombinA(), ScConfidence(), ScConfidenceT(), ScConvertOOo(), ScCos(), ScCosecant(), ScCosecantHyp(), ScCosHyp(), ScCot(), ScCotHyp(), ScCountIf(), ScCritBinom(), ScCumIpmt(), ScCumPrinc(), ScCurrency(), ScDB(), ScDDB(), ScDecimal(), ScDeg(), ScDiv(), ScEffect(), ScErf(), ScErfc(), ScEuroConvert(), ScEven(), ScExp(), ScExpDist(), ScExternal(), ScFact(), ScFDist(), ScFDist_LT(), ScFind(), ScFInv(), ScFInv_LT(), ScFisher(), ScFisherInv(), ScFixed(), ScFloor(), ScFloor_MS(), ScFloor_Precise(), ScForecast(), ScFourier(), ScFV(), ScGamma(), ScGammaDist(), ScGammaInv(), ScGauss(), ScGCD(), ScGeoMean(), ScGetDiffDate(), ScGetHour(), ScGetMin(), ScGetSec(), ScGetTime(), ScHarMean(), ScHyperLink(), ScHypGeomDist(), ScIndirect(), ScInt(), ScIpmt(), ScIRR(), ScISPMT(), ScLCM(), ScLn(), ScLog(), ScLog10(), ScLogGamma(), ScLogNormDist(), ScLogNormInv(), ScLookup(), ScMacro(), ScMatch(), ScMax(), ScMin(), ScMIRR(), ScMod(), ScMul(), ScN(), ScNeg(), ScNegBinomDist(), ScNegBinomDist_MS(), ScNominal(), ScNormDist(), ScNormInv(), ScNot(), ScNper(), ScNPV(), ScOdd(), ScPDuration(), ScPercentile(), ScPercentrank(), ScPermut(), ScPermutationA(), ScPhi(), ScPlusMinus(), ScPMT(), ScPoissonDist(), ScPow(), ScPpmt(), ScProbability(), ScPV(), ScQuartile(), ScRad(), ScRandbetween(), ScRank(), ScRate(), ScRawSubtract(), ScRoman(), ScRoundSignificant(), ScRRI(), ScSecant(), ScSecantHyp(), ScSin(), ScSinHyp(), ScSLN(), ScSNormInv(), ScSqrt(), ScStandard(), ScStdNormDist(), ScStdNormDist_MS(), ScStyle(), ScSwitch_MS(), ScSYD(), ScTan(), ScTanHyp(), ScTDist(), ScTDist_MS(), ScTDist_T(), ScText(), ScTextJoin_MS(), ScTInv(), ScTrimMean(), ScTTest(), ScVDB(), ScWeibull(), and ScZTest().

◆ GetDoubleFromMatrix()

double ScInterpreter::GetDoubleFromMatrix ( const ScMatrixRef pMat)
private

Definition at line 2044 of file interpr4.cxx.

References GetDoubleErrorValue(), ScJumpMatrix::GetPos(), pJumpMatrix, and SetError().

Referenced by GetDouble().

◆ GetDoubleOrString()

bool ScInterpreter::GetDoubleOrString ( double &  rValue,
svl::SharedString rString 
)
private

◆ GetDoubleOrStringFromMatrix()

ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix ( double &  rDouble,
svl::SharedString rString 
)
private

◆ GetDoubleWithDefault()

double ScInterpreter::GetDoubleWithDefault ( double  nDefault)
private

◆ GetError()

FormulaError ScInterpreter::GetError ( ) const
inline

Definition at line 1014 of file interpre.hxx.

References nGlobalError.

Referenced by ScFormulaCell::InterpretTail(), ScExternal(), and ScSubstitute().

◆ GetErrorType()

FormulaError ScInterpreter::GetErrorType ( )
private

◆ GetExternalDoubleRef()

void ScInterpreter::GetExternalDoubleRef ( sal_uInt16  nFileId,
const OUString &  rTabName,
const ScComplexRefData aData,
ScExternalRefCache::TokenArrayRef rArray 
)
private

◆ GetFDist()

double ScInterpreter::GetFDist ( double  x,
double  fF1,
double  fF2 
)
private

Definition at line 640 of file interpr3.cxx.

References GetBetaDist(), and x.

Referenced by ScFDistFunction::GetValue(), ScFDist(), ScFDist_LT(), and ScFTest().

◆ GetGamma()

double ScInterpreter::GetGamma ( double  x)
private

You must ensure non integer arguments for fZ<1.

Definition at line 585 of file interpr3.cxx.

References fMaxGammaArgument, lcl_GetGammaHelper(), lcl_GetLogGammaHelper(), log, and SetError().

Referenced by GetBeta(), GetGammaDistPDF(), and ScGamma().

◆ GetGammaContFraction()

double ScInterpreter::GetGammaContFraction ( double  fA,
double  fX 
)
private

You must ensure fA>0.0 && fX>0.0 valid results only if fX > fA+1.0 uses continued fraction with odd items.

Definition at line 44 of file interpr6.cxx.

References fHalfMachEps, and SetError().

Referenced by GetLowRegIGamma(), and GetUpRegIGamma().

◆ GetGammaDist()

double ScInterpreter::GetGammaDist ( double  fX,
double  fAlpha,
double  fLambda 
)
private

Gamma distribution, cumulative distribution function.

fLambda is "scale" parameter You must ensure fAlpha>0.0 and fLambda>0.0

Definition at line 198 of file interpr6.cxx.

References GetLowRegIGamma().

Referenced by ScGammaDistFunction::GetValue(), and ScGammaDist().

◆ GetGammaDistPDF()

double ScInterpreter::GetGammaDistPDF ( double  fX,
double  fAlpha,
double  fLambda 
)
private

Gamma distribution, probability density function.

fLambda is "scale" parameter You must ensure fAlpha>0.0 and fLambda>0.0

Definition at line 144 of file interpr6.cxx.

References fMaxGammaArgument, GetGamma(), GetLogGamma(), log, and SetError().

Referenced by ScGammaDist().

◆ GetGammaSeries()

double ScInterpreter::GetGammaSeries ( double  fA,
double  fX 
)
private

You must ensure fA>0.0 && fX>0.0 valid results only if fX <= fA+1.0 uses power series.

Definition at line 96 of file interpr6.cxx.

References fHalfMachEps, nCount, and SetError().

Referenced by GetLowRegIGamma(), and GetUpRegIGamma().

◆ GetGlobalConfig()

const ScCalcConfig & ScInterpreter::GetGlobalConfig ( )
static

◆ GetHypGeomDist()

double ScInterpreter::GetHypGeomDist ( double  x,
double  n,
double  M,
double  N 
)
private

Calculates a value of the hypergeometric distribution.

The algorithm is designed to avoid unnecessary multiplications and division by expanding all factorial elements (9 of them). It is done by excluding those ranges that overlap in the numerator and the denominator. This allows for a fast calculation for large values which would otherwise cause an overflow in the intermediate values.

See also
#i47296#

Definition at line 1895 of file interpr3.cxx.

References lcl_PutFactorialElements(), M, N, n, PushNoValue(), and x.

Referenced by ScHypGeomDist().

◆ GetInt16()

sal_Int16 ScInterpreter::GetInt16 ( )
private

if GetDouble() not within int16 limits sets nGlobalError and returns SAL_MAX_INT16

Definition at line 2217 of file interpr4.cxx.

References GetDouble(), GetDoubleErrorValue(), SAL_MAX_INT16, SAL_MIN_INT16, and SetError().

Referenced by RoundNumber(), ScAddressFunc(), ScChooseJump(), ScEasterSunday(), ScGetDate(), ScGetDayOfWeek(), ScGetWeekOfYear(), ScIndex(), and ScWeeknumOOo().

◆ GetInt32()

sal_Int32 ScInterpreter::GetInt32 ( )
private

◆ GetInt32WithDefault()

sal_Int32 ScInterpreter::GetInt32WithDefault ( sal_Int32  nDefault)
private

if GetDoubleWithDefault() not within int32 limits sets nGlobalError and returns SAL_MAX_INT32

Definition at line 2208 of file interpr4.cxx.

References double_to_int32(), GetDouble(), and IsMissing().

Referenced by ScAddressFunc().

◆ GetLogBeta()

double ScInterpreter::GetLogBeta ( double  fAlpha,
double  fBeta 
)
staticprivate

Definition at line 833 of file interpr3.cxx.

References lcl_getLanczosSum(), and log.

Referenced by GetBetaDist(), and GetBetaDistPDF().

◆ GetLogGamma()

double ScInterpreter::GetLogGamma ( double  x)
staticprivate

◆ GetLowRegIGamma()

double ScInterpreter::GetLowRegIGamma ( double  fA,
double  fX 
)
private

You must ensure fA>0.0 && fX>0.0)

Definition at line 119 of file interpr6.cxx.

References GetGammaContFraction(), GetGammaSeries(), GetLogGamma(), and log.

Referenced by GetChiSqDistCDF(), and GetGammaDist().

◆ GetMatrix() [1/2]

ScMatrixRef ScInterpreter::GetMatrix ( )
private

Definition at line 478 of file interpr5.cxx.

References aStr, CreateDoubleError(), CreateMatrixFromDoubleRef(), GetCellString(), GetCellValue(), GetDouble(), GetNewMat(), GetRawStackType(), GetString(), ScRefCellValue::hasEmptyValue(), ScRefCellValue::hasNumeric(), mrDoc, nGlobalError, p, PopDoubleRef(), PopError(), PopExternalDoubleRef(), PopExternalSingleRef(), PopMatrix(), PopSingleRef(), pStack, SetError(), sp, svDouble, svDoubleRef, svError, svExternalDoubleRef, svExternalSingleRef, svMatrix, svMissing, svSingleRef, and svString.

Referenced by CalculateAddSub(), CalculateLookup(), CalculatePearsonCovar(), CalculateRGPRKP(), CalculateSkew(), CalculateSlopeIntercept(), CalculateSumX2MY2SumX2DY2(), CalculateTrendGrowth(), Compare(), ConvertMatrixJumpConditionToMatrix(), CreateMatrixFromDoubleRef(), GetDoubleOrStringFromMatrix(), GetMatrix(), GetNumberSequenceArray(), GetRangeMatrix(), GetStVarParams(), GetTopNumberArray(), IsEven(), IsString(), IterateParametersIf(), IterateParametersIfs(), JumpMatrix(), PopDoubleRefPushMatrix(), PopMatrix(), PopRangeMatrix(), ScAmpersand(), ScAnd(), ScAveDev(), ScChiTest(), ScConcat_MS(), ScCountEmptyCells(), ScCountIf(), ScDiv(), ScForecast(), ScForecast_Ets(), ScFourier(), ScFTest(), ScGCD(), ScGeoMean(), ScHarMean(), ScIndex(), ScIRR(), ScIsEmpty(), ScIsErr(), ScIsError(), ScIsNV(), ScIsValue(), ScLCM(), ScLookup(), ScMacro(), ScMatDet(), ScMatInv(), ScMatMult(), ScMatTrans(), ScMax(), ScMin(), ScMIRR(), ScMul(), ScNeg(), ScNot(), ScNPV(), ScOr(), ScPow(), ScProbability(), ScSumProduct(), ScSumXMY2(), ScTextJoin_MS(), ScTTest(), ScXor(), and ScZTest().

◆ GetMatrix() [2/2]

ScMatrixRef ScInterpreter::GetMatrix ( short &  rParam,
size_t &  rInRefList 
)
private

◆ GetMedian()

double ScInterpreter::GetMedian ( ::std::vector< double > &  rArray)
private

Definition at line 3366 of file interpr3.cxx.

References nGlobalError, and SetError().

Referenced by ScMedian(), and ScQuartile().

◆ GetNewMat() [1/2]

ScMatrixRef ScInterpreter::GetNewMat ( SCSIZE  nC,
SCSIZE  nR,
bool  bEmpty = false 
)

◆ GetNewMat() [2/2]

ScMatrixRef ScInterpreter::GetNewMat ( SCSIZE  nC,
SCSIZE  nR,
const std::vector< double > &  rValues 
)

Definition at line 309 of file interpr5.cxx.

References MakeMatNew().

◆ GetNumberSequenceArray()

void ScInterpreter::GetNumberSequenceArray ( sal_uInt8  nParamCount,
::std::vector< double > &  rArray,
bool  bConvertTextInArray 
)
private

◆ GetNumResult()

double ScInterpreter::GetNumResult ( ) const
inline

Definition at line 1017 of file interpre.hxx.

References xResult.

Referenced by ScFormulaCell::InterpretTail().

◆ GetOrCreateGlobalConfig()

ScCalcConfig & ScInterpreter::GetOrCreateGlobalConfig ( )
staticprivate

Definition at line 3878 of file interpr4.cxx.

References mpGlobalConfig.

Referenced by GetGlobalConfig(), MergeCalcConfig(), and SetGlobalConfig().

◆ GetPercentile()

double ScInterpreter::GetPercentile ( ::std::vector< double > &  rArray,
double  fPercentile 
)
static

Definition at line 3400 of file interpr3.cxx.

References nIndex.

Referenced by ScPercentile(), and ScQuartile().

◆ GetPercentileExclusive()

double ScInterpreter::GetPercentileExclusive ( ::std::vector< double > &  rArray,
double  fPercentile 
)
private

Definition at line 3424 of file interpr3.cxx.

References nGlobalError, nIndex, and SetError().

Referenced by ScPercentile(), and ScQuartile().

◆ GetPercentrank()

double ScInterpreter::GetPercentrank ( ::std::vector< double > &  rArray,
double  fVal,
bool  bInclusive 
)
staticprivate

Definition at line 3758 of file interpr3.cxx.

References div(), and i.

Referenced by ScPercentrank().

◆ GetRangeMatrix()

sc::RangeMatrix ScInterpreter::GetRangeMatrix ( )
private

Definition at line 615 of file interpr5.cxx.

References GetMatrix(), GetRawStackType(), sc::RangeMatrix::mpMat, PopRangeMatrix(), and svMatrix.

Referenced by CompareMat().

◆ GetRawStackType()

StackVar ScInterpreter::GetRawStackType ( )
private

◆ GetRefListArrayMaxSize()

size_t ScInterpreter::GetRefListArrayMaxSize ( short  nParamCount)
private

Check for array of references to determine the maximum size of a return column vector if in array context.

Definition at line 421 of file interpr6.cxx.

References GetStackType(), i, IsInArrayContext(), p, pStack, sp, and svRefList.

Referenced by GetStVarParams(), IterateParameters(), IterateParametersIf(), IterateParametersIfs(), ScCountEmptyCells(), ScCountIf(), ScMax(), and ScMin().

◆ GetResultToken()

const formula::FormulaConstTokenRef & ScInterpreter::GetResultToken ( ) const
inline

◆ GetResultType()

formula::StackVar ScInterpreter::GetResultType ( ) const
inline

Definition at line 1015 of file interpre.hxx.

References xResult.

Referenced by ScFormulaCell::InterpretTail().

◆ GetRetFormatIndex()

sal_uLong ScInterpreter::GetRetFormatIndex ( ) const
inline

Definition at line 1020 of file interpre.hxx.

References nRetFmtIndex.

Referenced by ScFormulaCell::InterpretTail().

◆ GetRetFormatType()

SvNumFormatType ScInterpreter::GetRetFormatType ( ) const
inline

Definition at line 1019 of file interpre.hxx.

References nRetFmtType.

Referenced by ScSimpleFormulaCalculator::Calculate(), and ScFormulaCell::InterpretTail().

◆ GetSortArray()

void ScInterpreter::GetSortArray ( sal_uInt8  nParamCount,
::std::vector< double > &  rSortArray,
::std::vector< tools::Long > *  pIndexOrder,
bool  bConvertTextInArray,
bool  bAllowEmptyArray 
)
private

◆ GetStackDoubleRef()

const ScComplexRefData * ScInterpreter::GetStackDoubleRef ( size_t  rRefInList = 0)
private

Definition at line 1117 of file interpr4.cxx.

References p, pStack, size, sp, svDoubleRef, and svRefList.

Referenced by CalculateLookup(), IterateParametersIfs(), ScCountIf(), and ScMatch().

◆ GetStackType() [1/2]

StackVar ScInterpreter::GetStackType ( )
private

Stack type with replacement of defaults, e.g. svMissing and formula::svEmptyCell will result in formula::svDouble.

Definition at line 1966 of file interpr4.cxx.

References formula::FormulaToken::GetType(), pStack, SetError(), sp, svDouble, svEmptyCell, svMissing, and svUnknown.

Referenced by CalculateAddSub(), CalculateLookup(), CalculateSkew(), ConvertMatrixJumpConditionToMatrix(), FillEntry(), GetDBParams(), GetDoubleOrStringFromMatrix(), GetErrorType(), GetNumberSequenceArray(), GetRefListArrayMaxSize(), GetStVarParams(), GetTopNumberArray(), GetWeekendAndHolidayMasks_MS(), Interpret(), IsEven(), IterateParameters(), IterateParametersIf(), IterateParametersIfs(), JumpMatrix(), PopDBDoubleRef(), PopDoubleRefOrSingleRef(), PopDoubleRefPushMatrix(), PopRefListPushMatrixOrRef(), ScAmpersand(), ScAnd(), ScAreas(), ScAveDev(), ScCell(), ScChooseJump(), ScColumn(), ScColumns(), ScConcat_MS(), ScCountEmptyCells(), ScCountIf(), ScDiv(), ScEqual(), ScExternal(), ScFilterXML(), ScFormula(), ScGCD(), ScGeoMean(), ScGetPivotData(), ScGreater(), ScGreaterEqual(), ScHarMean(), ScHyperLink(), ScIfError(), ScIfJump(), ScIndex(), ScIRR(), ScIsErr(), ScIsError(), ScIsFormula(), ScIsLogical(), ScIsNV(), ScIsRef(), ScLCM(), ScLess(), ScLessEqual(), ScLookup(), ScMacro(), ScMatch(), ScMatValue(), ScMax(), ScMin(), ScMIRR(), ScMul(), ScNeg(), ScNot(), ScNotEqual(), ScNPV(), ScNumberValue(), ScOffset(), ScOr(), ScPow(), ScRandomImpl(), ScRow(), ScRows(), ScRSQ(), ScSheet(), ScSheets(), ScSwitch_MS(), ScT(), ScText(), ScTextJoin_MS(), ScType(), ScXor(), and ScZTest().

◆ GetStackType() [2/2]

StackVar ScInterpreter::GetStackType ( sal_uInt8  nParam)
private

◆ GetString()

svl::SharedString ScInterpreter::GetString ( )
private

◆ GetStringFromDouble()

svl::SharedString ScInterpreter::GetStringFromDouble ( const double  fVal)
private

◆ GetStringFromMatrix()

svl::SharedString ScInterpreter::GetStringFromMatrix ( const ScMatrixRef pMat)
private

◆ GetStringPositionArgument()

sal_Int32 ScInterpreter::GetStringPositionArgument ( )
inlineprivate

Obtain a sal_Int32 suitable as string position or length argument.

Returns -1 if the number is Inf or NaN or less than 0 or greater than some implementation defined max string length. In these cases also sets nGlobalError to FormulaError::IllegalArgument, if not already set.

Definition at line 1097 of file interpre.hxx.

References CheckStringPositionArgument(), GetDouble(), and SetError().

Referenced by ScFindB(), ScLeft(), ScLeftB(), ScMid(), ScMidB(), ScReplace(), ScReplaceB(), ScRept(), ScRight(), ScRightB(), ScSearch(), ScSearchB(), and ScSubstitute().

◆ GetStringResult()

const svl::SharedString & ScInterpreter::GetStringResult ( ) const

Definition at line 4782 of file interpr4.cxx.

References xResult.

Referenced by ScFormulaCell::InterpretTail().

◆ GetStVarParams()

void ScInterpreter::GetStVarParams ( bool  bTextAsZero,
double(*)(double fVal, size_t nValCount)  VarResult 
)
private

◆ GetTDist()

double ScInterpreter::GetTDist ( double  T,
double  fDF,
int  nType 
)
private

Definition at line 648 of file interpr3.cxx.

References GetBeta(), GetBetaDist(), nType, R, SetError(), and X.

Referenced by ScTDistFunction::GetValue(), ScTDist(), ScTDist_MS(), ScTDist_T(), and ScTTest().

◆ GetTInv()

double ScInterpreter::GetTInv ( double  fAlpha,
double  fSize,
int  nType 
)
private

Definition at line 2288 of file interpr3.cxx.

References lcl_IterateInverse(), nType, and SetError().

Referenced by ScConfidenceT(), and ScTInv().

◆ GetTokenMatrixMap()

ScTokenMatrixMap & ScInterpreter::GetTokenMatrixMap ( )
inlineprivate

◆ GetTopNumberArray()

std::vector< double > ScInterpreter::GetTopNumberArray ( SCSIZE rCol,
SCSIZE rRow 
)
private

◆ GetUInt32()

sal_uInt32 ScInterpreter::GetUInt32 ( )
private

if GetDouble() not within uint32 limits sets nGlobalError and returns SAL_MAX_UINT32

Definition at line 2246 of file interpr4.cxx.

References GetDouble(), GetDoubleErrorValue(), SAL_MAX_UINT32, and SetError().

Referenced by ScDde(), ScEMat(), ScIndex(), ScMatValue(), ScNetWorkdays(), ScUnichar(), and ScWorkday_MS().

◆ GetUpRegIGamma()

double ScInterpreter::GetUpRegIGamma ( double  fA,
double  fX 
)
private

You must ensure fA>0.0 && fX>0.0)

Definition at line 130 of file interpr6.cxx.

References GetGammaContFraction(), GetGammaSeries(), GetLogGamma(), and log.

Referenced by GetChiDist(), and ScPoissonDist().

◆ GetValueCellValue()

double ScInterpreter::GetValueCellValue ( const ScAddress rPos,
double  fOrig 
)
private

Only ValueCell, formula cells already store the result rounded.

Definition at line 147 of file interpr4.cxx.

References bCalcAsShown, ScDocument::GetNumberFormat(), mrContext, mrDoc, and ScDocument::RoundValueAsShown().

Referenced by CreateCellArr(), and CreateDoubleArr().

◆ GetVolatileType()

VolatileType ScInterpreter::GetVolatileType ( ) const
inline

◆ GetWeekendAndHolidayMasks()

FormulaError ScInterpreter::GetWeekendAndHolidayMasks ( const sal_uInt8  nParamCount,
const sal_uInt32  nNullDate,
::std::vector< double > &  rSortArray,
bool  bWeekendMask[7] 
)
private

Definition at line 342 of file interpr2.cxx.

References GetNumberSequenceArray(), GetSortArray(), i, nGlobalError, SATURDAY, and SUNDAY.

Referenced by ScNetWorkdays().

◆ GetWeekendAndHolidayMasks_MS()

FormulaError ScInterpreter::GetWeekendAndHolidayMasks_MS ( const sal_uInt8  nParamCount,
const sal_uInt32  nNullDate,
::std::vector< double > &  rSortArray,
bool  bWeekendMask[7],
bool  bWorkdayFunction 
)
private

◆ GlobalExit()

void ScInterpreter::GlobalExit ( )
static

Definition at line 3901 of file interpr4.cxx.

References bGlobalStackInUse, and pGlobalStack.

Referenced by ScGlobal::Clear().

◆ IfErrorPushError()

bool ScInterpreter::IfErrorPushError ( )
inlineprivate

If nGlobalError is set push formula::FormulaErrorToken.

If nGlobalError is not set do nothing. Used in PushTempToken() and alike to simplify handling.

Returns
: <TRUE> if nGlobalError.

Definition at line 292 of file interpre.hxx.

References nGlobalError, and PushTempTokenWithoutError().

Referenced by PushCellResultToken(), PushDouble(), PushDoubleRef(), PushExternalDoubleRef(), PushExternalSingleRef(), PushInt(), PushSingleRef(), and PushString().

◆ Init()

void ScInterpreter::Init ( ScFormulaCell pCell,
const ScAddress rPos,
ScTokenArray rTokArray 
)

◆ integralPhi()

double ScInterpreter::integralPhi ( double  x)
static

Definition at line 200 of file interpr3.cxx.

References x.

Referenced by ScLogNormDist(), ScNormDist(), ScStdNormDist(), and ScStdNormDist_MS().

◆ Interpret()

StackVar ScInterpreter::Interpret ( )

Definition at line 3960 of file interpr4.cxx.

References aCode, aPos, bMatrixFormula, cPar, CreateFormulaDoubleToken(), DoubleRefToPosSingleRef(), etsAdd, etsMult, etsPIAdd, etsPIMult, etsSeason, etsStatAdd, etsStatMult, eType, formula::FormulaTokenArrayPlainIterator::FirstRPN(), formula::FormulaToken::GetByte(), formula::FormulaToken::GetDoubleType(), formula::FormulaToken::GetError(), formula::FormulaToken::GetOpCode(), formula::FormulaToken::GetParamCount(), GetStackType(), formula::FormulaToken::GetType(), formula::FormulaTokenIterator::IsEndOfPath(), sc::RangeMatrix::isRangeValid(), JumpMatrix(), maTokenMatrixMap, MatrixParameterConversion(), maxsp, ScExternalRefCache::CellFormat::mbIsSet, meVolatileType, ScExternalRefCache::CellFormat::mnIndex, mnSubTotalFlags, ScExternalRefCache::CellFormat::mnType, sc::RangeMatrix::mpMat, nCurFmtIndex, nCurFmtType, formula::FormulaTokenIterator::Next(), formula::FormulaTokenArrayPlainIterator::NextRPN(), nFuncFmtIndex, nFuncFmtType, nGlobalError, NONE, nRetFmtIndex, nRetFmtType, ocAbs, ocAdd, ocAddress, ocAggregate, ocAmpersand, ocAnd, ocArabic, ocArcCos, ocArcCosHyp, ocArcCot, ocArcCotHyp, ocArcSin, ocArcSinHyp, ocArcTan, ocArcTan2, ocArcTanHyp, ocAreas, ocAsc, ocAveDev, ocAverage, ocAverageA, ocAverageIf, ocAverageIfs, ocB, ocBad, ocBahtText, ocBase, ocBetaDist, ocBetaDist_MS, ocBetaInv, ocBetaInv_MS, ocBinomDist, ocBinomDist_MS, ocBinomInv, ocBitAnd, ocBitLshift, ocBitOr, ocBitRshift, ocBitXor, ocCall, ocCeil, ocCeil_ISO, ocCeil_Math, ocCeil_MS, ocCeil_Precise, ocCell, ocChar, ocChiDist, ocChiDist_MS, ocChiInv, ocChiInv_MS, ocChiSqDist, ocChiSqDist_MS, ocChiSqInv, ocChiSqInv_MS, ocChiTest, ocChiTest_MS, ocChoose, ocClean, ocClose, ocCode, ocColor, ocColRowNameAuto, ocColumn, ocColumns, ocCombin, ocCombinA, ocConcat, ocConcat_MS, ocConfidence, ocConfidence_N, ocConfidence_T, ocConvertOOo, ocCorrel, ocCos, ocCosecant, ocCosecantHyp, ocCosHyp, ocCot, ocCotHyp, ocCount, ocCount2, ocCountEmptyCells, ocCountIf, ocCountIfs, ocCovar, ocCovarianceP, ocCovarianceS, ocCritBinom, ocCumIpmt, ocCumPrinc, ocCurrency, ocCurrent, ocDB, ocDBArea, ocDBAverage, ocDBCount, ocDBCount2, ocDBGet, ocDBMax, ocDBMin, ocDBProduct, ocDBStdDev, ocDBStdDevP, ocDBSum, ocDBVar, ocDBVarP, ocDDB, ocDde, ocDebugVar, ocDecimal, ocDeg, ocDevSq, ocDiv, ocEasterSunday, ocEffect, ocEncodeURL, ocEqual, ocErf_MS, ocErfc_MS, ocErrorType, ocErrorType_ODF, ocEuroConvert, ocEven, ocExact, ocExp, ocExpDist, ocExpDist_MS, ocExternal, ocFact, ocFalse, ocFDist, ocFDist_LT, ocFDist_RT, ocFilterXML, ocFind, ocFindB, ocFInv, ocFInv_LT, ocFInv_RT, ocFisher, ocFisherInv, ocFixed, ocFloor, ocFloor_Math, ocFloor_MS, ocFloor_Precise, ocForecast, ocForecast_ETS_ADD, ocForecast_ETS_MUL, ocForecast_ETS_PIA, ocForecast_ETS_PIM, ocForecast_ETS_SEA, ocForecast_ETS_STA, ocForecast_ETS_STM, ocForecast_LIN, ocFormula, ocFourier, ocFrequency, ocFTest, ocFTest_MS, ocFV, ocGamma, ocGammaDist, ocGammaDist_MS, ocGammaInv, ocGammaInv_MS, ocGammaLn, ocGammaLn_MS, ocGauss, ocGCD, ocGeoMean, ocGetActDate, ocGetActTime, ocGetDate, ocGetDateDif, ocGetDateValue, ocGetDay, ocGetDayOfWeek, ocGetDiffDate, ocGetDiffDate360, ocGetHour, ocGetMin, ocGetMonth, ocGetPivotData, ocGetSec, ocGetTime, ocGetTimeValue, ocGetYear, ocGreater, ocGreaterEqual, ocGrowth, ocHarMean, ocHLookup, ocHyperLink, ocHypGeomDist, ocHypGeomDist_MS, ocIf, ocIfError, ocIfNA, ocIfs_MS, ocIndex, ocIndirect, ocInfo, ocInt, ocIntercept, ocIntersect, ocIpmt, ocIRR, ocIsEmpty, ocIsErr, ocIsError, ocIsEven, ocIsFormula, ocIsLogical, ocIsNA, ocIsNonString, ocIsOdd, ocIsoWeeknum, ocISPMT, ocIsRef, ocIsString, ocIsValue, ocJis, ocKurt, ocLarge, ocLCM, ocLeft, ocLeftB, ocLen, ocLenB, ocLess, ocLessEqual, ocLinest, ocLn, ocLog, ocLog10, ocLogest, ocLogInv, ocLogInv_MS, ocLogNormDist, ocLogNormDist_MS, ocLookup, ocLower, ocMacro, ocMatch, ocMatDet, ocMatInv, ocMatMult, ocMatRef, ocMatrixUnit, ocMatTrans, ocMatValue, ocMax, ocMaxA, ocMaxIfs_MS, ocMedian, ocMid, ocMidB, ocMin, ocMinA, ocMinIfs_MS, ocMIRR, ocMissing, ocMod, ocModalValue, ocModalValue_MS, ocModalValue_Multi, ocMul, ocMultiArea, ocN, ocNeg, ocNegBinomDist_MS, ocNegBinomVert, ocNegSub, ocNetWorkdays, ocNetWorkdays_MS, ocNominal, ocNoName, ocNone, ocNormDist, ocNormDist_MS, ocNormInv, ocNormInv_MS, ocNot, ocNotAvail, ocNotEqual, ocNper, ocNPV, ocNumberValue, ocOdd, ocOffset, ocOr, ocPDuration, ocPearson, ocPercentile, ocPercentile_Exc, ocPercentile_Inc, ocPercentrank, ocPercentrank_Exc, ocPercentrank_Inc, ocPercentSign, ocPermut, ocPermutationA, ocPhi, ocPi, ocPlusMinus, ocPMT, ocPoissonDist, ocPoissonDist_MS, ocPow, ocPower, ocPpmt, ocProb, ocProduct, ocProper, ocPush, ocPV, ocQuartile, ocQuartile_Exc, ocQuartile_Inc, ocRad, ocRandbetweenNV, ocRandom, ocRandomNV, ocRange, ocRank, ocRank_Avg, ocRank_Eq, ocRate, ocRawSubtract, ocRegex, ocReplace, ocReplaceB, ocRept, ocRight, ocRightB, ocRoman, ocRound, ocRoundDown, ocRoundSig, ocRoundUp, ocRow, ocRows, ocRRI, ocRSQ, ocSearch, ocSearchB, ocSecant, ocSecantHyp, ocSep, ocSheet, ocSheets, ocSin, ocSinHyp, ocSkew, ocSkewp, ocSLN, ocSlope, ocSmall, ocSNormInv, ocSNormInv_MS, ocSqrt, ocStandard, ocStDev, ocStDevA, ocStDevP, ocStDevP_MS, ocStDevPA, ocStDevS, ocStdNormDist, ocStdNormDist_MS, ocSTEYX, ocStop, ocStyle, ocSub, ocSubstitute, ocSubTotal, ocSum, ocSumIf, ocSumIfs, ocSumProduct, ocSumSQ, ocSumX2DY2, ocSumX2MY2, ocSumXMY2, ocSwitch_MS, ocSYD, ocT, ocTableOp, ocTan, ocTanHyp, ocTDist, ocTDist_2T, ocTDist_MS, ocTDist_RT, ocText, ocTextJoin_MS, ocTInv, ocTInv_2T, ocTInv_MS, ocTrend, ocTrim, ocTrimMean, ocTrue, ocTrunc, ocTTest, ocTTest_MS, ocTTT, ocType, ocUnichar, ocUnicode, ocUnion, ocUpper, ocValue, ocVar, ocVarA, ocVarP, ocVarP_MS, ocVarPA, ocVarS, ocVBD, ocVLookup, ocWebservice, ocWeek, ocWeeknumOOo, ocWeibull, ocWeibull_MS, ocWorkday_MS, ocXor, ocZTest, ocZTest_MS, p, pArr, pCur, pJumpMatrix, Pop(), PopDouble(), PopDoubleRef(), PopDoubleRefPushMatrix(), PopError(), PopExternalDoubleRef(), PopExternalSingleRef(), PopMatrix(), PopRangeMatrix(), PopRefListPushMatrixOrRef(), PopSingleRef(), PopToken(), pStack, PushCellResultToken(), PushError(), PushInt(), PushNoValue(), PushTempToken(), PushTokenRef(), PushWithoutError(), QueryMatrixType(), formula::FormulaTokenIterator::Reset(), SAL_MATH_FPEXCEPTIONS_OFF, ScAbs(), ScAdd(), ScAddressFunc(), ScAggregate(), ScAmpersand(), ScAnd(), ScArabic(), ScArcCos(), ScArcCosHyp(), ScArcCot(), ScArcCotHyp(), ScArcSin(), ScArcSinHyp(), ScArcTan(), ScArcTan2(), ScArcTanHyp(), ScAreas(), ScAsc(), ScAveDev(), ScAverage(), ScAverageIf(), ScAverageIfs(), ScB(), ScBadName(), ScBahtText(), ScBase(), ScBetaDist(), ScBetaDist_MS(), ScBetaInv(), ScBinomDist(), ScBitAnd(), ScBitLshift(), ScBitOr(), ScBitRshift(), ScBitXor(), ScCeil(), ScCeil_MS(), ScCeil_Precise(), ScCell(), ScChar(), ScChiDist(), ScChiInv(), ScChiSqDist(), ScChiSqDist_MS(), ScChiSqInv(), ScChiTest(), ScChooseJump(), ScClean(), ScCode(), ScColor(), ScColRowNameAuto(), ScColumn(), ScColumns(), ScCombin(), ScCombinA(), ScConcat(), ScConcat_MS(), ScConfidence(), ScConfidenceT(), ScConvertOOo(), ScCorrel(), ScCos(), ScCosecant(), ScCosecantHyp(), ScCosHyp(), ScCot(), ScCotHyp(), ScCount(), ScCount2(), ScCountEmptyCells(), ScCountIf(), ScCountIfs(), ScCovarianceP(), ScCovarianceS(), ScCritBinom(), ScCumIpmt(), ScCumPrinc(), ScCurrency(), ScCurrent(), ScDB(), ScDBArea(), ScDBAverage(), ScDBCount(), ScDBCount2(), ScDBGet(), ScDBMax(), ScDBMin(), ScDBProduct(), ScDBStdDev(), ScDBStdDevP(), ScDBSum(), ScDBVar(), ScDBVarP(), ScDDB(), ScDde(), ScDebugVar(), ScDecimal(), ScDeg(), ScDevSq(), ScDiv(), ScEasterSunday(), ScEffect(), ScEMat(), ScEncodeURL(), ScEqual(), ScErf(), ScErfc(), ScErrorType(), ScErrorType_ODF(), ScEuroConvert(), ScEven(), ScExact(), ScExp(), ScExpDist(), ScExternal(), ScFact(), ScFalse(), ScFDist(), ScFDist_LT(), ScFilterXML(), ScFind(), ScFindB(), ScFInv(), ScFInv_LT(), ScFisher(), ScFisherInv(), ScFixed(), ScFloor(), ScFloor_MS(), ScFloor_Precise(), ScForecast(), ScForecast_Ets(), ScFormula(), ScFourier(), ScFrequency(), ScFTest(), ScFV(), ScGamma(), ScGammaDist(), ScGammaInv(), ScGauss(), ScGCD(), ScGeoMean(), ScGetActDate(), ScGetActTime(), ScGetDate(), ScGetDateDif(), ScGetDateValue(), ScGetDay(), ScGetDayOfWeek(), ScGetDiffDate(), ScGetDiffDate360(), ScGetHour(), ScGetIsoWeekOfYear(), ScGetMin(), ScGetMonth(), ScGetPivotData(), ScGetSec(), ScGetTime(), ScGetTimeValue(), ScGetWeekOfYear(), ScGetYear(), ScGreater(), ScGreaterEqual(), ScGrowth(), ScHarMean(), ScHLookup(), ScHyperLink(), ScHypGeomDist(), ScIfError(), ScIfJump(), ScIfs_MS(), ScIndex(), ScIndirect(), ScInfo(), ScInt(), ScIntercept(), ScIntersect(), ScIpmt(), ScIRR(), ScIsEmpty(), ScIsErr(), ScIsError(), ScIsEven(), ScIsFormula(), ScIsLogical(), ScIsNonString(), ScIsNV(), ScIsOdd(), ScISPMT(), ScIsRef(), ScIsString(), ScIsValue(), ScJis(), ScKurt(), ScLarge(), ScLCM(), ScLeft(), ScLeftB(), ScLen(), ScLenB(), ScLess(), ScLessEqual(), ScLinest(), ScLn(), ScLog(), ScLog10(), ScLogest(), ScLogGamma(), ScLogNormDist(), ScLogNormInv(), ScLookup(), ScLower(), ScMacro(), ScMatch(), ScMatDet(), ScMatInv(), ScMatMult(), ScMatRef(), ScMatTrans(), ScMatValue(), ScMax(), ScMaxIfs_MS(), ScMedian(), ScMid(), ScMidB(), ScMin(), ScMinIfs_MS(), ScMIRR(), ScMissing(), ScMod(), ScModalValue(), ScModalValue_MS(), ScMul(), ScMultiArea(), ScN(), ScNeg(), ScNegBinomDist(), ScNegBinomDist_MS(), ScNetWorkdays(), ScNominal(), ScNoName(), ScNormDist(), ScNormInv(), ScNot(), ScNotEqual(), ScNper(), ScNPV(), ScNumberValue(), ScOdd(), ScOffset(), ScOr(), ScPDuration(), ScPearson(), ScPercentile(), ScPercentrank(), ScPercentSign(), ScPermut(), ScPermutationA(), ScPhi(), ScPi(), ScPlusMinus(), ScPMT(), ScPoissonDist(), ScPow(), ScPower(), ScPpmt(), ScProbability(), ScProduct(), ScProper(), ScPV(), ScQuartile(), ScRad(), ScRandbetween(), ScRandom(), ScRangeFunc(), ScRank(), ScRate(), ScRawSubtract(), ScRegex(), ScReplace(), ScReplaceB(), ScRept(), ScRight(), ScRightB(), ScRoman(), ScRound(), ScRoundDown(), ScRoundSignificant(), ScRoundUp(), ScRow(), ScRows(), ScRRI(), ScRSQ(), ScSearch(), ScSearchB(), ScSecant(), ScSecantHyp(), ScSheet(), ScSheets(), ScSin(), ScSinHyp(), ScSkew(), ScSkewp(), ScSLN(), ScSlope(), ScSmall(), ScSNormInv(), ScSqrt(), ScStandard(), ScStDev(), ScStDevP(), ScStdNormDist(), ScStdNormDist_MS(), ScSTEYX(), ScStyle(), ScSub(), ScSubstitute(), ScSubTotal(), ScSum(), ScSumIf(), ScSumIfs(), ScSumProduct(), ScSumSQ(), ScSumX2DY2(), ScSumX2MY2(), ScSumXMY2(), ScSwitch_MS(), ScSYD(), ScT(), ScTableOp(), ScTan(), ScTanHyp(), ScTDist(), ScTDist_MS(), ScTDist_T(), ScText(), ScTextJoin_MS(), ScTInv(), ScTrend(), ScTrim(), ScTrimMean(), ScTrue(), ScTTest(), ScTTT(), ScType(), ScUnichar(), ScUnicode(), ScUnionFunc(), ScUpper(), ScValue(), ScVar(), ScVarP(), ScVDB(), ScVLookup(), ScWebservice(), ScWeeknumOOo(), ScWeibull(), ScWorkday_MS(), ScXor(), ScZTest(), SetError(), sp, svDouble, svDoubleRef, svEmptyCell, svError, svExternalDoubleRef, svExternalSingleRef, svJumpMatrix, svMatrix, svRefList, svSingleRef, svString, t, VOLATILE, and xResult.

Referenced by ScSimpleFormulaCalculator::Calculate(), ScFormulaCell::InterpretInvariantFormulaGroup(), and ScFormulaCell::InterpretTail().

◆ IsEven()

bool ScInterpreter::IsEven ( )
private

◆ IsInArrayContext()

bool ScInterpreter::IsInArrayContext ( ) const
inlineprivate

◆ IsMissing()

bool ScInterpreter::IsMissing ( ) const
private

◆ IsString()

bool ScInterpreter::IsString ( )
private

◆ IsTableOpInRange()

bool ScInterpreter::IsTableOpInRange ( const ScRange rRange)
private

◆ IterateParameters()

void ScInterpreter::IterateParameters ( ScIterFunc  eFunc,
bool  bTextAsZero = false 
)
private

Definition at line 460 of file interpr6.cxx.

References aStr, bCalcAsShown, CELLTYPE_NONE, ConvertStringToValue(), CurFmtToFuncFmt(), eType, sc::RangeColumnSpanSet::executeColumnAction(), ScCellIterator::first(), KahanSum::get(), GetByte(), GetCellValue(), ScValueIterator::GetCurNumFmtInfo(), GetDouble(), ScValueIterator::GetFirst(), GetNewMat(), ScValueIterator::GetNext(), ScInterpreterContext::GetNumberFormatType(), GetRefListArrayMaxSize(), GetStackType(), svl::SharedString::getString(), ScRefCellValue::getType(), ScRefCellValue::hasNumeric(), ScRefCellValue::hasString(), i, ifAVERAGE, ifCOUNT, ifCOUNT2, ifPRODUCT, ifSUM, ifSUMSQ, IgnoreErrVal, IgnoreFiltered, IgnoreHidden, IgnoreNestedStAg, ScRefCellValue::isEmpty(), ScCellIterator::isEmpty(), IterateMatrix(), lcl_IterResult(), ScExternalRefCache::CellFormat::mbIsSet, ScExternalRefCache::CellFormat::mnIndex, mnSubTotalFlags, ScExternalRefCache::CellFormat::mnType, mrContext, mrDoc, nCount, ScCellIterator::next(), nFuncFmtIndex, nFuncFmtType, nGlobalError, NONE, ocAggregate, ocSubTotal, p, Pop(), PopDoubleRef(), PopError(), PopExternalDoubleRef(), PopExternalSingleRef(), PopMatrix(), PopSingleRef(), PopString(), pStack, PushDouble(), PushError(), PushMatrix(), ScAddress::Row(), ScDocument::RowFiltered(), ScDocument::RowHidden(), SetError(), sp, svDouble, svDoubleRef, svEmptyCell, svError, svExternalDoubleRef, svExternalSingleRef, svMatrix, svRefList, svSingleRef, svString, and ScAddress::Tab().

Referenced by ScAverage(), ScCount(), ScCount2(), ScProduct(), ScSum(), and ScSumSQ().

◆ IterateParametersIf()

void ScInterpreter::IterateParametersIf ( ScIterFuncIf  eFunc)
private

Definition at line 5228 of file interpr1.cxx.

References ScQueryEntry::bDoQuery, ScQueryEntry::ByString, ScQueryEntry::ByValue, CELLTYPE_EDIT, CELLTYPE_FORMULA, CELLTYPE_STRING, CELLTYPE_VALUE, DetectSearchType(), div(), ScQueryEntry::eOp, ScQueryParamBase::eSearchType, ScQueryParamBase::FillInExcelSyntax(), KahanSum::get(), GetByte(), GetCellString(), GetCellValue(), ScQueryCellIterator< accessType >::GetCol(), GetDouble(), GetDoubleOrStringFromMatrix(), ScQueryParamBase::GetEntry(), ScQueryCellIterator< accessType >::GetFirst(), ScRefCellValue::getFormula(), GetMatrix(), GetNewMat(), ScQueryCellIterator< accessType >::GetNext(), ScQueryEntry::GetQueryItem(), GetRefListArrayMaxSize(), ScQueryCellIterator< accessType >::GetRow(), ScDocument::GetSharedStringPool(), GetStackType(), GetString(), svl::SharedString::getString(), ScRefCellValue::getType(), ScRange::GetVars(), ScRefCellValue::hasNumeric(), ifAVERAGEIF, ifSUMIF, ScMatrix::IsRealStringType(), ScFormulaCell::IsValue(), ScQueryEntry::Item::maString, ScDocument::MaxCol(), ScDocument::MaxRow(), ScQueryEntry::Item::meType, ScQueryEntry::Item::mfVal, mrContext, mrDoc, MustHaveParamCount(), ScQueryParamTable::nCol1, ScQueryParamTable::nCol2, ScQueryEntry::nField, nGlobalError, ScQueryParamTable::nRow1, ScQueryParamTable::nRow2, nType, pFormatter, PopDoubleRef(), PopDoubleRefOrSingleRef(), PopExternalDoubleRef(), PopExternalSingleRef(), PopMatrix(), PopSingleRef(), PushDouble(), PushError(), PushMatrix(), QueryMat(), SC_EQUAL, ScQueryCellIteratorBase< accessType, queryType >::SetAdvanceQueryParamEntryField(), ScAddress::SetCol(), SetError(), ScAddress::SetRow(), ScAddress::SetTab(), svDouble, svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svMatrix, svRefList, svSingleRef, and svString.

Referenced by ScAverageIf(), and ScSumIf().

◆ IterateParametersIfs()

void ScInterpreter::IterateParametersIfs ( double(*)(const sc::ParamIfsResult &rRes)  ResultFunc)
private

Definition at line 5852 of file interpr1.cxx.

References ScRange::aEnd, ScRange::aStart, ScQueryEntry::bDoQuery, ScQueryEntry::ByString, ScQueryEntry::ByValue, ScQueryCellIteratorSortedCache::CanBeUsed(), CELLTYPE_EDIT, CELLTYPE_FORMULA, CELLTYPE_STRING, CELLTYPE_VALUE, ScAddress::Col(), DetectSearchType(), DoubleRefToRange(), end, ScQueryEntry::eOp, ScQueryParamBase::eSearchType, ScQueryParamBase::FillInExcelSyntax(), GetByte(), GetCellString(), GetCellValue(), ScQueryCellIterator< accessType >::GetCol(), ScDocument::GetDataAreaSubrange(), GetDouble(), GetDoubleErrorValue(), GetDoubleOrStringFromMatrix(), formula::FormulaToken::GetDoubleRef(), ScQueryParamBase::GetEntry(), ScQueryCellIterator< accessType >::GetFirst(), ScRefCellValue::getFormula(), GetMatrix(), GetNewMat(), ScQueryCellIterator< accessType >::GetNext(), ScQueryEntry::GetQueryItem(), ScQueryEntry::GetQueryItems(), GetRefListArrayMaxSize(), ScQueryCellIterator< accessType >::GetRow(), ScDocument::GetSharedStringPool(), GetStackDoubleRef(), GetStackType(), GetString(), svl::SharedString::getString(), formula::FormulaToken::GetType(), ScRefCellValue::getType(), ScRange::GetVars(), ScRefCellValue::hasNumeric(), i, ScComplexRefData::IsDeleted(), ScQueryEntry::IsQueryByEmpty(), ScMatrix::IsRealStringType(), ScFormulaCell::IsValue(), ScInterpreterContext::maConditions, o3tl::make_unsigned(), ScQueryEntry::Item::maString, ScQueryEntry::Item::mbMatchEmpty, ScQueryEntry::Item::meType, sc::ParamIfsResult::mfCount, sc::ParamIfsResult::mfMax, sc::ParamIfsResult::mfMin, sc::ParamIfsResult::mfSum, ScQueryEntry::Item::mfVal, mrContext, mrDoc, n, ScQueryParamTable::nCol1, ScQueryParamTable::nCol2, ScQueryEntry::nField, nGlobalError, ScQueryParamTable::nRow1, ScQueryParamTable::nRow2, nType, p, pFormatter, pMyFormulaCell, PopDoubleRef(), PopDoubleRefOrSingleRef(), PopError(), PopExternalSingleRef(), PopSingleRef(), pos, pStack, PushDouble(), PushError(), PushMatrix(), QueryMat(), ScAddress::Row(), SC_EQUAL, ScQueryCellIteratorBase< accessType, queryType >::SetAdvanceQueryParamEntryField(), ScAddress::SetCol(), ScAddress::SetRow(), ScAddress::SetTab(), sp, svDouble, svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svMatrix, svRefList, svSingleRef, svString, and ScAddress::Tab().

Referenced by ScAverageIfs(), ScCountIfs(), ScMaxIfs_MS(), ScMinIfs_MS(), and ScSumIfs().

◆ JumpMatrix()

bool ScInterpreter::JumpMatrix ( short  nStackLevel)
private

Definition at line 545 of file interpr1.cxx.

References aCode, ScRange::aEnd, ScRange::aStart, aStr, ScAddress::Col(), CreateDoubleError(), GetCellString(), GetCellValue(), GetDouble(), GetDoubleErrorValue(), formula::FormulaToken::GetInForceArray(), ScJumpMatrix::GetJump(), formula::FormulaToken::GetJumpMatrix(), ScJumpMatrix::GetJumpParameters(), GetMatrix(), ScJumpMatrix::GetOpCode(), ScParameterClassification::GetParameterType(), ScJumpMatrix::GetPos(), ScJumpMatrix::GetRefList(), ScJumpMatrix::GetResultMatrix(), GetStackType(), GetString(), ScRefCellValue::hasEmptyValue(), ScRefCellValue::hasNumeric(), ScJumpMatrix::HasResultMatrix(), formula::FormulaTokenIterator::HasStacked(), i, formula::FormulaTokenIterator::Jump(), lcl_AdjustJumpMatrix(), lcl_storeJumpMatResult(), o3tl::make_unsigned(), maTokenMatrixMap, mrDoc, ScJumpMatrix::Next(), nGlobalError, pCur, formula::FormulaTokenIterator::PeekNextOperator(), pJumpMatrix, formula::FormulaTokenIterator::Pop(), Pop(), PopDoubleRef(), PopError(), PopExternalSingleRef(), PopSingleRef(), pStack, PushMatrix(), PushTokenRef(), PushWithoutError(), ScJumpMatrix::PutResultDouble(), ScJumpMatrix::PutResultEmpty(), ScJumpMatrix::PutResultEmptyPath(), ScJumpMatrix::PutResultString(), ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScAddress::Row(), SAL_MAX_UINT16, ScAddress::SetCol(), SetError(), ScAddress::SetRow(), sp, svDouble, svDoubleRef, svEmptyCell, svError, svExternalDoubleRef, svExternalSingleRef, svMatrix, svSingleRef, and svString.

Referenced by Interpret().

◆ LookupQueryWithCache()

bool ScInterpreter::LookupQueryWithCache ( ScAddress o_rResultPos,
const ScQueryParam rParam,
const ScComplexRefData refData 
) const
private

◆ MakeMatNew()

void ScInterpreter::MakeMatNew ( ScMatrixRef rMat,
SCSIZE  nC,
SCSIZE  nR 
)
private

Definition at line 283 of file interpr5.cxx.

References SetError().

Referenced by GetNewMat().

◆ MatConcat()

ScMatrixRef ScInterpreter::MatConcat ( const ScMatrixRef pMat1,
const ScMatrixRef pMat2 
)
private

Definition at line 1230 of file interpr5.cxx.

References GetNewMat(), ScDocument::GetSharedStringPool(), lcl_GetMinExtent(), mrDoc, and pFormatter.

Referenced by ScAmpersand().

◆ MatrixJumpConditionToMatrix()

void ScInterpreter::MatrixJumpConditionToMatrix ( )
inlineprivate

Definition at line 1028 of file interpre.hxx.

References ConvertMatrixJumpConditionToMatrix(), and IsInArrayContext().

Referenced by ScChooseJump(), ScIfError(), and ScIfJump().

◆ MatrixParameterConversion()

bool ScInterpreter::MatrixParameterConversion ( )
inlineprivate

◆ MEMat()

void ScInterpreter::MEMat ( const ScMatrixRef mM,
SCSIZE  n 
)
staticprivate

Definition at line 753 of file interpr5.cxx.

References i, and n.

Referenced by ScEMat().

◆ MergeCalcConfig()

void ScInterpreter::MergeCalcConfig ( )
private

Merge global and document specific settings.

Definition at line 3895 of file interpr4.cxx.

References ScDocument::GetCalcConfig(), GetOrCreateGlobalConfig(), maCalcConfig, ScCalcConfig::MergeDocumentSpecific(), and mrDoc.

Referenced by ScInterpreter().

◆ MustHaveParamCount() [1/2]

bool ScInterpreter::MustHaveParamCount ( short  nAct,
short  nMust 
)
inlineprivate

Definition at line 1047 of file interpre.hxx.

References PushIllegalParameter(), and PushParameterExpected().

Referenced by CalculateLookup(), CalculatePearsonCovar(), CalculateRGPRKP(), CalculateSlopeIntercept(), CalculateSmallLarge(), CalculateSumX2MY2SumX2DY2(), CalculateTrendGrowth(), IterateParametersIf(), RoundNumber(), ScAddressFunc(), ScArcTan2(), ScAreas(), ScAsc(), ScB(), ScBahtText(), ScBase(), ScBetaDist(), ScBetaDist_MS(), ScBetaInv(), ScBinomDist(), ScBitAnd(), ScBitLshift(), ScBitOr(), ScBitRshift(), ScBitXor(), ScCeil(), ScCeil_MS(), ScCeil_Precise(), ScCell(), ScChiDist(), ScChiInv(), ScChiSqDist(), ScChiSqDist_MS(), ScChiSqInv(), ScChiTest(), ScColor(), ScColumn(), ScCombin(), ScCombinA(), ScConfidence(), ScConfidenceT(), ScConvertOOo(), ScCountEmptyCells(), ScCountIf(), ScCritBinom(), ScCumIpmt(), ScCumPrinc(), ScCurrency(), ScDB(), ScDDB(), ScDde(), ScDebugVar(), ScDecimal(), ScEasterSunday(), ScEffect(), ScEMat(), ScEncodeURL(), ScErf(), ScErfc(), ScEuroConvert(), ScExact(), ScExpDist(), ScFDist(), ScFDist_LT(), ScFilterXML(), ScFind(), ScFindB(), ScFInv(), ScFInv_LT(), ScFixed(), ScFloor(), ScFloor_MS(), ScFloor_Precise(), ScForecast(), ScForecast_Ets(), ScFourier(), ScFrequency(), ScFTest(), ScFV(), ScGammaDist(), ScGammaInv(), ScGetDate(), ScGetDateDif(), ScGetDayOfWeek(), ScGetDiffDate(), ScGetDiffDate360(), ScGetIsoWeekOfYear(), ScGetTime(), ScGetWeekOfYear(), ScHyperLink(), ScHypGeomDist(), ScIndex(), ScIndirect(), ScInfo(), ScIpmt(), ScIRR(), ScISPMT(), ScJis(), ScLeft(), ScLeftB(), ScLog(), ScLogNormDist(), ScLogNormInv(), ScLookup(), ScMatch(), ScMatDet(), ScMatInv(), ScMatMult(), ScMatTrans(), ScMatValue(), ScMid(), ScMidB(), ScMIRR(), ScMod(), ScNegBinomDist(), ScNegBinomDist_MS(), ScNetWorkdays(), ScNominal(), ScNormDist(), ScNormInv(), ScNper(), ScNumberValue(), ScOffset(), ScPDuration(), ScPercentile(), ScPercentrank(), ScPermut(), ScPermutationA(), ScPMT(), ScPoissonDist(), ScPower(), ScPpmt(), ScProbability(), ScPV(), ScQuartile(), ScRandbetween(), ScRank(), ScRate(), ScRegex(), ScReplace(), ScReplaceB(), ScRept(), ScRight(), ScRightB(), ScRoman(), ScRoundSignificant(), ScRow(), ScRRI(), ScSearch(), ScSearchB(), ScSheet(), ScSLN(), ScStandard(), ScStdNormDist_MS(), ScSubstitute(), ScSumXMY2(), ScSYD(), ScTDist(), ScTDist_MS(), ScTDist_T(), ScText(), ScTInv(), ScTrimMean(), ScTTest(), ScUnichar(), ScUnicode(), ScVDB(), ScWebservice(), ScWeeknumOOo(), ScWeibull(), ScWorkday_MS(), and ScZTest().

◆ MustHaveParamCount() [2/2]

bool ScInterpreter::MustHaveParamCount ( short  nAct,
short  nMust,
short  nMax 
)
inlineprivate

Definition at line 1058 of file interpre.hxx.

References PushIllegalParameter(), and PushParameterExpected().

◆ MustHaveParamCountMin()

bool ScInterpreter::MustHaveParamCountMin ( short  nAct,
short  nMin 
)
inlineprivate

◆ phi()

double ScInterpreter::phi ( double  x)
static

Definition at line 195 of file interpr3.cxx.

References x.

Referenced by gauss(), ScLogNormDist(), ScNormDist(), and ScPhi().

◆ Pop()

void ScInterpreter::Pop ( )
private

◆ PopDBDoubleRef()

ScDBRangeBase * ScInterpreter::PopDBDoubleRef ( )
private

◆ PopDouble()

double ScInterpreter::PopDouble ( )
private

◆ PopDoubleRef() [1/3]

void ScInterpreter::PopDoubleRef ( SCCOL rCol1,
SCROW rRow1,
SCTAB rTab1,
SCCOL rCol2,
SCROW rRow2,
SCTAB rTab2 
)
private

Definition at line 1002 of file interpr4.cxx.

References DoubleRefToVars(), nGlobalError, p, pStack, SetError(), sp, svDoubleRef, and svError.

◆ PopDoubleRef() [2/3]

void ScInterpreter::PopDoubleRef ( ScRange rRange,
bool  bDontCheckForTableOp = false 
)
private

Definition at line 1095 of file interpr4.cxx.

References DoubleRefToRange(), nGlobalError, p, pStack, SetError(), sp, svDoubleRef, and svError.

◆ PopDoubleRef() [3/3]

void ScInterpreter::PopDoubleRef ( ScRange rRange,
short &  rParam,
size_t &  rRefInList 
)
private

If formula::StackVar formula::svDoubleRef pop ScDoubleRefToken and return values of ScComplexRefData.

Else if StackVar svRefList return values of the ScComplexRefData where rRefInList is pointing to. rRefInList is incremented. If rRefInList was the last element in list pop ScRefListToken and set rRefInList to 0, else rParam is incremented (!) to allow usage as in while(nParamCount–) PopDoubleRef(aRange,nParamCount,nRefInList);

Definition at line 1043 of file interpr4.cxx.

References DoubleRefToRange(), formula::FormulaToken::GetDoubleRef(), formula::FormulaToken::GetError(), formula::FormulaToken::GetRefList(), formula::FormulaToken::GetType(), ScComplexRefData::IsDeleted(), nGlobalError, pStack, SetError(), size, sp, svDoubleRef, svError, and svRefList.

Referenced by CalculateLookup(), CalculateSkew(), GetDBParams(), GetDouble(), GetErrorType(), GetMatrix(), GetNumberSequenceArray(), GetString(), GetStVarParams(), GetTopNumberArray(), Interpret(), IterateParameters(), IterateParametersIf(), IterateParametersIfs(), JumpMatrix(), PopDBDoubleRef(), PopDoubleRefOrSingleRef(), ScAnd(), ScAveDev(), ScCell(), ScColumn(), ScColumns(), ScConcat_MS(), ScCountEmptyCells(), ScCountIf(), ScExternal(), ScFormula(), ScGCD(), ScGeoMean(), ScGetPivotData(), ScHarMean(), ScIndex(), ScIRR(), ScIsFormula(), ScIsRef(), ScLCM(), ScLookup(), ScMacro(), ScMatch(), ScMatValue(), ScMax(), ScMin(), ScMIRR(), ScNPV(), ScOffset(), ScOr(), ScRow(), ScRows(), ScSheet(), ScSheets(), ScTextJoin_MS(), ScXor(), and ScZTest().

◆ PopDoubleRefOrSingleRef()

bool ScInterpreter::PopDoubleRefOrSingleRef ( ScAddress rAdr)
private

◆ PopDoubleRefPushMatrix()

void ScInterpreter::PopDoubleRefPushMatrix ( )
private

Definition at line 1363 of file interpr4.cxx.

References GetMatrix(), GetStackType(), PushIllegalParameter(), PushMatrix(), SetError(), and svDoubleRef.

Referenced by Interpret().

◆ PopError()

void ScInterpreter::PopError ( )
private

◆ PopExternalDoubleRef() [1/3]

void ScInterpreter::PopExternalDoubleRef ( sal_uInt16 &  rFileId,
OUString &  rTabName,
ScComplexRefData rRef 
)
private

◆ PopExternalDoubleRef() [2/3]

void ScInterpreter::PopExternalDoubleRef ( ScExternalRefCache::TokenArrayRef rArray)
private

Definition at line 1248 of file interpr4.cxx.

References aData, GetExternalDoubleRef(), nGlobalError, and PopExternalDoubleRef().

◆ PopExternalDoubleRef() [3/3]

void ScInterpreter::PopExternalDoubleRef ( ScMatrixRef rMat)
private

Definition at line 1262 of file interpr4.cxx.

References nGlobalError, p, PopExternalDoubleRef(), SetError(), and svMatrix.

◆ PopExternalSingleRef() [1/3]

void ScInterpreter::PopExternalSingleRef ( sal_uInt16 &  rFileId,
OUString &  rTabName,
ScSingleRefData rRef 
)
private

◆ PopExternalSingleRef() [2/3]

void ScInterpreter::PopExternalSingleRef ( sal_uInt16 &  rFileId,
OUString &  rTabName,
ScSingleRefData rRef,
ScExternalRefCache::TokenRef rToken,
ScExternalRefCache::CellFormat pFmt = nullptr 
)
private

◆ PopExternalSingleRef() [3/3]

void ScInterpreter::PopExternalSingleRef ( ScExternalRefCache::TokenRef rToken,
ScExternalRefCache::CellFormat pFmt = nullptr 
)
private

Guarantees that nGlobalError is set if rToken could not be obtained.

Definition at line 1169 of file interpr4.cxx.

References aData, and PopExternalSingleRef().

◆ PopMatrix()

ScMatrixRef ScInterpreter::PopMatrix ( )
private

◆ PopRangeMatrix()

sc::RangeMatrix ScInterpreter::PopRangeMatrix ( )
private

◆ PopRefListPushMatrixOrRef()

void ScInterpreter::PopRefListPushMatrixOrRef ( )
private

◆ PopSingleRef() [1/2]

void ScInterpreter::PopSingleRef ( ScAddress rAdr)
private

◆ PopSingleRef() [2/2]

void ScInterpreter::PopSingleRef ( SCCOL rCol,
SCROW rRow,
SCTAB rTab 
)
private

Definition at line 897 of file interpr4.cxx.

References ScAddress::Col(), PopSingleRef(), ScAddress::Row(), and ScAddress::Tab().

◆ PopString()

const svl::SharedString & ScInterpreter::PopString ( )
private

◆ PopToken()

FormulaConstTokenRef ScInterpreter::PopToken ( )
private

◆ Push()

void ScInterpreter::Push ( const formula::FormulaToken r)
private

Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is not formula::FormulaErrorToken.

Increments RefCount of the original token if not substituted.

Definition at line 599 of file interpr4.cxx.

References formula::FormulaToken::GetType(), MAXSTACK, nGlobalError, PushTempTokenWithoutError(), PushWithoutError(), SetError(), sp, and svError.

Referenced by ScMatRef().

◆ PushCellResultToken()

void ScInterpreter::PushCellResultToken ( bool  bDisplayEmptyAsString,
const ScAddress rAddress,
SvNumFormatType pRetTypeExpr,
sal_uInt32 *  pRetIndexExpr,
bool  bFinalResult = false 
)
private

Obtain cell result / content from address and push as temp token.

Parameters
bDisplayEmptyAsStringis passed to ScEmptyCell in case of an empty cell result.
pRetTypeExpr
pRetIndexExprObtain number format and type if both, type and index pointer, are not NULL.
bFinalResultIf TRUE, only a standard FormulaDoubleToken is pushed. If FALSE, PushDouble() is used that may push either a FormulaDoubleToken or a FormulaTypedDoubleToken.

Definition at line 686 of file interpr4.cxx.

References CELLTYPE_FORMULA, CreateFormulaDoubleToken(), GetCellString(), GetCellValue(), ScFormulaCell::GetErrCode(), ScRefCellValue::getFormula(), ScDocument::GetNumberFormatInfo(), ScRefCellValue::getType(), ScRefCellValue::hasEmptyValue(), ScRefCellValue::hasString(), IfErrorPushError(), mrContext, mrDoc, nCurFmtIndex, nCurFmtType, PushDouble(), PushError(), PushString(), PushTempToken(), PushTempTokenWithoutError(), and TreatDoubleError().

Referenced by CalculateLookup(), Interpret(), and ScLookup().

◆ PushDouble()

void ScInterpreter::PushDouble ( double  nVal)
private

Definition at line 1789 of file interpr4.cxx.

References CreateDoubleOrTypedToken(), IfErrorPushError(), PushTempTokenWithoutError(), and TreatDoubleError().

Referenced by CalculateAddSub(), CalculateLookup(), CalculateMatrixValue(), CalculatePearsonCovar(), CalculateSkewOrSkewp(), CalculateSlopeIntercept(), CalculateSmallLarge(), CalculateSumX2MY2SumX2DY2(), DBIterator(), GetStVarParams(), IterateParameters(), IterateParametersIf(), IterateParametersIfs(), PushCellResultToken(), QueryMat(), RoundNumber(), ScAbs(), ScArcCos(), ScArcCosHyp(), ScArcCot(), ScArcCotHyp(), ScArcSin(), ScArcSinHyp(), ScArcTan(), ScArcTan2(), ScArcTanHyp(), ScAreas(), ScAveDev(), ScB(), ScBetaDist(), ScBetaDist_MS(), ScBetaInv(), ScBinomDist(), ScBitAnd(), ScBitLshift(), ScBitOr(), ScBitRshift(), ScBitXor(), ScCeil(), ScCeil_MS(), ScCeil_Precise(), ScCell(), ScChiDist(), ScChiInv(), ScChiSqDist(), ScChiSqDist_MS(), ScChiSqInv(), ScChiTest(), ScColor(), ScColumn(), ScColumns(), ScCombin(), ScCombinA(), ScConfidence(), ScConfidenceT(), ScConvertOOo(), ScCos(), ScCosecant(), ScCosecantHyp(), ScCosHyp(), ScCot(), ScCotHyp(), ScCountEmptyCells(), ScCountIf(), ScCritBinom(), ScCumIpmt(), ScCumPrinc(), ScDB(), ScDBCount(), ScDBCount2(), ScDBGet(), ScDBStdDev(), ScDBStdDevP(), ScDBVar(), ScDBVarP(), ScDDB(), ScDebugVar(), ScDecimal(), ScDeg(), ScDiv(), ScEasterSunday(), ScEffect(), ScErf(), ScErfc(), ScErrorType(), ScErrorType_ODF(), ScEuroConvert(), ScEven(), ScExp(), ScExpDist(), ScExternal(), ScFact(), ScFDist(), ScFDist_LT(), ScFilterXML(), ScFind(), ScFindB(), ScFInv(), ScFInv_LT(), ScFisher(), ScFisherInv(), ScFloor(), ScFloor_MS(), ScFloor_Precise(), ScForecast(), ScForecast_Ets(), ScFTest(), ScFV(), ScGamma(), ScGammaDist(), ScGammaInv(), ScGauss(), ScGCD(), ScGeoMean(), ScGetActDate(), ScGetActTime(), ScGetDate(), ScGetDateDif(), ScGetDateValue(), ScGetDay(), ScGetDiffDate(), ScGetDiffDate360(), ScGetHour(), ScGetMin(), ScGetMonth(), ScGetPivotData(), ScGetSec(), ScGetTime(), ScGetTimeValue(), ScGetYear(), ScHarMean(), ScHypGeomDist(), ScIndex(), ScInfo(), ScInt(), ScIpmt(), ScIRR(), ScISPMT(), ScKurt(), ScLCM(), ScLen(), ScLenB(), ScLn(), ScLog(), ScLog10(), ScLogGamma(), ScLogNormDist(), ScLogNormInv(), ScLookup(), ScMacro(), ScMatch(), ScMatDet(), ScMatRef(), ScMatValue(), ScMax(), ScMedian(), ScMin(), ScMIRR(), ScMod(), ScModalValue(), ScModalValue_MS(), ScMul(), ScN(), ScNeg(), ScNegBinomDist(), ScNegBinomDist_MS(), ScNetWorkdays(), ScNominal(), ScNormDist(), ScNormInv(), ScNper(), ScNPV(), ScNumberValue(), ScOdd(), ScPDuration(), ScPercentile(), ScPercentrank(), ScPermut(), ScPermutationA(), ScPhi(), ScPi(), ScPMT(), ScPoissonDist(), ScPow(), ScPpmt(), ScProbability(), ScPV(), ScQuartile(), ScRad(), ScRandomImpl(), ScRank(), ScRate(), ScRawSubtract(), ScRoundSignificant(), ScRow(), ScRows(), ScRRI(), ScRSQ(), ScSearch(), ScSearchB(), ScSecant(), ScSecantHyp(), ScSheet(), ScSheets(), ScSin(), ScSinHyp(), ScSLN(), ScSNormInv(), ScSqrt(), ScStandard(), ScStdNormDist(), ScStdNormDist_MS(), ScStyle(), ScSumProduct(), ScSumXMY2(), ScSYD(), ScTableOp(), ScTan(), ScTanHyp(), ScTDist(), ScTDist_MS(), ScTDist_T(), ScTInv(), ScTrimMean(), ScTTest(), ScUnicode(), ScValue(), ScVDB(), ScWeibull(), ScWorkday_MS(), and ScZTest().

◆ PushDoubleRef() [1/2]

void ScInterpreter::PushDoubleRef ( const ScRefAddress rRef1,
const ScRefAddress rRef2 
)
private

◆ PushDoubleRef() [2/2]

void ScInterpreter::PushDoubleRef ( SCCOL  nCol1,
SCROW  nRow1,
SCTAB  nTab1,
SCCOL  nCol2,
SCROW  nRow2,
SCTAB  nTab2 
)
private

◆ PushError()

void ScInterpreter::PushError ( FormulaError  nError)
private

◆ PushExternalDoubleRef()

void ScInterpreter::PushExternalDoubleRef ( sal_uInt16  nFileId,
const OUString &  rTabName,
SCCOL  nCol1,
SCROW  nRow1,
SCTAB  nTab1,
SCCOL  nCol2,
SCROW  nRow2,
SCTAB  nTab2 
)
private

◆ PushExternalSingleRef()

void ScInterpreter::PushExternalSingleRef ( sal_uInt16  nFileId,
const OUString &  rTabName,
SCCOL  nCol,
SCROW  nRow,
SCTAB  nTab 
)
private

◆ PushIllegalArgument()

void ScInterpreter::PushIllegalArgument ( )
private

Definition at line 1931 of file interpr4.cxx.

References PushError().

Referenced by CalculateAddSub(), CalculateLookup(), CalculatePearsonCovar(), CalculateSkewOrSkewp(), CalculateSlopeIntercept(), CalculateTrendGrowth(), CheckMatrix(), ScAddressFunc(), ScAggregate(), ScAmpersand(), ScArabic(), ScArcCosHyp(), ScArcCotHyp(), ScArcTanHyp(), ScB(), ScBase(), ScBetaDist(), ScBetaDist_MS(), ScBetaInv(), ScBinomDist(), ScBitAnd(), ScBitLshift(), ScBitOr(), ScBitRshift(), ScBitXor(), ScCeil(), ScCeil_MS(), ScCell(), ScChar(), ScChiDist(), ScChiInv(), ScChiSqDist(), ScChiSqDist_MS(), ScChiSqInv(), ScChiTest(), ScChooseJump(), ScColor(), ScCombin(), ScCombinA(), ScConfidence(), ScConfidenceT(), ScCritBinom(), ScCumIpmt(), ScCumPrinc(), ScCurrency(), ScDB(), ScDBGet(), ScDDB(), ScDde(), ScDecimal(), ScDiv(), ScEasterSunday(), ScEffect(), ScEMat(), ScEuroConvert(), ScExpDist(), ScFact(), ScFDist(), ScFDist_LT(), ScFindB(), ScFInv(), ScFInv_LT(), ScFisher(), ScFixed(), ScFloor(), ScFloor_MS(), ScForecast(), ScForecast_Ets(), ScFourier(), ScFrequency(), ScGamma(), ScGammaDist(), ScGammaInv(), ScGCD(), ScGetDate(), ScGetDateDif(), ScGetDateValue(), ScGetTime(), ScGetTimeValue(), ScGetWeekOfYear(), ScHypGeomDist(), ScIfJump(), ScIndex(), ScInfo(), ScIntersect(), ScIpmt(), ScIsFormula(), ScLCM(), ScLeft(), ScLeftB(), ScLn(), ScLog(), ScLog10(), ScLogGamma(), ScLogNormDist(), ScLogNormInv(), ScMacro(), ScMatDet(), ScMatInv(), ScMatMult(), ScMatTrans(), ScMid(), ScMidB(), ScMul(), ScNeg(), ScNegBinomDist(), ScNegBinomDist_MS(), ScNetWorkdays(), ScNominal(), ScNormDist(), ScNormInv(), ScNot(), ScNPV(), ScNumberValue(), ScOffset(), ScPDuration(), ScPercentile(), ScPercentrank(), ScPermut(), ScPermutationA(), ScPoissonDist(), ScPow(), ScPpmt(), ScQuartile(), ScRandbetween(), ScRangeFunc(), ScRate(), ScRegex(), ScReplace(), ScReplaceB(), ScRept(), ScRight(), ScRightB(), ScRoman(), ScRoundSignificant(), ScRRI(), ScSearch(), ScSearchB(), ScSNormInv(), ScSqrt(), ScSubstitute(), ScSubTotal(), ScSwitch_MS(), ScTDist(), ScTDist_MS(), ScTDist_T(), ScText(), ScTextJoin_MS(), ScTInv(), ScTrimMean(), ScTTest(), ScType(), ScUnichar(), ScUnionFunc(), ScValue(), ScVDB(), ScWeibull(), ScWorkday_MS(), and ScZTest().

◆ PushIllegalParameter()

void ScInterpreter::PushIllegalParameter ( )
private

◆ PushInt()

void ScInterpreter::PushInt ( int  nVal)
private

◆ PushMatrix() [1/2]

void ScInterpreter::PushMatrix ( const sc::RangeMatrix rMat)
private

◆ PushMatrix() [2/2]

void ScInterpreter::PushMatrix ( const ScMatrixRef pMat)
private

Definition at line 1904 of file interpr4.cxx.

References nGlobalError, and PushTempTokenWithoutError().

◆ PushNA()

void ScInterpreter::PushNA ( )
private

◆ PushNoValue()

void ScInterpreter::PushNoValue ( )
private

◆ PushParameterExpected()

void ScInterpreter::PushParameterExpected ( )
private

Definition at line 1921 of file interpr4.cxx.

References PushError().

Referenced by MustHaveParamCount(), MustHaveParamCountMin(), ScForecast_Ets(), and ScIfs_MS().

◆ PushSingleRef() [1/2]

void ScInterpreter::PushSingleRef ( const ScRefAddress rRef)
private

◆ PushSingleRef() [2/2]

void ScInterpreter::PushSingleRef ( SCCOL  nCol,
SCROW  nRow,
SCTAB  nTab 
)
private

◆ PushString() [1/2]

void ScInterpreter::PushString ( const OUString &  rStr)
private

◆ PushString() [2/2]

void ScInterpreter::PushString ( const svl::SharedString rString)
private

Definition at line 1818 of file interpr4.cxx.

References IfErrorPushError(), and PushTempTokenWithoutError().

◆ PushStringBuffer()

void ScInterpreter::PushStringBuffer ( const sal_Unicode pString)
private

◆ PushTempToken()

void ScInterpreter::PushTempToken ( formula::FormulaToken p)
private

Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is not formula::FormulaErrorToken.

Increments RefCount of the original token if not substituted. ATTENTION! The token had to be allocated with ‘new’ and must not be used after this call if no RefCount was set because possibly it gets immediately deleted in case of a FormulaError::StackOverflow or if substituted with formula::FormulaErrorToken!

Definition at line 617 of file interpr4.cxx.

References MAXSTACK, nGlobalError, p, PushTempTokenWithoutError(), SetError(), sp, and svError.

Referenced by Interpret(), PushCellResultToken(), QueryMatrixType(), ScColRowNameAuto(), ScDBArea(), ScIntersect(), ScMatRef(), and ScMissing().

◆ PushTempTokenWithoutError()

void ScInterpreter::PushTempTokenWithoutError ( const formula::FormulaToken p)
private

Does not substitute with formula::FormulaErrorToken in case nGlobalError is set.

Used to push tokens from within PushTempToken() or tokens that are already explicit formula::FormulaErrorToken. Increments RefCount. ATTENTION! The token had to be allocated with ‘new’ and must not be used after this call if no RefCount was set because possibly it gets immediately decremented again and thus deleted in case of a FormulaError::StackOverflow!

Definition at line 646 of file interpr4.cxx.

References formula::FormulaToken::DecRef(), maxsp, MAXSTACK, p, pStack, SetError(), and sp.

Referenced by ConvertMatrixParameters(), IfErrorPushError(), PopRefListPushMatrixOrRef(), Push(), PushCellResultToken(), PushDouble(), PushDoubleRef(), PushError(), PushExternalDoubleRef(), PushExternalSingleRef(), PushInt(), PushMatrix(), PushSingleRef(), PushString(), PushTempToken(), and PushTokenRef().

◆ PushTokenRef()

void ScInterpreter::PushTokenRef ( const formula::FormulaConstTokenRef x)
private

Pushes the token or substitutes with formula::FormulaErrorToken in case nGlobalError is set and the token passed is not formula::FormulaErrorToken.

Increments RefCount of the original token if not substituted.

Definition at line 666 of file interpr4.cxx.

References MAXSTACK, nGlobalError, PushTempTokenWithoutError(), SetError(), sp, svError, and x.

Referenced by Interpret(), JumpMatrix(), ScAggregate(), ScChooseJump(), ScCurrent(), ScIfError(), ScIfJump(), ScIfs_MS(), ScIndirect(), ScIntersect(), ScRangeFunc(), ScSubTotal(), ScSwitch_MS(), ScText(), and ScUnionFunc().

◆ PushWithoutError()

void ScInterpreter::PushWithoutError ( const formula::FormulaToken r)
private

Does not substitute with formula::FormulaErrorToken in case nGlobalError is set.

Used to push RPN tokens or from within Push() or tokens that are already explicit formula::FormulaErrorToken. Increments RefCount.

Definition at line 583 of file interpr4.cxx.

References formula::FormulaToken::DecRef(), formula::FormulaToken::IncRef(), maxsp, MAXSTACK, pStack, SetError(), and sp.

Referenced by Interpret(), JumpMatrix(), Push(), ScAggregate(), and ScSubTotal().

◆ QueryMat()

ScMatrixRef ScInterpreter::QueryMat ( const ScMatrixRef pMat,
sc::CompareOptions rOptions 
)
private

◆ QueryMatrixType()

void ScInterpreter::QueryMatrixType ( const ScMatrixRef xMat,
SvNumFormatType rRetTypeExpr,
sal_uInt32 &  rRetIndexExpr 
)
private

◆ QuickSort()

void ScInterpreter::QuickSort ( ::std::vector< double > &  rSortArray,
::std::vector< tools::Long > *  pIndexOrder 
)
staticprivate

Definition at line 4179 of file interpr3.cxx.

References i, lcl_QuickSort(), n, and comphelper::rng::uniform_size_distribution().

Referenced by GetSortArray(), and ScModalValue_MS().

◆ RateIteration()

bool ScInterpreter::RateIteration ( double  fNper,
double  fPayment,
double  fPv,
double  fFv,
bool  bPayType,
double &  fGuess 
)
staticprivate

Definition at line 1987 of file interpr2.cxx.

References nCount, and SCdEpsilon.

Referenced by ScRate().

◆ ReplaceCell()

void ScInterpreter::ReplaceCell ( ScAddress rPos)
private

◆ ReverseStack()

void ScInterpreter::ReverseStack ( sal_uInt8  nParamCount)
private

◆ RoundNumber()

void ScInterpreter::RoundNumber ( rtl_math_RoundingMode  eMode)
private

◆ RoundSignificant()

void ScInterpreter::RoundSignificant ( double  fX,
double  fDigits,
double &  fRes 
)
staticprivate

Definition at line 1001 of file interpr2.cxx.

Referenced by RoundNumber(), and ScRoundSignificant().

◆ ScAbs()

void ScInterpreter::ScAbs ( )
private

Definition at line 943 of file interpr2.cxx.

References GetDouble(), and PushDouble().

Referenced by Interpret().

◆ ScAdd()

void ScInterpreter::ScAdd ( )
private

Definition at line 1274 of file interpr5.cxx.

References CalculateAddSub().

Referenced by Interpret().

◆ ScAddressFunc()

void ScInterpreter::ScAddressFunc ( )
private

◆ ScAggregate()

void ScInterpreter::ScAggregate ( )
private