diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-12 16:58:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-13 15:18:19 +0200 |
commit | ef1a78ed4d2a083310277e188a02cb1b5323a089 (patch) | |
tree | 244293b1d5eefd1db7b1447589e4494e041e977b | |
parent | 2b126a0044d56ca771d3c3930491c73ee1478b37 (diff) |
GetMultipleOpRefs never passed a null ScDocument*
Change-Id: Ib31f77d8cf669881df5cc23bdd91278531c1f8ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102531
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/filter/excel/xetable.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xlformula.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/inc/xlformula.hxx | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 1b96f91ac788..fd8ec5a28d9f 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -459,7 +459,7 @@ XclExpTableopRef XclExpTableopBuffer::CreateOrExtendTableop( // try to extract cell references of a multiple operations formula XclMultipleOpRefs aRefs; - if (XclTokenArrayHelper::GetMultipleOpRefs(&GetDoc(), aRefs, rScTokArr, rScPos)) + if (XclTokenArrayHelper::GetMultipleOpRefs(GetDoc(), aRefs, rScTokArr, rScPos)) { // try to find an existing TABLEOP record for this cell position for( size_t nPos = 0, nSize = maTableopList.GetSize(); !xRec && (nPos < nSize); ++nPos ) diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index 01f1dc2ad724..adafca569352 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -940,7 +940,7 @@ bool lclGetAddress( const ScDocument* pDoc, ScAddress& rAddress, const FormulaTo } // namespace bool XclTokenArrayHelper::GetMultipleOpRefs( - const ScDocument* pDoc, + const ScDocument& rDoc, XclMultipleOpRefs& rRefs, const ScTokenArray& rScTokArr, const ScAddress& rScPos ) { rRefs.mbDblRefMode = false; @@ -963,32 +963,32 @@ bool XclTokenArrayHelper::GetMultipleOpRefs( eState = (eOpCode == ocOpen) ? stOpen : stError; break; case stOpen: - eState = lclGetAddress(pDoc, rRefs.maFmlaScPos, *aIt, rScPos) ? stFormula : stError; + eState = lclGetAddress(&rDoc, rRefs.maFmlaScPos, *aIt, rScPos) ? stFormula : stError; break; case stFormula: eState = bIsSep ? stFormulaSep : stError; break; case stFormulaSep: - eState = lclGetAddress(pDoc, rRefs.maColFirstScPos, *aIt, rScPos) ? stColFirst : stError; + eState = lclGetAddress(&rDoc, rRefs.maColFirstScPos, *aIt, rScPos) ? stColFirst : stError; break; case stColFirst: eState = bIsSep ? stColFirstSep : stError; break; case stColFirstSep: - eState = lclGetAddress(pDoc, rRefs.maColRelScPos, *aIt, rScPos) ? stColRel : stError; + eState = lclGetAddress(&rDoc, rRefs.maColRelScPos, *aIt, rScPos) ? stColRel : stError; break; case stColRel: eState = bIsSep ? stColRelSep : ((eOpCode == ocClose) ? stClose : stError); break; case stColRelSep: - eState = lclGetAddress(pDoc, rRefs.maRowFirstScPos, *aIt, rScPos) ? stRowFirst : stError; + eState = lclGetAddress(&rDoc, rRefs.maRowFirstScPos, *aIt, rScPos) ? stRowFirst : stError; rRefs.mbDblRefMode = true; break; case stRowFirst: eState = bIsSep ? stRowFirstSep : stError; break; case stRowFirstSep: - eState = lclGetAddress(pDoc, rRefs.maRowRelScPos, *aIt, rScPos) ? stRowRel : stError; + eState = lclGetAddress(&rDoc, rRefs.maRowRelScPos, *aIt, rScPos) ? stRowRel : stError; break; case stRowRel: eState = (eOpCode == ocClose) ? stClose : stError; diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx index 7dd31686a06b..d46f1200358f 100644 --- a/sc/source/filter/inc/xlformula.hxx +++ b/sc/source/filter/inc/xlformula.hxx @@ -532,7 +532,7 @@ public: @descr Requires that the formula contains a single MULTIPLE.OPERATION function call. Spaces in the formula are silently ignored. @return true = Multiple operation found, and all references successfully extracted. */ - static bool GetMultipleOpRefs( const ScDocument* pDoc, XclMultipleOpRefs& rRefs, const ScTokenArray& rScTokArr, const ScAddress& rScPos ); + static bool GetMultipleOpRefs( const ScDocument& rDoc, XclMultipleOpRefs& rRefs, const ScTokenArray& rScTokArr, const ScAddress& rScPos ); }; inline sal_uInt8 XclTokenArrayHelper::GetTokenId( sal_uInt8 nBaseId, sal_uInt8 nTokenClass ) |