summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-06-17 19:55:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-18 08:23:06 +0200
commit20b8c7f38ae1c03dc0405a2da006ab6b2dbf3627 (patch)
treedbdef33c3fe95d50f969690d7755ae2b0a02567e /sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
parentca47989ad60b1414f92be22a1fbf4c1d1a92dd97 (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/filter/xml/XMLChangeTrackingImportHelper.cxx')
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 13d5a4906375..26e4acbf80ce 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -60,7 +60,7 @@ const ScCellValue& ScMyCellInfo::CreateCell(ScDocument& rDoc)
sal_Int32 nOffset(0);
ScRangeStringConverter::GetAddressFromString(aPos, sFormulaAddress, rDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset);
maCell.set(new ScFormulaCell(rDoc, aPos, sFormula, eGrammar, nMatrixFlag));
- maCell.mpFormula->SetMatColsRows(static_cast<SCCOL>(nMatrixCols), static_cast<SCROW>(nMatrixRows));
+ maCell.getFormula()->SetMatColsRows(static_cast<SCCOL>(nMatrixCols), static_cast<SCROW>(nMatrixRows));
}
if ((nType == css::util::NumberFormat::DATE || nType == css::util::NumberFormat::TIME) && sInputString.isEmpty())
@@ -671,12 +671,12 @@ void ScXMLChangeTrackingImportHelper::SetNewCell(const ScMyContentAction* pActio
}
else
{
- ScMatrixMode nMatrixFlag = aCell.mpFormula->GetMatrixFlag();
+ ScMatrixMode nMatrixFlag = aCell.getFormula()->GetMatrixFlag();
// With GRAM_ODFF reference detection is faster on compilation.
/* FIXME: new cell should be created with a clone
* of the token array instead. Any reason why this
* wasn't done? */
- OUString sFormula = aCell.mpFormula->GetFormula(formula::FormulaGrammar::GRAM_ODFF);
+ OUString sFormula = aCell.getFormula()->GetFormula(formula::FormulaGrammar::GRAM_ODFF);
// #i87826# [Collaboration] Rejected move destroys formulas
// FIXME: adjust ScFormulaCell::GetFormula(), so that the right formula string
@@ -696,10 +696,10 @@ void ScXMLChangeTrackingImportHelper::SetNewCell(const ScMyContentAction* pActio
{
SCCOL nCols;
SCROW nRows;
- aCell.mpFormula->GetMatColsRows(nCols, nRows);
- aNewCell.mpFormula->SetMatColsRows(nCols, nRows);
+ aCell.getFormula()->GetMatColsRows(nCols, nRows);
+ aNewCell.getFormula()->SetMatColsRows(nCols, nRows);
}
- aNewCell.mpFormula->SetInChangeTrack(true);
+ aNewCell.getFormula()->SetInChangeTrack(true);
pChangeActionContent->SetNewCell(aNewCell, &rDoc, OUString());
// #i40704# don't overwrite the formula string via SetNewValue()
}