diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-14 12:20:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-14 16:44:57 +0100 |
commit | 914f9ee7bf7254f2f469bde4cf4c151a4ab25110 (patch) | |
tree | 64c11be2675279addc202bc7abda582a833587c0 /sc/source/ui/miscdlgs/optsolver.cxx | |
parent | 285538be45d03e524a404d072a9b0178c74baeaf (diff) |
SetReference ScDocument arg is never null
Change-Id: Ifdfe305e5319926d804e14962e786389b79fe476
Reviewed-on: https://gerrit.libreoffice.org/82682
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/miscdlgs/optsolver.cxx')
-rw-r--r-- | sc/source/ui/miscdlgs/optsolver.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 4ce5b8b6ba07..2087e6fec152 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -445,7 +445,7 @@ void ScOptSolverDlg::SetActive() RefInputDone(); } -void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) +void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument& rDocP ) { if( mpEdActive ) { @@ -462,15 +462,15 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) aNewRef.aEnd = aAdr; OUString aName; - if ( pDocP->GetRangeAtBlock( aNewRef, &aName ) ) // named range: show name + if ( rDocP.GetRangeAtBlock( aNewRef, &aName ) ) // named range: show name aStr = aName; else // format cell/range reference { ScRefFlags nFmt = ( aAdr.Tab() == mnCurTab ) ? ScRefFlags::ADDR_ABS : ScRefFlags::ADDR_ABS_3D; if ( bSingle ) - aStr = aAdr.Format(nFmt, pDocP, pDocP->GetAddressConvention()); + aStr = aAdr.Format(nFmt, &rDocP, rDocP.GetAddressConvention()); else - aStr = rRef.Format(nFmt | ScRefFlags::RANGE_ABS, pDocP, pDocP->GetAddressConvention()); + aStr = rRef.Format(nFmt | ScRefFlags::RANGE_ABS, &rDocP, rDocP.GetAddressConvention()); } // variable cells can be several ranges, so only the selection is replaced |