diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-16 12:06:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-18 19:57:50 +0200 |
commit | 4baec6159199a1b0305bdc28df1579d6e7602a95 (patch) | |
tree | 9a1590358bbcddfb68ab4463bf3c8a33156c92d9 /sc/source/core/tool/interpr1.cxx | |
parent | 08e85556d2ae66bdf43d908e1b9dfca4c78295e2 (diff) |
ScCellValue::getString never called with a null ScDocument*
Change-Id: Idff982e715b012e35e0abd0b904f4b83d7f6f51a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103007
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core/tool/interpr1.cxx')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 5616cc35bb6f..5a1521524a36 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -5053,7 +5053,7 @@ void ScInterpreter::ScMatch() rParam.bByRow = false; rParam.nRow2 = nRow1; rEntry.nField = nCol1; - ScQueryCellIterator aCellIter(&mrDoc, mrContext, nTab1, rParam, false); + ScQueryCellIterator aCellIter(mrDoc, mrContext, nTab1, rParam, false); // Advance Entry.nField in Iterator if column changed aCellIter.SetAdvanceQueryParamEntryField( true ); if (fTyp == 0.0) @@ -5551,7 +5551,7 @@ void ScInterpreter::IterateParametersIf( ScIterFuncIf eFunc ) } else { - ScQueryCellIterator aCellIter(&mrDoc, mrContext, nTab1, rParam, false); + ScQueryCellIterator aCellIter(mrDoc, mrContext, nTab1, rParam, false); // Increment Entry.nField in iterator when switching to next column. aCellIter.SetAdvanceQueryParamEntryField( true ); if ( aCellIter.GetFirst() ) @@ -6170,7 +6170,7 @@ void ScInterpreter::IterateParametersIfs( double(*ResultFunc)( const sc::ParamIf } else { - ScQueryCellIterator aCellIter(&mrDoc, mrContext, nTab1, rParam, false); + ScQueryCellIterator aCellIter(mrDoc, mrContext, nTab1, rParam, false); // Increment Entry.nField in iterator when switching to next column. aCellIter.SetAdvanceQueryParamEntryField( true ); if ( aCellIter.GetFirst() ) @@ -7081,7 +7081,7 @@ void ScInterpreter::ScLookup() if (rItem.meType == ScQueryEntry::ByString) aParam.eSearchType = DetectSearchType(rItem.maString.getString(), mrDoc); - ScQueryCellIterator aCellIter(&mrDoc, mrContext, nTab1, aParam, false); + ScQueryCellIterator aCellIter(mrDoc, mrContext, nTab1, aParam, false); SCCOL nC; SCROW nR; // Advance Entry.nField in iterator upon switching columns if @@ -7428,7 +7428,7 @@ void ScInterpreter::CalculateLookup(bool bHLookup) rEntry.eOp = SC_LESS_EQUAL; if ( bHLookup ) { - ScQueryCellIterator aCellIter(&mrDoc, mrContext, nTab1, aParam, false); + ScQueryCellIterator aCellIter(mrDoc, mrContext, nTab1, aParam, false); // advance Entry.nField in Iterator upon switching columns aCellIter.SetAdvanceQueryParamEntryField( true ); if ( bSorted ) @@ -7908,7 +7908,7 @@ void ScInterpreter::ScDBCount() // so the source range has to be restricted, like before the introduction // of ScDBQueryParamBase. p->nCol1 = p->nCol2 = p->mnField; - ScQueryCellIterator aCellIter( &mrDoc, mrContext, nTab, *p, true); + ScQueryCellIterator aCellIter(mrDoc, mrContext, nTab, *p, true); if ( aCellIter.GetFirst() ) { do @@ -9926,11 +9926,11 @@ utl::SearchParam::SearchType ScInterpreter::DetectSearchType( const OUString& rS return utl::SearchParam::SearchType::Normal; } -static bool lcl_LookupQuery( ScAddress & o_rResultPos, ScDocument * pDoc, const ScInterpreterContext& rContext, +static bool lcl_LookupQuery( ScAddress & o_rResultPos, ScDocument& rDoc, const ScInterpreterContext& rContext, const ScQueryParam & rParam, const ScQueryEntry & rEntry ) { bool bFound = false; - ScQueryCellIterator aCellIter( pDoc, rContext, rParam.nTab, rParam, false); + ScQueryCellIterator aCellIter( rDoc, rContext, rParam.nTab, rParam, false); if (rEntry.eOp != SC_EQUAL) { // range lookup <= or >= @@ -10005,7 +10005,7 @@ bool ScInterpreter::LookupQueryWithCache( ScAddress & o_rResultPos, * direct lookups here. We could even further attribute volatility per * parameter so it would affect only the lookup range parameter. */ if (!bColumnsMatch || GetVolatileType() != NOT_VOLATILE) - bFound = lcl_LookupQuery( o_rResultPos, &mrDoc, mrContext, rParam, rEntry); + bFound = lcl_LookupQuery( o_rResultPos, mrDoc, mrContext, rParam, rEntry); else { ScRange aLookupRange( rParam.nCol1, rParam.nRow1, rParam.nTab, @@ -10036,7 +10036,7 @@ bool ScInterpreter::LookupQueryWithCache( ScAddress & o_rResultPos, { case ScLookupCache::NOT_CACHED : case ScLookupCache::CRITERIA_DIFFERENT : - bFound = lcl_LookupQuery( o_rResultPos, &mrDoc, mrContext, rParam, rEntry); + bFound = lcl_LookupQuery( o_rResultPos, mrDoc, mrContext, rParam, rEntry); if (eCacheResult == ScLookupCache::NOT_CACHED) rCache.insert( o_rResultPos, aCriteria, aPos, bFound); break; |