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/ui/unoobj/cellsuno.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/ui/unoobj/cellsuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 1d30e76aa6ee..da10552151ea 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1332,7 +1332,7 @@ static OUString lcl_GetInputString( ScDocument& rDoc, const ScAddress& rPos, boo CellType eType = aCell.getType(); if (eType == CELLTYPE_FORMULA) { - ScFormulaCell* pForm = aCell.mpFormula; + ScFormulaCell* pForm = aCell.getFormula(); return pForm->GetFormula( formula::FormulaGrammar::mapAPItoGrammar( bEnglish, false)); } @@ -4802,8 +4802,8 @@ OUString SAL_CALL ScCellRangeObj::getArrayFormula() ScRefCellValue aCell2(rDoc, aRange.aEnd); if (aCell1.getType() == CELLTYPE_FORMULA && aCell2.getType() == CELLTYPE_FORMULA) { - const ScFormulaCell* pFCell1 = aCell1.mpFormula; - const ScFormulaCell* pFCell2 = aCell2.mpFormula; + const ScFormulaCell* pFCell1 = aCell1.getFormula(); + const ScFormulaCell* pFCell2 = aCell2.getFormula(); ScAddress aStart1; ScAddress aStart2; if (pFCell1->GetMatrixOrigin(rDoc, aStart1) && pFCell2->GetMatrixOrigin(rDoc, aStart2)) @@ -4866,8 +4866,8 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScCellRangeObj::getArrayTokens() ScRefCellValue aCell2(rDoc, aRange.aEnd); if (aCell1.getType() == CELLTYPE_FORMULA && aCell2.getType() == CELLTYPE_FORMULA) { - const ScFormulaCell* pFCell1 = aCell1.mpFormula; - const ScFormulaCell* pFCell2 = aCell2.mpFormula; + const ScFormulaCell* pFCell1 = aCell1.getFormula(); + const ScFormulaCell* pFCell2 = aCell2.getFormula(); ScAddress aStart1; ScAddress aStart2; if (pFCell1->GetMatrixOrigin(rDoc, aStart1) && pFCell2->GetMatrixOrigin(rDoc, aStart2)) @@ -6161,7 +6161,7 @@ void SAL_CALL ScCellObj::setFormulaResult( double nValue ) ScRefCellValue aCell(pDocSh->GetDocument(), aCellPos); if (aCell.getType() == CELLTYPE_FORMULA) { - ScFormulaCell* pCell = aCell.mpFormula; + ScFormulaCell* pCell = aCell.getFormula(); pCell->SetHybridDouble( nValue ); pCell->ResetDirty(); pCell->SetChanged(false); @@ -6245,7 +6245,7 @@ table::CellContentType ScCellObj::GetContentType_Impl() ScRefCellValue aCell(pDocSh->GetDocument(), aCellPos); if (aCell.getType() == CELLTYPE_FORMULA) { - bool bValue = aCell.mpFormula->IsValue(); + bool bValue = aCell.getFormula()->IsValue(); return bValue ? table::CellContentType_VALUE : table::CellContentType_TEXT; } } @@ -6265,7 +6265,7 @@ sal_Int32 SAL_CALL ScCellObj::getError() FormulaError nError = FormulaError::NONE; ScRefCellValue aCell(pDocSh->GetDocument(), aCellPos); if (aCell.getType() == CELLTYPE_FORMULA) - nError = aCell.mpFormula->GetErrCode(); + nError = aCell.getFormula()->GetErrCode(); return static_cast<sal_Int32>(nError); } @@ -6284,7 +6284,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScCellObj::getTokens() ScRefCellValue aCell(rDoc, aCellPos); if (aCell.getType() == CELLTYPE_FORMULA) { - ScTokenArray* pTokenArray = aCell.mpFormula->GetCode(); + ScTokenArray* pTokenArray = aCell.getFormula()->GetCode(); if (pTokenArray) ScTokenConversion::ConvertToTokenSequence(rDoc, aSequence, *pTokenArray); } |