diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-06-17 19:55:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-18 08:23:06 +0200 |
commit | 20b8c7f38ae1c03dc0405a2da006ab6b2dbf3627 (patch) | |
tree | dbdef33c3fe95d50f969690d7755ae2b0a02567e /sc/source/core/tool/interpr5.cxx | |
parent | ca47989ad60b1414f92be22a1fbf4c1d1a92dd97 (diff) |
create getter for ScCellValue::mpFormula
so we can assert that it has the correct tag type
Change-Id: Iab13a6d6ea1783c69395f06f28732769e5fe8b18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136059
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/tool/interpr5.cxx')
-rw-r--r-- | sc/source/core/tool/interpr5.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index f3905eedc665..c8bd1c31a5b8 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -427,7 +427,7 @@ ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef( const FormulaToken* pToken } else if (aCell.hasError()) { - pMat->PutError( aCell.mpFormula->GetErrCode(), nMatCol, nMatRow); + pMat->PutError( aCell.getFormula()->GetErrCode(), nMatCol, nMatRow); } else if (aCell.hasNumeric()) { @@ -650,12 +650,12 @@ void ScInterpreter::ScMatValue() ScRefCellValue aCell(mrDoc, aAdr); if (aCell.getType() == CELLTYPE_FORMULA) { - FormulaError nErrCode = aCell.mpFormula->GetErrCode(); + FormulaError nErrCode = aCell.getFormula()->GetErrCode(); if (nErrCode != FormulaError::NONE) PushError( nErrCode); else { - const ScMatrix* pMat = aCell.mpFormula->GetMatrix(); + const ScMatrix* pMat = aCell.getFormula()->GetMatrix(); CalculateMatrixValue(pMat,nC,nR); } } @@ -3223,7 +3223,7 @@ void ScInterpreter::ScMatRef() return; } - if (aCell.mpFormula->IsRunning()) + if (aCell.getFormula()->IsRunning()) { // Twisted odd corner case where an array element's cell tries to // access the top left matrix while it is still running, see tdf#88737 @@ -3233,7 +3233,7 @@ void ScInterpreter::ScMatRef() return; } - const ScMatrix* pMat = aCell.mpFormula->GetMatrix(); + const ScMatrix* pMat = aCell.getFormula()->GetMatrix(); if (pMat) { SCSIZE nCols, nRows; @@ -3298,14 +3298,14 @@ void ScInterpreter::ScMatRef() nFuncFmtType = nCurFmtType; nFuncFmtIndex = nCurFmtIndex; // If not a result matrix, obtain the cell value. - FormulaError nErr = aCell.mpFormula->GetErrCode(); + FormulaError nErr = aCell.getFormula()->GetErrCode(); if (nErr != FormulaError::NONE) PushError( nErr ); - else if (aCell.mpFormula->IsValue()) - PushDouble(aCell.mpFormula->GetValue()); + else if (aCell.getFormula()->IsValue()) + PushDouble(aCell.getFormula()->GetValue()); else { - svl::SharedString aVal = aCell.mpFormula->GetString(); + svl::SharedString aVal = aCell.getFormula()->GetString(); PushString( aVal ); } } |