diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-14 12:26:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-15 14:12:36 +0200 |
commit | c678eba2f06ce7f16939879eedb918f303a4e1b1 (patch) | |
tree | 3fdc7d01281ec3aea9c4c5811cd9bb7de195ba5d | |
parent | 4e5407429ff3c25ab699b3673ef4ebdeaaceef75 (diff) |
ScRangeUtil::IsAbsPos ScDocument* arg dereferenced on all branches
Change-Id: Ie42e6eb280886c237b7042948298eef0bd38eebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102720
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/inc/rangeutl.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/rangeutl.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/dbgui/consdlg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpusrlst.cxx | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index 601fdee3803f..e0d0f65c2b88 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -65,7 +65,7 @@ public: ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); static bool IsAbsPos ( const OUString& rPosStr, - const ScDocument* pDoc, + const ScDocument& rDoc, SCTAB nTab, OUString* pCompleteStr, ScRefAddress* pPosTripel = nullptr, diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 2e5c09ac2b2f..24f62c9c5de5 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -208,7 +208,7 @@ bool ScRangeUtil::IsAbsArea( const OUString& rAreaStr, } bool ScRangeUtil::IsAbsPos( const OUString& rPosStr, - const ScDocument* pDoc, + const ScDocument& rDoc, SCTAB nTab, OUString* pCompleteStr, ScRefAddress* pPosTripel, @@ -216,7 +216,7 @@ bool ScRangeUtil::IsAbsPos( const OUString& rPosStr, { ScRefAddress thePos; - bool bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails ); + bool bIsAbsPos = ConvertSingleRef( &rDoc, rPosStr, nTab, thePos, rDetails ); thePos.SetRelCol( false ); thePos.SetRelRow( false ); thePos.SetRelTab( false ); @@ -226,7 +226,7 @@ bool ScRangeUtil::IsAbsPos( const OUString& rPosStr, if ( pPosTripel ) *pPosTripel = thePos; if ( pCompleteStr ) - *pCompleteStr = thePos.GetRefString( pDoc, MAXTAB+1, rDetails ); + *pCompleteStr = thePos.GetRefString( &rDoc, MAXTAB+1, rDetails ); } return bIsAbsPos; @@ -294,7 +294,7 @@ bool ScRangeUtil::MakeRangeFromName ( { CutPosString( aStrArea, aStrArea ); - if ( IsAbsPos( aStrArea, &rDoc, nTable, + if ( IsAbsPos( aStrArea, rDoc, nTable, nullptr, &aStartPos, rDetails ) ) { nTab = aStartPos.Tab(); diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 18a571a3077d..db9f53681a18 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -303,7 +303,7 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) OUString aPosStr; ScRangeUtil::CutPosString( pEd->GetText(), aPosStr ); - bEditOk = ScRangeUtil::IsAbsPos( aPosStr, pDoc, + bEditOk = ScRangeUtil::IsAbsPos( aPosStr, *pDoc, nTab, &theCompleteStr, nullptr, eConv ); } @@ -339,7 +339,7 @@ IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl, weld::Button&, void) OUString aDestPosStr( m_xEdDestArea->GetText() ); const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); - if ( ScRangeUtil::IsAbsPos( aDestPosStr, pDoc, nTab, nullptr, &aDestAddress, eConv ) ) + if ( ScRangeUtil::IsAbsPos( aDestPosStr, *pDoc, nTab, nullptr, &aDestAddress, eConv ) ) { ScConsolidateParam theOutParam( theConsData ); std::unique_ptr<ScArea[]> pDataAreas(new ScArea[nDataAreaCount]); diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 9dbb50e52bdb..e0e4ed90e3c2 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -654,7 +654,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, weld::Button&, rBtn, void ) if ( !bAreaOk ) { bAreaOk = ScRangeUtil::IsAbsPos( theAreaStr, - pDoc, + *pDoc, pViewData->GetTabNo(), &theAreaStr, &theStartPos, |