[Libreoffice-commits] core.git: 4 commits - formula/source sc/source
Eike Rathke
erack at redhat.com
Wed May 10 12:01:07 UTC 2017
formula/source/core/api/FormulaCompiler.cxx | 21 +
sc/source/core/inc/parclass.hxx | 5
sc/source/core/tool/parclass.cxx | 350 ++++++++++++++--------------
3 files changed, 200 insertions(+), 176 deletions(-)
New commits:
commit eae5503d1b3a7f9aace2603d6ce91003ede33974
Author: Eike Rathke <erack at redhat.com>
Date: Wed May 10 13:59:14 2017 +0200
Resolves: tdf#107724 INDIRECT and OFFSET return ParamClass::Reference
In which case ParamClass::ReferenceOrForceArray is not propagated to a nested
function.
Change-Id: Ibf054d7a2b7350b90ab71766fd1d501c5ae5d5e9
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index fbd790ef4742..35513911adf5 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -128,6 +128,7 @@ const ScParameterClassification::RawData ScParameterClassification::pRawData[] =
{ ocHarMean, {{ Reference }, 1, Value }},
{ ocIRR, {{ Reference, Value }, 0, Value }},
{ ocIndex, {{ Reference, Value, Value, Value }, 0, Value }},
+ { ocIndirect, {{ Value, Value }, 0, Reference }},
{ ocIntercept, {{ ForceArray, ForceArray }, 0, Value }},
{ ocIntersect, {{ Reference, Reference }, 0, Value }},
{ ocIsRef, {{ Reference }, 0, Value }},
@@ -163,7 +164,7 @@ const ScParameterClassification::RawData ScParameterClassification::pRawData[] =
{ ocNetWorkdays_MS, {{ Value, Value, Value, Reference }, 0, Value }},
{ ocNot, {{ Array }, 0, Value }},
{ ocNotEqual, {{ Array, Array }, 0, Value }},
- { ocOffset, {{ Reference, Value, Value, Value, Value }, 0, Value }},
+ { ocOffset, {{ Reference, Value, Value, Value, Value }, 0, Reference }},
{ ocOr, {{ Reference }, 1, Value }},
{ ocPearson, {{ ForceArray, ForceArray }, 0, Value }},
{ ocPercentile, {{ Reference, Value }, 0, Value }},
commit 3e67f82fcee0ef43ad8fd9f36e0d618c33d4ee72
Author: Eike Rathke <erack at redhat.com>
Date: Wed May 10 12:55:47 2017 +0200
inherit ReferenceOrForceArray only if nested not Reference, tdf#107724 prep
Change-Id: I14c6a651677fcdcaac943d10f6a0d663bf37aff2
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 60ad7927c327..7a28568ad590 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2552,18 +2552,33 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef& rCurr )
if (!(rCurr->GetOpCode() != ocPush && (rCurr->GetType() == svByte || rCurr->GetType() == svJump)))
return;
+ // Inherited parameter class.
formula::ParamClass eType = pCurrentFactorToken->GetInForceArray();
- if (eType == formula::ParamClass::ForceArray || eType == formula::ParamClass::ReferenceOrForceArray)
+ if (eType == formula::ParamClass::ForceArray)
{
rCurr->SetInForceArray( eType);
return;
}
+ else if (eType == formula::ParamClass::ReferenceOrForceArray)
+ {
+ // Inherit further only if the return class of the nested function is
+ // not Reference.
+ if (GetForceArrayParameter( rCurr.get(), SAL_MAX_UINT16) != ParamClass::Reference)
+ rCurr->SetInForceArray( eType);
+ return;
+ }
if (nCurrentFactorParam > 0)
{
- eType = GetForceArrayParameter( pCurrentFactorToken.get(), static_cast<sal_uInt8>(nCurrentFactorParam - 1));
- if (eType == ParamClass::ForceArray || eType == ParamClass::ReferenceOrForceArray)
+ // Actual current parameter's class.
+ eType = GetForceArrayParameter( pCurrentFactorToken.get(), static_cast<sal_uInt16>(nCurrentFactorParam - 1));
+ if (eType == ParamClass::ForceArray)
rCurr->SetInForceArray( eType);
+ else if (eType == ParamClass::ReferenceOrForceArray)
+ {
+ if (GetForceArrayParameter( rCurr.get(), SAL_MAX_UINT16) != ParamClass::Reference)
+ rCurr->SetInForceArray( eType);
+ }
}
}
commit e52beea63ddd7087c61df5838f9643d68486d71e
Author: Eike Rathke <erack at redhat.com>
Date: Wed May 10 12:26:19 2017 +0200
GetParameterType: SAL_MAX_UINT16 for return ParamClass, tdf#107724 prep
Change-Id: Idff1d247907494ffd50a0fcf0fc73344e381cc3c
diff --git a/sc/source/core/inc/parclass.hxx b/sc/source/core/inc/parclass.hxx
index 18a4026679ae..06c5161a988d 100644
--- a/sc/source/core/inc/parclass.hxx
+++ b/sc/source/core/inc/parclass.hxx
@@ -42,7 +42,9 @@ public:
/** Get one parameter type for function eOp.
@param nParameter
- Which parameter, 0-based */
+ Which parameter, 0-based.
+ SAL_MAX_UINT16 for return type of eOp.
+ */
static formula::ParamClass GetParameterType( const formula::FormulaToken* pToken,
sal_uInt16 nParameter);
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index 17ef5b257d0b..fbd790ef4742 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -324,7 +324,7 @@ formula::ParamClass ScParameterClassification::GetParameterType(
case ocExternal:
return GetExternalParameterType( pToken, nParameter);
case ocMacro:
- return Reference;
+ return (nParameter == SAL_MAX_UINT16 ? Value : Reference);
default:
{
// added to avoid warnings
@@ -334,7 +334,9 @@ formula::ParamClass ScParameterClassification::GetParameterType(
{
sal_uInt8 nRepeat;
formula::ParamClass eType;
- if ( nParameter < CommonData::nMaxParams )
+ if (nParameter == SAL_MAX_UINT16)
+ eType = pData[eOp].aData.eReturn;
+ else if ( nParameter < CommonData::nMaxParams )
eType = pData[eOp].aData.nParam[nParameter];
else if ( (nRepeat = pData[eOp].aData.nRepeatLast) > 0 )
{
@@ -357,6 +359,9 @@ formula::ParamClass ScParameterClassification::GetExternalParameterType( const f
sal_uInt16 nParameter)
{
formula::ParamClass eRet = Unknown;
+ if (nParameter == SAL_MAX_UINT16)
+ return eRet;
+
// similar to ScInterpreter::ScExternal()
OUString aFuncName = ScGlobal::pCharClass->uppercase( pToken->GetExternal());
{
commit 656cf4d2e7c7d193d4d23900a344d6625fc217ac
Author: Eike Rathke <erack at redhat.com>
Date: Wed May 10 12:07:19 2017 +0200
Add ParamClass ScParameterClassification::CommonData::eReturn, tdf#107724 prep
Init with Value, could be Unknown or any other value except Reference as well
at the moment, actually DontCare.
Change-Id: I689eb2ed297bec3a5ad333f8bb247ec2184faf5a
diff --git a/sc/source/core/inc/parclass.hxx b/sc/source/core/inc/parclass.hxx
index 9c7f34224b7f..18a4026679ae 100644
--- a/sc/source/core/inc/parclass.hxx
+++ b/sc/source/core/inc/parclass.hxx
@@ -63,6 +63,7 @@ private:
formula::ParamClass nParam[nMaxParams];
sal_uInt8 nRepeatLast;
+ formula::ParamClass eReturn;
};
struct RawData
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index c4b0f717e125..17ef5b257d0b 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -49,180 +49,180 @@ using namespace formula;
const ScParameterClassification::RawData ScParameterClassification::pRawData[] =
{
- // { OpCode, {{ Type, ... }, nRepeatLast }},
+ // { OpCode, {{ ParamClass, ... }, nRepeatLast, ReturnClass }},
// IF() and CHOOSE() are somewhat special, since the ScJumpMatrix is
// created inside those functions and ConvertMatrixParameters() is not
// called for them.
- { ocIf, {{ Array, Reference, Reference }, 0 }},
- { ocIfError, {{ Array, Reference }, 0 }},
- { ocIfNA, {{ Array, Reference }, 0 }},
- { ocChoose, {{ Array, Reference }, 1 }},
+ { ocIf, {{ Array, Reference, Reference }, 0, Value }},
+ { ocIfError, {{ Array, Reference }, 0, Value }},
+ { ocIfNA, {{ Array, Reference }, 0, Value }},
+ { ocChoose, {{ Array, Reference }, 1, Value }},
// Other specials.
- { ocOpen, {{ Bounds }, 0 }},
- { ocClose, {{ Bounds }, 0 }},
- { ocSep, {{ Bounds }, 0 }},
- { ocNoName, {{ Bounds }, 0 }},
- { ocStop, {{ Bounds }, 0 }},
- { ocUnion, {{ Reference, Reference }, 0 }},
- { ocRange, {{ Reference, Reference }, 0 }},
+ { ocOpen, {{ Bounds }, 0, Value }},
+ { ocClose, {{ Bounds }, 0, Value }},
+ { ocSep, {{ Bounds }, 0, Value }},
+ { ocNoName, {{ Bounds }, 0, Value }},
+ { ocStop, {{ Bounds }, 0, Value }},
+ { ocUnion, {{ Reference, Reference }, 0, Value }},
+ { ocRange, {{ Reference, Reference }, 0, Value }},
// Functions with Value parameters only but not in resource.
- { ocBackSolver, {{ Value, Value, Value }, 0 }},
- { ocTableOp, {{ Value, Value, Value, Value, Value }, 0 }},
+ { ocBackSolver, {{ Value, Value, Value }, 0, Value }},
+ { ocTableOp, {{ Value, Value, Value, Value, Value }, 0, Value }},
// Operators and functions.
- { ocAdd, {{ Array, Array }, 0 }},
- { ocAggregate, {{ Value, Value, Reference }, 1 }},
- { ocAmpersand, {{ Array, Array }, 0 }},
- { ocAnd, {{ Reference }, 1 }},
- { ocAreas, {{ Reference }, 0 }},
- { ocAveDev, {{ Reference }, 1 }},
- { ocAverage, {{ Reference }, 1 }},
- { ocAverageA, {{ Reference }, 1 }},
- { ocAverageIf, {{ Reference, Value, Reference }, 0 }},
- { ocAverageIfs, {{ Reference, Reference, Value }, 2 }},
- { ocCell, {{ Value, Reference }, 0 }},
- { ocColumn, {{ Reference }, 0 }},
- { ocColumns, {{ Reference }, 1 }},
- { ocConcat_MS, {{ Reference }, 1 }},
- { ocCorrel, {{ ForceArray, ForceArray }, 0 }},
- { ocCount, {{ Reference }, 1 }},
- { ocCount2, {{ Reference }, 1 }},
- { ocCountEmptyCells, {{ Reference }, 0 }},
- { ocCountIf, {{ Reference, Value }, 0 }},
- { ocCountIfs, {{ Reference, Value }, 2 }},
- { ocCovar, {{ ForceArray, ForceArray }, 0 }},
- { ocCovarianceP, {{ ForceArray, ForceArray }, 0 }},
- { ocCovarianceS, {{ ForceArray, ForceArray }, 0 }},
- { ocDBAverage, {{ Reference, Reference, Reference }, 0 }},
- { ocDBCount, {{ Reference, Reference, Reference }, 0 }},
- { ocDBCount2, {{ Reference, Reference, Reference }, 0 }},
- { ocDBGet, {{ Reference, Reference, Reference }, 0 }},
- { ocDBMax, {{ Reference, Reference, Reference }, 0 }},
- { ocDBMin, {{ Reference, Reference, Reference }, 0 }},
- { ocDBProduct, {{ Reference, Reference, Reference }, 0 }},
- { ocDBStdDev, {{ Reference, Reference, Reference }, 0 }},
- { ocDBStdDevP, {{ Reference, Reference, Reference }, 0 }},
- { ocDBSum, {{ Reference, Reference, Reference }, 0 }},
- { ocDBVar, {{ Reference, Reference, Reference }, 0 }},
- { ocDBVarP, {{ Reference, Reference, Reference }, 0 }},
- { ocDevSq, {{ Reference }, 1 }},
- { ocDiv, {{ Array, Array }, 0 }},
- { ocEqual, {{ Array, Array }, 0 }},
- { ocFTest, {{ ForceArray, ForceArray }, 0 }},
- { ocForecast, {{ Value, ForceArray, ForceArray }, 0 }},
- { ocForecast_ETS_ADD, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value }, 0 }},
- { ocForecast_ETS_MUL, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value }, 0 }},
- { ocForecast_ETS_PIA, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value, Value }, 0 }},
- { ocForecast_ETS_PIM, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value, Value }, 0 }},
- { ocForecast_ETS_SEA, {{ ForceArray, ForceArray, Value, Value }, 0 }},
- { ocForecast_ETS_STA, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value }, 0 }},
- { ocForecast_ETS_STM, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value }, 0 }},
- { ocFormula, {{ Reference }, 0 }},
- { ocFrequency, {{ Reference, Reference }, 0 }},
- { ocGCD, {{ Reference }, 1 }},
- { ocGeoMean, {{ Reference }, 1 }},
- { ocGreater, {{ Array, Array }, 0 }},
- { ocGreaterEqual, {{ Array, Array }, 0 }},
- { ocGrowth, {{ Reference, Reference, Reference, Value }, 0 }},
- { ocHLookup, {{ Value, ReferenceOrForceArray, Value, Value }, 0 }},
- { ocHarMean, {{ Reference }, 1 }},
- { ocIRR, {{ Reference, Value }, 0 }},
- { ocIndex, {{ Reference, Value, Value, Value }, 0 }},
- { ocIntercept, {{ ForceArray, ForceArray }, 0 }},
- { ocIntersect, {{ Reference, Reference }, 0 }},
- { ocIsRef, {{ Reference }, 0 }},
- { ocKurt, {{ Reference }, 1 }},
- { ocLCM, {{ Reference }, 1 }},
- { ocLarge, {{ Reference, Value }, 0 }},
- { ocLess, {{ Array, Array }, 0 }},
- { ocLessEqual, {{ Array, Array }, 0 }},
- { ocLinest, {{ ForceArray, ForceArray, Value, Value }, 0 }},
- { ocLogest, {{ ForceArray, ForceArray, Value, Value }, 0 }},
- { ocLookup, {{ Value, ReferenceOrForceArray, ReferenceOrForceArray }, 0 }},
- { ocMIRR, {{ Reference, Value, Value }, 0 }},
- { ocMatDet, {{ ForceArray }, 0 }},
- { ocMatInv, {{ ForceArray }, 0 }},
- { ocMatMult, {{ ForceArray, ForceArray }, 0 }},
- { ocMatTrans, {{ Array }, 0 }}, // strange, but Xcl doesn't force MatTrans array
- { ocMatValue, {{ Reference, Value, Value }, 0 }},
- { ocMatch, {{ Value, ReferenceOrForceArray, Value }, 0 }},
- { ocMax, {{ Reference }, 1 }},
- { ocMaxA, {{ Reference }, 1 }},
- { ocMedian, {{ Reference }, 1 }},
- { ocMin, {{ Reference }, 1 }},
- { ocMinA, {{ Reference }, 1 }},
- { ocModalValue, {{ ForceArray }, 1 }},
- { ocModalValue_MS, {{ ForceArray }, 1 }},
- { ocModalValue_Multi,{{ ForceArray }, 1 }},
- { ocMul, {{ Array, Array }, 0 }},
- { ocMultiArea, {{ Reference }, 1 }},
- { ocNPV, {{ Value, Reference }, 1 }},
- { ocNeg, {{ Array }, 0 }},
- { ocNegSub, {{ Array }, 0 }},
- { ocNetWorkdays, {{ Value, Value, Reference, Reference }, 0 }},
- { ocNetWorkdays_MS, {{ Value, Value, Value, Reference }, 0 }},
- { ocNot, {{ Array }, 0 }},
- { ocNotEqual, {{ Array, Array }, 0 }},
- { ocOffset, {{ Reference, Value, Value, Value, Value }, 0 }},
- { ocOr, {{ Reference }, 1 }},
- { ocPearson, {{ ForceArray, ForceArray }, 0 }},
- { ocPercentile, {{ Reference, Value }, 0 }},
- { ocPercentile_Exc, {{ Reference, Value }, 0 }},
- { ocPercentile_Inc, {{ Reference, Value }, 0 }},
- { ocPercentrank, {{ Reference, Value, Value }, 0 }},
- { ocPercentrank_Exc, {{ Reference, Value, Value }, 0 }},
- { ocPercentrank_Inc, {{ Reference, Value, Value }, 0 }},
- { ocPow, {{ Array, Array }, 0 }},
- { ocPower, {{ Array, Array }, 0 }},
- { ocProb, {{ ForceArray, ForceArray, Value, Value }, 0 }},
- { ocProduct, {{ Reference }, 1 }},
- { ocQuartile, {{ Reference, Value }, 0 }},
- { ocQuartile_Exc, {{ Reference, Value }, 0 }},
- { ocQuartile_Inc, {{ Reference, Value }, 0 }},
- { ocRSQ, {{ ForceArray, ForceArray }, 0 }},
- { ocRank, {{ Value, Reference, Value }, 0 }},
- { ocRank_Avg, {{ Value, Reference, Value }, 0 }},
- { ocRank_Eq, {{ Value, Reference, Value }, 0 }},
- { ocRow, {{ Reference }, 0 }},
- { ocRows, {{ Reference }, 1 }},
- { ocSTEYX, {{ ForceArray, ForceArray }, 0 }},
- { ocSheet, {{ Reference }, 0 }},
- { ocSheets, {{ Reference }, 1 }},
- { ocSkew, {{ Reference }, 1 }},
- { ocSkewp, {{ Reference }, 1 }},
- { ocSlope, {{ ForceArray, ForceArray }, 0 }},
- { ocSmall, {{ Reference, Value }, 0 }},
- { ocStDev, {{ Reference }, 1 }},
- { ocStDevA, {{ Reference }, 1 }},
- { ocStDevP, {{ Reference }, 1 }},
- { ocStDevPA, {{ Reference }, 1 }},
- { ocStDevP_MS, {{ Reference }, 1 }},
- { ocStDevS, {{ Reference }, 1 }},
- { ocSub, {{ Array, Array }, 0 }},
- { ocSubTotal, {{ Value, Reference }, 1 }},
- { ocSum, {{ Reference }, 1 }},
- { ocSumIf, {{ Reference, Value, Reference }, 0 }},
- { ocSumIfs, {{ Reference, Reference, Value }, 2 }},
- { ocSumProduct, {{ ForceArray }, 1 }},
- { ocSumSQ, {{ Reference }, 1 }},
- { ocSumX2DY2, {{ ForceArray, ForceArray }, 0 }},
- { ocSumX2MY2, {{ ForceArray, ForceArray }, 0 }},
- { ocSumXMY2, {{ ForceArray, ForceArray }, 0 }},
- { ocTTest, {{ ForceArray, ForceArray, Value, Value }, 0 }},
- { ocTextJoin_MS, {{ Reference, Value, Reference }, 1 }},
- { ocTrend, {{ Reference, Reference, Reference, Value }, 0 }},
- { ocTrimMean, {{ Reference, Value }, 0 }},
- { ocVLookup, {{ Value, ReferenceOrForceArray, Value, Value }, 0 }},
- { ocVar, {{ Reference }, 1 }},
- { ocVarA, {{ Reference }, 1 }},
- { ocVarP, {{ Reference }, 1 }},
- { ocVarPA, {{ Reference }, 1 }},
- { ocVarP_MS, {{ Reference }, 1 }},
- { ocVarS, {{ Reference }, 1 }},
- { ocWorkday_MS, {{ Value, Value, Value, Reference }, 0 }},
- { ocXor, {{ Reference }, 1 }},
- { ocZTest, {{ Reference, Value, Value }, 0 }},
- { ocZTest_MS, {{ Reference, Value, Value }, 0 }},
+ { ocAdd, {{ Array, Array }, 0, Value }},
+ { ocAggregate, {{ Value, Value, Reference }, 1, Value }},
+ { ocAmpersand, {{ Array, Array }, 0, Value }},
+ { ocAnd, {{ Reference }, 1, Value }},
+ { ocAreas, {{ Reference }, 0, Value }},
+ { ocAveDev, {{ Reference }, 1, Value }},
+ { ocAverage, {{ Reference }, 1, Value }},
+ { ocAverageA, {{ Reference }, 1, Value }},
+ { ocAverageIf, {{ Reference, Value, Reference }, 0, Value }},
+ { ocAverageIfs, {{ Reference, Reference, Value }, 2, Value }},
+ { ocCell, {{ Value, Reference }, 0, Value }},
+ { ocColumn, {{ Reference }, 0, Value }},
+ { ocColumns, {{ Reference }, 1, Value }},
+ { ocConcat_MS, {{ Reference }, 1, Value }},
+ { ocCorrel, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocCount, {{ Reference }, 1, Value }},
+ { ocCount2, {{ Reference }, 1, Value }},
+ { ocCountEmptyCells, {{ Reference }, 0, Value }},
+ { ocCountIf, {{ Reference, Value }, 0, Value }},
+ { ocCountIfs, {{ Reference, Value }, 2, Value }},
+ { ocCovar, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocCovarianceP, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocCovarianceS, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocDBAverage, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBCount, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBCount2, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBGet, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBMax, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBMin, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBProduct, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBStdDev, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBStdDevP, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBSum, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBVar, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDBVarP, {{ Reference, Reference, Reference }, 0, Value }},
+ { ocDevSq, {{ Reference }, 1, Value }},
+ { ocDiv, {{ Array, Array }, 0, Value }},
+ { ocEqual, {{ Array, Array }, 0, Value }},
+ { ocFTest, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocForecast, {{ Value, ForceArray, ForceArray }, 0, Value }},
+ { ocForecast_ETS_ADD, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value }, 0, Value }},
+ { ocForecast_ETS_MUL, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value }, 0, Value }},
+ { ocForecast_ETS_PIA, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value, Value }, 0, Value }},
+ { ocForecast_ETS_PIM, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value, Value }, 0, Value }},
+ { ocForecast_ETS_SEA, {{ ForceArray, ForceArray, Value, Value }, 0, Value }},
+ { ocForecast_ETS_STA, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value }, 0, Value }},
+ { ocForecast_ETS_STM, {{ ForceArray, ForceArray, ForceArray, Value, Value, Value }, 0, Value }},
+ { ocFormula, {{ Reference }, 0, Value }},
+ { ocFrequency, {{ Reference, Reference }, 0, Value }},
+ { ocGCD, {{ Reference }, 1, Value }},
+ { ocGeoMean, {{ Reference }, 1, Value }},
+ { ocGreater, {{ Array, Array }, 0, Value }},
+ { ocGreaterEqual, {{ Array, Array }, 0, Value }},
+ { ocGrowth, {{ Reference, Reference, Reference, Value }, 0, Value }},
+ { ocHLookup, {{ Value, ReferenceOrForceArray, Value, Value }, 0, Value }},
+ { ocHarMean, {{ Reference }, 1, Value }},
+ { ocIRR, {{ Reference, Value }, 0, Value }},
+ { ocIndex, {{ Reference, Value, Value, Value }, 0, Value }},
+ { ocIntercept, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocIntersect, {{ Reference, Reference }, 0, Value }},
+ { ocIsRef, {{ Reference }, 0, Value }},
+ { ocKurt, {{ Reference }, 1, Value }},
+ { ocLCM, {{ Reference }, 1, Value }},
+ { ocLarge, {{ Reference, Value }, 0, Value }},
+ { ocLess, {{ Array, Array }, 0, Value }},
+ { ocLessEqual, {{ Array, Array }, 0, Value }},
+ { ocLinest, {{ ForceArray, ForceArray, Value, Value }, 0, Value }},
+ { ocLogest, {{ ForceArray, ForceArray, Value, Value }, 0, Value }},
+ { ocLookup, {{ Value, ReferenceOrForceArray, ReferenceOrForceArray }, 0, Value }},
+ { ocMIRR, {{ Reference, Value, Value }, 0, Value }},
+ { ocMatDet, {{ ForceArray }, 0, Value }},
+ { ocMatInv, {{ ForceArray }, 0, Value }},
+ { ocMatMult, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocMatTrans, {{ Array }, 0, Value }}, // strange, but Xcl doesn't force MatTrans array
+ { ocMatValue, {{ Reference, Value, Value }, 0, Value }},
+ { ocMatch, {{ Value, ReferenceOrForceArray, Value }, 0, Value }},
+ { ocMax, {{ Reference }, 1, Value }},
+ { ocMaxA, {{ Reference }, 1, Value }},
+ { ocMedian, {{ Reference }, 1, Value }},
+ { ocMin, {{ Reference }, 1, Value }},
+ { ocMinA, {{ Reference }, 1, Value }},
+ { ocModalValue, {{ ForceArray }, 1, Value }},
+ { ocModalValue_MS, {{ ForceArray }, 1, Value }},
+ { ocModalValue_Multi,{{ ForceArray }, 1, Value }},
+ { ocMul, {{ Array, Array }, 0, Value }},
+ { ocMultiArea, {{ Reference }, 1, Value }},
+ { ocNPV, {{ Value, Reference }, 1, Value }},
+ { ocNeg, {{ Array }, 0, Value }},
+ { ocNegSub, {{ Array }, 0, Value }},
+ { ocNetWorkdays, {{ Value, Value, Reference, Reference }, 0, Value }},
+ { ocNetWorkdays_MS, {{ Value, Value, Value, Reference }, 0, Value }},
+ { ocNot, {{ Array }, 0, Value }},
+ { ocNotEqual, {{ Array, Array }, 0, Value }},
+ { ocOffset, {{ Reference, Value, Value, Value, Value }, 0, Value }},
+ { ocOr, {{ Reference }, 1, Value }},
+ { ocPearson, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocPercentile, {{ Reference, Value }, 0, Value }},
+ { ocPercentile_Exc, {{ Reference, Value }, 0, Value }},
+ { ocPercentile_Inc, {{ Reference, Value }, 0, Value }},
+ { ocPercentrank, {{ Reference, Value, Value }, 0, Value }},
+ { ocPercentrank_Exc, {{ Reference, Value, Value }, 0, Value }},
+ { ocPercentrank_Inc, {{ Reference, Value, Value }, 0, Value }},
+ { ocPow, {{ Array, Array }, 0, Value }},
+ { ocPower, {{ Array, Array }, 0, Value }},
+ { ocProb, {{ ForceArray, ForceArray, Value, Value }, 0, Value }},
+ { ocProduct, {{ Reference }, 1, Value }},
+ { ocQuartile, {{ Reference, Value }, 0, Value }},
+ { ocQuartile_Exc, {{ Reference, Value }, 0, Value }},
+ { ocQuartile_Inc, {{ Reference, Value }, 0, Value }},
+ { ocRSQ, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocRank, {{ Value, Reference, Value }, 0, Value }},
+ { ocRank_Avg, {{ Value, Reference, Value }, 0, Value }},
+ { ocRank_Eq, {{ Value, Reference, Value }, 0, Value }},
+ { ocRow, {{ Reference }, 0, Value }},
+ { ocRows, {{ Reference }, 1, Value }},
+ { ocSTEYX, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocSheet, {{ Reference }, 0, Value }},
+ { ocSheets, {{ Reference }, 1, Value }},
+ { ocSkew, {{ Reference }, 1, Value }},
+ { ocSkewp, {{ Reference }, 1, Value }},
+ { ocSlope, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocSmall, {{ Reference, Value }, 0, Value }},
+ { ocStDev, {{ Reference }, 1, Value }},
+ { ocStDevA, {{ Reference }, 1, Value }},
+ { ocStDevP, {{ Reference }, 1, Value }},
+ { ocStDevPA, {{ Reference }, 1, Value }},
+ { ocStDevP_MS, {{ Reference }, 1, Value }},
+ { ocStDevS, {{ Reference }, 1, Value }},
+ { ocSub, {{ Array, Array }, 0, Value }},
+ { ocSubTotal, {{ Value, Reference }, 1, Value }},
+ { ocSum, {{ Reference }, 1, Value }},
+ { ocSumIf, {{ Reference, Value, Reference }, 0, Value }},
+ { ocSumIfs, {{ Reference, Reference, Value }, 2, Value }},
+ { ocSumProduct, {{ ForceArray }, 1, Value }},
+ { ocSumSQ, {{ Reference }, 1, Value }},
+ { ocSumX2DY2, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocSumX2MY2, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocSumXMY2, {{ ForceArray, ForceArray }, 0, Value }},
+ { ocTTest, {{ ForceArray, ForceArray, Value, Value }, 0, Value }},
+ { ocTextJoin_MS, {{ Reference, Value, Reference }, 1, Value }},
+ { ocTrend, {{ Reference, Reference, Reference, Value }, 0, Value }},
+ { ocTrimMean, {{ Reference, Value }, 0, Value }},
+ { ocVLookup, {{ Value, ReferenceOrForceArray, Value, Value }, 0, Value }},
+ { ocVar, {{ Reference }, 1, Value }},
+ { ocVarA, {{ Reference }, 1, Value }},
+ { ocVarP, {{ Reference }, 1, Value }},
+ { ocVarPA, {{ Reference }, 1, Value }},
+ { ocVarP_MS, {{ Reference }, 1, Value }},
+ { ocVarS, {{ Reference }, 1, Value }},
+ { ocWorkday_MS, {{ Value, Value, Value, Reference }, 0, Value }},
+ { ocXor, {{ Reference }, 1, Value }},
+ { ocZTest, {{ Reference, Value, Value }, 0, Value }},
+ { ocZTest_MS, {{ Reference, Value, Value }, 0, Value }},
// Excel doubts:
// ocN, ocT: Excel says (and handles) Reference, error? This means no
// position dependent SingleRef if DoubleRef, and no array calculation,
@@ -230,10 +230,10 @@ const ScParameterClassification::RawData ScParameterClassification::pRawData[] =
// for ocN (position dependent intersection worked before but array
// didn't). No specifics in ODFF, so the general rule applies. Gnumeric
// does the same.
- { ocN, {{ Value }, 0 }},
- { ocT, {{ Value }, 0 }},
+ { ocN, {{ Value }, 0, Value }},
+ { ocT, {{ Value }, 0, Value }},
// The stopper.
- { ocNone, {{ Bounds }, 0 } }
+ { ocNone, {{ Bounds }, 0, Value }}
};
ScParameterClassification::RunData * ScParameterClassification::pData = nullptr;
More information about the Libreoffice-commits
mailing list