sc/source/core/data/formulacell.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit c8630211eb9fda51d353c100c4f081e76617212e Author: Caolán McNamara <[email protected]> AuthorDate: Sun Sep 13 20:23:20 2020 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Sep 14 10:02:00 2020 +0200 lcl_fillRangeFromRefList always dereferences its ScDocument* arg Change-Id: I73b985ba49ac2f43b4760fa8426232d4eb088345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102617 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 010b4b4a8de2..320c53a223a6 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -364,15 +364,15 @@ lcl_checkIfAdjacent( void lcl_fillRangeFromRefList( - const ScDocument* pDoc, + const ScDocument& rDoc, const ScAddress& aPos, const std::vector<formula::FormulaToken*>& rReferences, ScRange& rRange) { const ScSingleRefData aStart( SingleDoubleRefProvider(*rReferences.front()).Ref1); - rRange.aStart = aStart.toAbs(*pDoc, aPos); + rRange.aStart = aStart.toAbs(rDoc, aPos); const ScSingleRefData aEnd( SingleDoubleRefProvider(*rReferences.back()).Ref2); - rRange.aEnd = aEnd.toAbs(*pDoc, aPos); + rRange.aEnd = aEnd.toAbs(rDoc, aPos); } bool @@ -383,7 +383,7 @@ lcl_refListFormsOneRange( { if (rReferences.size() == 1) { - lcl_fillRangeFromRefList(pDoc, rPos, rReferences, rRange); + lcl_fillRangeFromRefList(*pDoc, rPos, rReferences, rRange); return true; } @@ -415,7 +415,7 @@ lcl_refListFormsOneRange( std::sort(rReferences.begin(), rReferences.end(), LessByReference(pDoc, rPos, aWhich)); if (lcl_checkIfAdjacent(pDoc, rPos, rReferences, aWhich)) { - lcl_fillRangeFromRefList(pDoc, rPos, rReferences, rRange); + lcl_fillRangeFromRefList(*pDoc, rPos, rReferences, rRange); return true; } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
