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/dbgui | |
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/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutDialog.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/consdlg.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/dbgui/dbnamdlg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/filtdlg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/sfiltdlg.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/dbgui/validate.cxx | 4 |
6 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index d9b89a5fadf2..e86ad9970685 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -331,7 +331,7 @@ void ScPivotLayoutDialog::SetActive() RefInputDone(); } -void ScPivotLayoutDialog::SetReference(const ScRange& rReferenceRange, ScDocument* pDocument) +void ScPivotLayoutDialog::SetReference(const ScRange& rReferenceRange, ScDocument& rDocument) { if (!mbDialogLostFocus) return; @@ -342,7 +342,7 @@ void ScPivotLayoutDialog::SetReference(const ScRange& rReferenceRange, ScDocumen if (rReferenceRange.aStart != rReferenceRange.aEnd) RefInputStart(mpActiveEdit); - OUString aReferenceString = rReferenceRange.Format(ScRefFlags::RANGE_ABS_3D, pDocument, maAddressDetails); + OUString aReferenceString = rReferenceRange.Format(ScRefFlags::RANGE_ABS_3D, &rDocument, maAddressDetails); if (mpActiveEdit == mxSourceEdit.get()) { diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 3378a92f8bb8..a7cf9b1d6589 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -229,7 +229,7 @@ void ScConsolidateDlg::FillAreaLists() // Handover of a range within a table that has been selected by the mouse. // This range is then shown in the reference window as new selection. -void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) +void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument& rDocP ) { if ( m_pRefInputEdit ) { @@ -238,15 +238,15 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) OUString aStr; ScRefFlags nFmt = ScRefFlags::RANGE_ABS_3D; //!!! nCurTab is still missing - const formula::FormulaGrammar::AddressConvention eConv = pDocP->GetAddressConvention(); + const formula::FormulaGrammar::AddressConvention eConv = rDocP.GetAddressConvention(); if ( rRef.aStart.Tab() != rRef.aEnd.Tab() ) nFmt |= ScRefFlags::TAB2_3D; if ( m_pRefInputEdit == m_xEdDataArea.get()) - aStr = rRef.Format(nFmt, pDocP, eConv); + aStr = rRef.Format(nFmt, &rDocP, eConv); else if ( m_pRefInputEdit == m_xEdDestArea.get() ) - aStr = rRef.aStart.Format(nFmt, pDocP, eConv); + aStr = rRef.aStart.Format(nFmt, &rDocP, eConv); m_pRefInputEdit->SetRefString( aStr ); ModifyHdl( *m_pRefInputEdit ); diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 6f0b35506817..5f7ad383c979 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -275,7 +275,7 @@ void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData ) // Transfer of a table area selected with the mouse, which is then displayed // as a new selection in the reference window. -void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) +void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument& rDocP ) { if (m_xEdAssign->GetWidget()->get_sensitive()) { @@ -284,7 +284,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) theCurArea = rRef; - OUString aRefStr(theCurArea.Format(ScRefFlags::RANGE_ABS_3D, pDocP, aAddrDetails)); + OUString aRefStr(theCurArea.Format(ScRefFlags::RANGE_ABS_3D, &rDocP, aAddrDetails)); m_xEdAssign->SetRefString( aRefStr ); m_xOptions->set_sensitive(true); m_xBtnAdd->set_sensitive(true); diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 9ee84fc714cd..addfedbe0f4c 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -357,13 +357,13 @@ void ScFilterDlg::Close() // Mouse-selected cell area becomes the new selection and is shown in the // reference text box -void ScFilterDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) +void ScFilterDlg::SetReference( const ScRange& rRef, ScDocument& rDocP ) { if ( bRefInputMode ) // Only possible if in reference edit mode { if ( rRef.aStart != rRef.aEnd ) RefInputStart( m_xEdCopyArea.get() ); - OUString aRefStr(rRef.aStart.Format(ScRefFlags::ADDR_ABS_3D, pDocP, pDocP->GetAddressConvention())); + OUString aRefStr(rRef.aStart.Format(ScRefFlags::ADDR_ABS_3D, &rDocP, rDocP.GetAddressConvention())); m_xEdCopyArea->SetRefString( aRefStr ); } } diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 53045ebf0725..3b5d8ff55b81 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -196,7 +196,7 @@ void ScSpecialFilterDlg::Close() // Transfer of a table area selected with the mouse, which is then displayed // as a new selection in the reference edit. -void ScSpecialFilterDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) +void ScSpecialFilterDlg::SetReference( const ScRange& rRef, ScDocument& rDocP ) { if ( bRefInputMode && m_pRefInputEdit ) // only possible if in the reference edit mode { @@ -204,12 +204,12 @@ void ScSpecialFilterDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) RefInputStart( m_pRefInputEdit ); OUString aRefStr; - const formula::FormulaGrammar::AddressConvention eConv = pDocP->GetAddressConvention(); + const formula::FormulaGrammar::AddressConvention eConv = rDocP.GetAddressConvention(); if (m_pRefInputEdit == m_xEdCopyArea.get()) - aRefStr = rRef.aStart.Format(ScRefFlags::ADDR_ABS_3D, pDocP, eConv); + aRefStr = rRef.aStart.Format(ScRefFlags::ADDR_ABS_3D, &rDocP, eConv); else if (m_pRefInputEdit == m_xEdFilterArea.get()) - aRefStr = rRef.Format(ScRefFlags::RANGE_ABS_3D, pDocP, eConv); + aRefStr = rRef.Format(ScRefFlags::RANGE_ABS_3D, &rDocP, eConv); m_pRefInputEdit->SetRefString( aRefStr ); } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 41bc913db911..84de0b56b862 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -101,7 +101,7 @@ ScValidationDlg::~ScValidationDlg() RemoveRefDlg(false); } -void ScTPValidationValue::SetReferenceHdl( const ScRange&rRange , const ScDocument* pDoc ) +void ScTPValidationValue::SetReferenceHdl( const ScRange&rRange , const ScDocument& rDoc ) { if ( rRange.aStart != rRange.aEnd ) if ( ScValidationDlg *pValidationDlg = GetValidationDlg() ) @@ -110,7 +110,7 @@ void ScTPValidationValue::SetReferenceHdl( const ScRange&rRange , const ScDocume if ( m_pRefEdit ) { - OUString aStr(rRange.Format(ScRefFlags::RANGE_ABS_3D, pDoc, pDoc->GetAddressConvention())); + OUString aStr(rRange.Format(ScRefFlags::RANGE_ABS_3D, &rDoc, rDoc.GetAddressConvention())); m_pRefEdit->SetRefString( aStr ); } } |