22#include <rtl/math.hxx>
23#include <rtl/ustring.hxx>
41namespace sfx2 {
class LinkManager; }
66 double mfMin = std::numeric_limits<double>::max();
67 double mfMax = std::numeric_limits<double>::lowest();
70template<
typename charT,
typename traits>
71inline std::basic_ostream<charT, traits> &
operator <<(std::basic_ostream<charT, traits> & stream,
const ParamIfsResult& rRes)
75 "count=" << rRes.
mfCount <<
"," <<
76 "min=" << rRes.
mfMin <<
"," <<
77 "max=" << rRes.
mfMax <<
"," <<
87class SharedStringPool;
133 {
return r1.get() < r2.get(); }
135typedef ::std::map< const formula::FormulaConstTokenRef, formula::FormulaConstTokenRef, FormulaTokenRef_less>
ScTokenMatrixMap;
160 static inline double div(
const double& fNumerator,
const double& fDenominator );
238 static double ScGetGCD(
double fx,
double fy);
319 SvNumFormatType * pRetTypeExpr, sal_uInt32 * pRetIndexExpr,
bool bFinalResult =
false );
522 void ScRandomImpl(
const std::function<
double(
double fFirst,
double fLast )>& RandomFunc,
523 double fFirst,
double fLast );
588 void ScMin(
bool bTextAsZero =
false );
589 void ScMax(
bool bTextAsZero =
false );
596 const std::function<
void(
SCSIZE i,
double fCurrent )>& MatOpFunc,
bool bDoMatOp );
601 void ScAverage(
bool bTextAsZero =
false );
604 void GetStVarParams(
bool bTextAsZero,
double(*VarResult)(
double fVal,
size_t nValCount ) );
605 void ScVar(
bool bTextAsZero =
false );
606 void ScVarP(
bool bTextAsZero =
false );
607 void ScStDev(
bool bTextAsZero =
false );
608 void ScStDevP(
bool bTextAsZero =
false );
637 std::unique_ptr<ScDBQueryParamBase>
GetDBParams(
bool& rMissingField );
709 double GetDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
bool bStrict );
722 ::std::vector<double>& rSortArray,
bool bWeekendMask[ 7 ] );
724 ::std::vector<double>& rSortArray,
bool bWeekendMask[ 7 ],
bool bWorkdayFunction );
736 void ScCeil(
bool bODFF );
778 static double ScGetPV(
double fRate,
double fNper,
double fPmt,
779 double fFv,
bool bPayInAdvance);
782 static double ScGetDDB(
double fCost,
double fSalvage,
double fLife,
783 double fPeriod,
double fFactor);
786 static double ScInterVDB(
double fCost,
double fSalvage,
double fLife,
double fLife1,
787 double fPeriod,
double fFactor);
791 static double ScGetPMT(
double fRate,
double fNper,
double fPv,
792 double fFv,
bool bPayInAdvance);
795 static double ScGetFV(
double fRate,
double fNper,
double fPmt,
796 double fPv,
bool bPayInAdvance);
799 static bool RateIteration(
double fNper,
double fPayment,
double fPv,
800 double fFv,
bool bPayType,
double& fGuess);
802 double ScGetIpmt(
double fRate,
double fPer,
double fNper,
double fPv,
803 double fFv,
bool bPayInAdvance,
double& fPmt);
838 ,
double& fT,
double& fF);
855 static double taylor(
const double* pPolynom, sal_uInt16 nMax,
double x);
856 static double gauss(
double x);
859 static double phi(
double x);
862 static double GetPercentile( ::std::vector<double> & rArray,
double fPercentile );
866 double GetBetaDist(
double x,
double alpha,
double beta);
871 double GetFDist(
double x,
double fF1,
double fF2);
877 double GetBeta(
double fAlpha,
double fBeta);
878 static double GetLogBeta(
double fAlpha,
double fBeta);
931 double GetMedian( ::std::vector<double> & rArray );
935 void GetSortArray(
sal_uInt8 nParamCount, ::std::vector<double>& rSortArray, ::std::vector<tools::Long>* pIndexOrder,
bool bConvertTextInArray,
bool bAllowEmptyArray );
936 static void QuickSort(::std::vector<double>& rSortArray, ::std::vector<tools::Long>* pIndexOrder);
946 void ScRank(
bool bAverage );
949 static double GetPercentrank( ::std::vector<double> & rArray,
double fVal,
bool bInclusive );
993 double GetGammaDist(
double fX,
double fAlpha,
double fLambda);
994 double GetTInv(
double fAlpha,
double fSize,
int nType );
1050 if ( nAct == nMust )
1061 if ( nMust <= nAct && nAct <= nMax )
1083 PushError(FormulaError::UnknownStackVariable);
1091 if (!std::isfinite( fVal))
1096 else if (fVal < 0.0)
1111 double fVal = rtl::math::approxFloor(
GetDouble());
1115 SetError( FormulaError::IllegalArgument);
1117 return static_cast<sal_Int32
>(fVal);
1124 SetError( FormulaError::StringOverflow );
1135 SetError( FormulaError::StringOverflow );
1136 rResult.setLength(0);
1144 if ( !std::isfinite( rVal ) )
1147 if ( nErr != FormulaError::NONE )
1157 return sc::div(fNumerator, fDenominator);
1162 return static_cast< sal_Int16
>( (
n - 1 ) % 7 );
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
This class provides LO with Kahan summation algorithm About this algorithm: https://en....
double get() const
Returns the final sum.
Base class for abstracting range data backends for database functions.
::formula::FormulaTokenRef TokenRef
std::shared_ptr< ScTokenArray > TokenArrayRef
formula::FormulaConstTokenRef PopToken()
static void SetGlobalConfig(const ScCalcConfig &rConfig)
void ScNormDist(int nMinParamCount)
void ScStDev(bool bTextAsZero=false)
sal_uLong GetRetFormatIndex() const
void SetError(FormulaError nError)
double GetBetaDistPDF(double fX, double fA, double fB)
double GetBinomDistPMF(double x, double n, double p)
double ConvertStringToValue(const OUString &)
ScCalcConfig maCalcConfig
bool CalculateSkew(KahanSum &fSum, double &fCount, std::vector< double > &values)
formula::FormulaToken * CreateDoubleOrTypedToken(double fVal)
double GetDateSerial(sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bStrict)
Obtain the date serial number for a given date.
void CalculateLookup(bool bHLookup)
svl::SharedString GetString()
static double ScGetPV(double fRate, double fNper, double fPmt, double fFv, bool bPayInAdvance)
static double gauss(double x)
void ScGetIsoWeekOfYear()
bool IsInArrayContext() const
static bool RateIteration(double fNper, double fPayment, double fPv, double fFv, bool bPayType, double &fGuess)
bool ConvertMatrixParameters()
static ScCalcConfig * mpGlobalConfig
FormulaError GetWeekendAndHolidayMasks(const sal_uInt8 nParamCount, const sal_uInt32 nNullDate, ::std::vector< double > &rSortArray, bool bWeekendMask[7])
static bool CheckStringPositionArgument(double &fVal)
Check if a double is suitable as string position or length argument.
bool CheckMatrix(bool _bLOG, sal_uInt8 &nCase, SCSIZE &nCX, SCSIZE &nCY, SCSIZE &nRX, SCSIZE &nRY, SCSIZE &M, SCSIZE &N, ScMatrixRef &pMatX, ScMatrixRef &pMatY)
double GetChiDist(double fChi, double fDF)
You must ensure fDF>0.0.
bool MustHaveParamCount(short nAct, short nMust)
formula::FormulaTokenIterator aCode
formula::FormulaToken * CreateFormulaDoubleToken(double fVal, SvNumFormatType nFmt=SvNumFormatType::NUMBER)
void DoubleRefToVars(const formula::FormulaToken *p, SCCOL &rCol1, SCROW &rRow1, SCTAB &rTab1, SCCOL &rCol2, SCROW &rRow2, SCTAB &rTab2)
void PopExternalSingleRef(sal_uInt16 &rFileId, OUString &rTabName, ScSingleRefData &rRef)
bool MustHaveParamCountMin(short nAct, short nMin)
sal_Int32 GetStringPositionArgument()
Obtain a sal_Int32 suitable as string position or length argument.
bool FillEntry(ScQueryEntry &rEntry)
static FormulaError GetCellErrCode(const ScRefCellValue &rCell)
void PushExternalDoubleRef(sal_uInt16 nFileId, const OUString &rTabName, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
SubtotalFlags mnSubTotalFlags
static const double fMaxGammaArgument
void AssertFormulaMatrix()
ScDBRangeBase * PopDBDoubleRef()
void CalculateSkewOrSkewp(bool bSkewp)
void PushIllegalParameter()
bool JumpMatrix(short nStackLevel)
sc::RangeMatrix CompareMat(ScQueryOp eOp, sc::CompareOptions *pOptions=nullptr)
bool GetDoubleOrString(double &rValue, svl::SharedString &rString)
returns TRUE if double (or error, check nGlobalError), else FALSE
static ScCalcConfig & GetOrCreateGlobalConfig()
FormulaError nGlobalError
void PushIllegalArgument()
sal_Int16 GetInt16()
if GetDouble() not within int16 limits sets nGlobalError and returns SAL_MAX_INT16
bool CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
static thread_local bool bGlobalStackInUse
double GetGamma(double x)
You must ensure non integer arguments for fZ<1.
void ScLogNormDist(int nMinParamCount)
formula::StackVar Interpret()
void ScTDist_T(int nTails)
static double taylor(const double *pPolynom, sal_uInt16 nMax, double x)
void DoubleRefToRange(const ScComplexRefData &, ScRange &, bool bDontCheckForTableOp=false)
void ScMax(bool bTextAsZero=false)
void PushDoubleRef(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
void Push(const formula::FormulaToken &r)
Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is n...
static void RoundSignificant(double fX, double fDigits, double &fRes)
void PushExternalSingleRef(sal_uInt16 nFileId, const OUString &rTabName, SCCOL nCol, SCROW nRow, SCTAB nTab)
void CalculateMatrixValue(const ScMatrix *pMat, SCSIZE nC, SCSIZE nR)
formula::StackVar GetResultType() const
void ReplaceCell(ScAddress &)
const svl::SharedString & GetStringResult() const
void CalculateRGPRKP(bool _bRKP)
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...
void ScRank(bool bAverage)
formula::StackVar GetRawStackType()
Raw stack type without default replacements.
svl::SharedString GetStringFromDouble(const double fVal)
const formula::FormulaToken * pCur
ScInterpreterContext & mrContext
double ScGetIpmt(double fRate, double fPer, double fNper, double fPv, double fFv, bool bPayInAdvance, double &fPmt)
void ScEncodeURL()
Returns a string in which all non-alphanumeric characters except stroke and underscore (-_) have been...
SvNumFormatType nFuncFmtType
void CalculateSmallLarge(bool bSmall)
bool DoubleRefToPosSingleRef(const ScRange &rRange, ScAddress &rAdr)
sal_uInt32 GetUInt32()
if GetDouble() not within uint32 limits sets nGlobalError and returns SAL_MAX_UINT32
std::unique_ptr< ScDBQueryParamBase > GetDBParams(bool &rMissingField)
double GetValueCellValue(const ScAddress &, double fOrig)
Only ValueCell, formula cells already store the result rounded.
bool IsTableOpInRange(const ScRange &)
static double integralPhi(double x)
size_t GetRefListArrayMaxSize(short nParamCount)
Check for array of references to determine the maximum size of a return column vector if in array con...
const svl::SharedString & PopString()
const ScComplexRefData * GetStackDoubleRef(size_t rRefInList=0)
void GetCellString(svl::SharedString &rStr, ScRefCellValue &rCell)
void ScBetaDist_MS()
Microsoft version has parameters in different order Also, upper and lowerbound are optional and have ...
bool PopDoubleRefOrSingleRef(ScAddress &rAdr)
bool CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
void ValidateRef(const ScSingleRefData &rRef)
VolatileType meVolatileType
void GetExternalDoubleRef(sal_uInt16 nFileId, const OUString &rTabName, const ScComplexRefData &aData, ScExternalRefCache::TokenArrayRef &rArray)
double GetCellValueOrZero(const ScAddress &, ScRefCellValue &rCell)
void PushError(FormulaError nError)
void PopRefListPushMatrixOrRef()
sal_uInt8 GetByte() const
ScMatrixRef QueryMat(const ScMatrixRef &pMat, sc::CompareOptions &rOptions)
double GetDoubleFromMatrix(const ScMatrixRef &pMat)
const formula::FormulaConstTokenRef & GetResultToken() const
FormulaError GetWeekendAndHolidayMasks_MS(const sal_uInt8 nParamCount, const sal_uInt32 nNullDate, ::std::vector< double > &rSortArray, bool bWeekendMask[7], bool bWorkdayFunction)
static const ScCalcConfig & GetGlobalConfig()
sal_Int32 GetInt32WithDefault(sal_Int32 nDefault)
if GetDoubleWithDefault() not within int32 limits sets nGlobalError and returns SAL_MAX_INT32
void PushWithoutError(const formula::FormulaToken &r)
Does not substitute with formula::FormulaErrorToken in case nGlobalError is set.
void ScForecast_Ets(ScETSType eETSType)
void CalculatePearsonCovar(bool _bPearson, bool _bStexy, bool _bSample)
bool CheckStringResultLen(OUString &rResult, sal_Int32 nIncrease)
void Init(ScFormulaCell *pCell, const ScAddress &rPos, ScTokenArray &rTokArray)
double GetBeta(double fAlpha, double fBeta)
std::vector< double > GetRankNumberArray(SCSIZE &rCol, SCSIZE &rRow)
void ScModalValue_MS(bool bSingle)
ScMatrixRef GetNewMat(SCSIZE nC, SCSIZE nR, bool bEmpty=false)
void PopDoubleRefPushMatrix()
bool MustHaveParamCountMinWithStackCheck(short nAct, short nMin)
static double ScGetPMT(double fRate, double fNper, double fPv, double fFv, bool bPayInAdvance)
static void MEMat(const ScMatrixRef &mM, SCSIZE n)
ScMatValType GetDoubleOrStringFromMatrix(double &rDouble, svl::SharedString &rString)
double GetTInv(double fAlpha, double fSize, int nType)
bool LookupQueryWithCache(ScAddress &o_rResultPos, const ScQueryParam &rParam, const ScComplexRefData *refData) const
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.
void ScAverage(bool bTextAsZero=false)
double GetNumResult() const
static double GetLogBeta(double fAlpha, double fBeta)
static double ScGetDDB(double fCost, double fSalvage, double fLife, double fPeriod, double fFactor)
double GetLowRegIGamma(double fA, double fX)
You must ensure fA>0.0 && fX>0.0)
void ScChiDist(bool bODFF)
double GetFDist(double x, double fF1, double fF2)
static double GetChiSqDistPDF(double fX, double fDF)
static double BinomKoeff(double n, double k)
double GetGammaDistPDF(double fX, double fAlpha, double fLambda)
Gamma distribution, probability density function.
SvNumFormatType GetRetFormatType() const
void IterateParametersIfs(double(*ResultFunc)(const sc::ParamIfsResult &rRes))
ScTokenMatrixMap & GetTokenMatrixMap()
void ConvertMatrixJumpConditionToMatrix()
double Fakultaet(double x)
void PushDouble(double nVal)
void IterateParameters(ScIterFunc, bool bTextAsZero=false)
void ScQuartile(bool bInclusive)
sc::RangeMatrix PopRangeMatrix()
const formula::FormulaToken ** pStack
void QueryMatrixType(const ScMatrixRef &xMat, SvNumFormatType &rRetTypeExpr, sal_uInt32 &rRetIndexExpr)
void PopSingleRef(ScAddress &)
void ReverseStack(sal_uInt8 nParamCount)
ScTokenMatrixMap maTokenMatrixMap
void MergeCalcConfig()
Merge global and document specific settings.
void ScRawSubtract()
The purpose of RAWSUBTRACT() is exactly to not apply any error correction, approximation etc.
bool SetSbxVariable(SbxVariable *pVar, const ScAddress &)
SvNumberFormatter * pFormatter
FormulaError mnStringNoValueError
double Compare(ScQueryOp eOp)
static thread_local std::unique_ptr< ScTokenStack > pGlobalStack
void ScVar(bool bTextAsZero=false)
void PushTempTokenWithoutError(const formula::FormulaToken *)
Does not substitute with formula::FormulaErrorToken in case nGlobalError is set.
static double div(const double &fNumerator, const double &fDenominator)
Fail safe division, returning a FormulaError::DivisionByZero coded into a double if denominator is 0....
static sal_Int16 GetDayOfWeek(sal_Int32 n)
void MatrixJumpConditionToMatrix()
void MakeMatNew(ScMatrixRef &rMat, SCSIZE nC, SCSIZE nR)
void PushParameterExpected()
double GetHypGeomDist(double x, double n, double M, double N)
Calculates a value of the hypergeometric distribution.
void TreatDoubleError(double &rVal)
void CalculateTrendGrowth(bool _bGrowth)
void GetDBStVarParams(double &rVal, double &rValCount)
double GetChiSqDistCDF(double fX, double fDF)
You must ensure fDF>0.0.
double GetMedian(::std::vector< double > &rArray)
static double ScInterVDB(double fCost, double fSalvage, double fLife, double fLife1, double fPeriod, double fFactor)
ScJumpMatrix * pJumpMatrix
void CalculateAddSub(bool _bSub)
void ScRandomImpl(const std::function< double(double fFirst, double fLast)> &RandomFunc, double fFirst, double fLast)
bool CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt8 *pCellArr)
sfx2::LinkManager * mpLinkManager
sal_Int32 double_to_int32(double fVal)
FormulaError GetError() const
sal_uInt32 GetCellNumberFormat(const ScAddress &rPos, ScRefCellValue &rCell)
void PopDoubleRef(ScRange &rRange, short &rParam, size_t &rRefInList)
If formula::StackVar formula::svDoubleRef pop ScDoubleRefToken and return values of ScComplexRefData.
double GetTDist(double T, double fDF, int nType)
void PushTokenRef(const formula::FormulaConstTokenRef &)
Pushes the token or substitutes with formula::FormulaErrorToken in case nGlobalError is set and the t...
void IterateParametersIf(ScIterFuncIf)
double GetUpRegIGamma(double fA, double fX)
You must ensure fA>0.0 && fX>0.0)
void ScPercentile(bool bInclusive)
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 GetStVarParams(bool bTextAsZero, double(*VarResult)(double fVal, size_t nValCount))
void PushMatrix(const sc::RangeMatrix &rMat)
void GetNumberSequenceArray(sal_uInt8 nParamCount, ::std::vector< double > &rArray, bool bConvertTextInArray)
static double ScGetFV(double fRate, double fNper, double fPmt, double fPv, bool bPayInAdvance)
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.
void ScGammaDist(bool bODFF)
void CalculateSlopeIntercept(bool bSlope)
void ScVarP(bool bTextAsZero=false)
void ScCeil(bool bODFF)
tdf69552 ODFF1.2 function CEILING and Excel function CEILING.MATH In essence, the difference between ...
static double phi(double x)
ScFormulaCell * pMyFormulaCell
double GetPercentileExclusive(::std::vector< double > &rArray, double fPercentile)
void PopExternalDoubleRef(sal_uInt16 &rFileId, OUString &rTabName, ScComplexRefData &rRef)
static void QuickSort(::std::vector< double > &rSortArray, ::std::vector< tools::Long > *pIndexOrder)
double GetCellValue(const ScAddress &, ScRefCellValue &rCell)
bool MatrixParameterConversion()
void PushTempToken(formula::FormulaToken *)
Does substitute with formula::FormulaErrorToken in case nGlobalError is set and the token passed is n...
void ScStDevP(bool bTextAsZero=false)
void PushSingleRef(SCCOL nCol, SCROW nRow, SCTAB nTab)
VolatileType GetVolatileType() const
static double GetLogGamma(double x)
You must ensure fZ>0.
sc::RangeMatrix GetRangeMatrix()
void ScMin(bool bTextAsZero=false)
void ScHypGeomDist(int nMinParamCount)
Calculates a value of the hypergeometric distribution.
void ScNetWorkdays(bool bOOXML_Version)
void SingleRefToVars(const ScSingleRefData &rRef, SCCOL &rCol, SCROW &rRow, SCTAB &rTab)
bool IfErrorPushError()
If nGlobalError is set push formula::FormulaErrorToken.
void GetSortArray(sal_uInt8 nParamCount, ::std::vector< double > &rSortArray, ::std::vector< tools::Long > *pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray)
double GetGammaDist(double fX, double fAlpha, double fLambda)
Gamma distribution, cumulative distribution function.
double GetBetaDist(double x, double alpha, double beta)
double GetDoubleWithDefault(double nDefault)
void ScFloor(bool bODFF)
tdf69552 ODFF1.2 function FLOOR and Excel function FLOOR.MATH In essence, the difference between the ...
static double GetPercentile(::std::vector< double > &rArray, double fPercentile)
ScMatrixRef MatConcat(const ScMatrixRef &pMat1, const ScMatrixRef &pMat2)
void ScIfError(bool bNAonly)
void ScRoundSignificant()
sal_Int32 GetInt32()
if GetDouble() not within int32 limits sets nGlobalError and returns SAL_MAX_INT32
formula::StackVar GetStackType()
Stack type with replacement of defaults, e.g. svMissing and formula::svEmptyCell will result in formu...
formula::FormulaConstTokenRef xResult
static double GetPercentrank(::std::vector< double > &rArray, double fVal, bool bInclusive)
svl::SharedStringPool & mrStrPool
static double ScGetGCD(double fx, double fy)
svl::SharedString GetStringFromMatrix(const ScMatrixRef &pMat)
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.
SvNumFormatType nCurFmtType
void CalculateSumX2MY2SumX2DY2(bool _bSumX2DY2)
static double gaussinv(double x)
void SetLinkManager(sfx2::LinkManager *pLinkMgr)
SvNumFormatType nRetFmtType
void PushString(const OUString &rStr)
void DBIterator(ScIterFunc)
void RoundNumber(rtl_math_RoundingMode eMode)
void PushStringBuffer(const sal_Unicode *pString)
ScMatrixRef CreateMatrixFromDoubleRef(const formula::FormulaToken *pToken, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
void ScPercentrank(bool bInclusive)
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 i...
ScInterpreter(ScFormulaCell *pCell, ScDocument &rDoc, ScInterpreterContext &rContext, const ScAddress &, ScTokenArray &, bool bForGroupThreading=false)
FormulaError GetErrorType()
void ScPoissonDist(bool bODFF)
Matrix data type that can store values of mixed types.
static bool HasForceArray(OpCode eOp)
Whether OpCode has a parameter of type ForceArray or ReferenceOrForceArray.
const formula::FormulaToken * pPointer[MAXSTACK]
Reference< XOutputStream > stream
FormulaError GetDoubleErrorValue(double fVal)
constexpr size_t MAXSTACK
constexpr sal_Int32 kScInterpreterMaxStrLen
Arbitrary 256MB result string length limit.
::std::map< const formula::FormulaConstTokenRef, formula::FormulaConstTokenRef, FormulaTokenRef_less > ScTokenMatrixMap
CAUTION! The following defines must be in the same namespace as the respective type.
double div(const double &fNumerator, const double &fDenominator)
Return fNumerator/fDenominator if fDenominator!=0 else #DIV/0! error coded into double.
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, const ParamIfsResult &rRes)
These need to be in global namespace just like their respective types are.
Configuration options for formula interpreter.
Complex reference (a range) into the sheet.
Each instance of this struct represents a single filtering criteria.
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Single reference (one address) into the sheet.
::std::vector< ScComplexRefData > ScRefList
::boost::intrusive_ptr< ScMatrix > ScMatrixRef