sc/source/ui/docshell/externalrefmgr.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 2a6a86822f5173b820632bea173bc58e703d43d3 Author: Caolán McNamara <[email protected]> AuthorDate: Sun Sep 13 20:05:39 2020 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Sep 14 09:58:52 2020 +0200 lcl_fillEmptyMatrix always dereferences it ScDocument* arg Change-Id: Ib3835f37c510d3d9767ed866781eeafa88d0887f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102611 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index d8379af23164..6ff7da739871 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1611,14 +1611,14 @@ static std::unique_ptr<ScTokenArray> convertToTokenArray( return pArray; } -static std::unique_ptr<ScTokenArray> lcl_fillEmptyMatrix(const ScDocument* pDoc, const ScRange& rRange) +static std::unique_ptr<ScTokenArray> lcl_fillEmptyMatrix(const ScDocument& rDoc, const ScRange& rRange) { SCSIZE nC = static_cast<SCSIZE>(rRange.aEnd.Col()-rRange.aStart.Col()+1); SCSIZE nR = static_cast<SCSIZE>(rRange.aEnd.Row()-rRange.aStart.Row()+1); ScMatrixRef xMat = new ScMatrix(nC, nR); ScMatrixToken aToken(xMat); - unique_ptr<ScTokenArray> pArray(new ScTokenArray(*pDoc)); + unique_ptr<ScTokenArray> pArray(new ScTokenArray(rDoc)); pArray->AddToken(aToken); return pArray; } @@ -1801,7 +1801,7 @@ void putRangeDataIntoCache( else { // Array is empty. Fill it with an empty matrix of the required size. - pArray = lcl_fillEmptyMatrix(rRefCache.getFakeDoc(), rCacheRange); + pArray = lcl_fillEmptyMatrix(*rRefCache.getFakeDoc(), rCacheRange); // Make sure to set this range 'cached', to prevent unnecessarily // accessing the src document time and time again. _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
