Kaydet (Commit) 0d9f755f authored tarafından Eike Rathke's avatar Eike Rathke

Introduce and use ScInterpreter::IsInArrayContext(), tdf#91502 follow-up

Change-Id: I4c6299e9b6890eb22f50586ceb5788057527e88c
Reviewed-on: https://gerrit.libreoffice.org/58124Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: Jenkins
üst 2008a520
......@@ -391,6 +391,10 @@ private:
void ConvertMatrixJumpConditionToMatrix();
// If MatrixFormula or ForceArray: ConvertMatrixParameters()
inline bool MatrixParameterConversion();
// If MatrixFormula or ForceArray. Can be used within spreadsheet functions
// that do not depend on the formula cell's matrix size, for which only
// bMatrixFormula can be used.
inline bool IsInArrayContext() const;
ScMatrixRef PopMatrix();
sc::RangeMatrix PopRangeMatrix();
void QueryMatrixType(const ScMatrixRef& xMat, SvNumFormatType& rRetTypeExpr, sal_uInt32& rRetIndexExpr);
......@@ -1013,6 +1017,11 @@ public:
sal_uLong GetRetFormatIndex() const { return nRetFmtIndex; }
};
inline bool ScInterpreter::IsInArrayContext() const
{
return bMatrixFormula || pCur->IsInForceArray();
}
inline void ScInterpreter::MatrixJumpConditionToMatrix()
{
if (bMatrixFormula || pCur->IsInForceArray())
......
......@@ -2691,7 +2691,7 @@ void ScInterpreter::ScIsFormula()
switch ( GetStackType() )
{
case svDoubleRef :
if (bMatrixFormula || pCur->IsInForceArray())
if (IsInArrayContext())
{
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
......@@ -2759,7 +2759,7 @@ void ScInterpreter::ScFormula()
switch ( GetStackType() )
{
case svDoubleRef :
if (bMatrixFormula || pCur->IsInForceArray())
if (IsInArrayContext())
{
SCCOL nCol1, nCol2;
SCROW nRow1, nRow2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment