diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-10 17:23:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-10 17:25:23 +0200 |
commit | 4dbeadb9c1e46ac0008f076cd6f9c5d0a38a4d40 (patch) | |
tree | a71acd0d466e02c18bf78ffdcfea748135805d21 /sc/source/ui/dbgui | |
parent | 2f8fd888b42dc41662b54a16d62575c2b15e844a (diff) |
Change SfxTabPage::FillItemSet param from ref to pointer
...there were a number of call sites that passed undefined "null pointer
references" (apparently in cases where the passed argument was actually unused)
Change-Id: I19799e90f0cd8e98367782441a5ea9df27b59830
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsubt.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/dbgui/validate.cxx | 32 |
3 files changed, 28 insertions, 28 deletions
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index a9a793c2e238..d87aa1a81185 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -224,7 +224,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) SetLastSortKey( nSortKeyCount ); } -bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) +bool ScTabPageSortFields::FillItemSet( SfxItemSet* rArgSet ) { ScSortParam aNewSortData = aSortData; @@ -283,7 +283,7 @@ bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) aNewSortData.maKeyState[i].bDoSort = false; } - rArgSet.Put( ScSortItem( SCITEM_SORTDATA, NULL, &aNewSortData ) ); + rArgSet->Put( ScSortItem( SCITEM_SORTDATA, NULL, &aNewSortData ) ); return true; } @@ -324,7 +324,7 @@ int ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP ) } if ( pSetP ) - FillItemSet( *pSetP ); + FillItemSet( pSetP ); return SfxTabPage::LEAVE_PAGE; } @@ -688,7 +688,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) } } -bool ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) +bool ScTabPageSortOptions::FillItemSet( SfxItemSet* rArgSet ) { // Create local copy of ScParam ScSortParam aNewSortData = aSortData; @@ -730,7 +730,7 @@ bool ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) } aNewSortData.aCollatorAlgorithm = sAlg; - rArgSet.Put( ScSortItem( SCITEM_SORTDATA, &aNewSortData ) ); + rArgSet->Put( ScSortItem( SCITEM_SORTDATA, &aNewSortData ) ); return true; } @@ -806,7 +806,7 @@ int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) } if ( pSetP && bPosInputOk ) - FillItemSet( *pSetP ); + FillItemSet( pSetP ); return bPosInputOk ? SfxTabPage::LEAVE_PAGE : SfxTabPage::KEEP_PAGE; } diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index d2c53569f760..d76bc51992a2 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -413,10 +413,10 @@ void ScTpSubTotalGroup2::Reset( const SfxItemSet& rArgSet ) { RESET(2); } void ScTpSubTotalGroup3::Reset( const SfxItemSet& rArgSet ) { RESET(3); } #undef RESET -#define FILLSET(i) (ScTpSubTotalGroup::DoFillItemSet( (i), rArgSet )) -bool ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); } -bool ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); } -bool ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); } +#define FILLSET(i) (ScTpSubTotalGroup::DoFillItemSet( (i), *rArgSet )) +bool ScTpSubTotalGroup1::FillItemSet( SfxItemSet* rArgSet ) { return FILLSET(1); } +bool ScTpSubTotalGroup2::FillItemSet( SfxItemSet* rArgSet ) { return FILLSET(2); } +bool ScTpSubTotalGroup3::FillItemSet( SfxItemSet* rArgSet ) { return FILLSET(3); } #undef FILL @@ -499,7 +499,7 @@ void ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ ) CheckHdl( pBtnSort ); } -bool ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) +bool ScTpSubTotalOptions::FillItemSet( SfxItemSet* rArgSet ) { ScSubTotalParam theSubTotalData; // auslesen, wenn schon teilweise gefuellt SfxTabDialog* pDlg = GetTabDialog(); @@ -522,7 +522,7 @@ bool ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) ? pLbUserDef->GetSelectEntryPos() : 0; - rArgSet.Put( ScSubTotalItem( nWhichSubTotals, &theSubTotalData ) ); + rArgSet->Put( ScSubTotalItem( nWhichSubTotals, &theSubTotalData ) ); return true; } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index df23c4b4a15f..19708bff48b7 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -428,20 +428,20 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet ) CheckHdl( NULL ); } -bool ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet ) +bool ScTPValidationValue::FillItemSet( SfxItemSet* rArgSet ) { sal_Int16 nListType = m_pCbShow->IsChecked() ? (m_pCbSort->IsChecked() ? ValidListType::SORTEDASCENDING : ValidListType::UNSORTED) : ValidListType::INVISIBLE; - rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>( + rArgSet->Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>( lclGetValModeFromPos( m_pLbAllow->GetSelectEntryPos() ) ) ) ); - rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( + rArgSet->Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( lclGetCondModeFromPos( m_pLbValue->GetSelectEntryPos() ) ) ) ); - rArgSet.Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) ); - rArgSet.Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) ); - rArgSet.Put( SfxBoolItem( FID_VALID_BLANK, m_pCbAllow->IsChecked() ) ); - rArgSet.Put( SfxInt16Item( FID_VALID_LISTTYPE, nListType ) ); + rArgSet->Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) ); + rArgSet->Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) ); + rArgSet->Put( SfxBoolItem( FID_VALID_BLANK, m_pCbAllow->IsChecked() ) ); + rArgSet->Put( SfxInt16Item( FID_VALID_LISTTYPE, nListType ) ); return true; } @@ -697,11 +697,11 @@ void ScTPValidationHelp::Reset( const SfxItemSet& rArgSet ) pEdInputHelp->SetText( EMPTY_OUSTRING ); } -bool ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet ) +bool ScTPValidationHelp::FillItemSet( SfxItemSet* rArgSet ) { - rArgSet.Put( SfxBoolItem( FID_VALID_SHOWHELP, pTsbHelp->GetState() == TRISTATE_TRUE ) ); - rArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, pEdtTitle->GetText() ) ); - rArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, pEdInputHelp->GetText() ) ); + rArgSet->Put( SfxBoolItem( FID_VALID_SHOWHELP, pTsbHelp->GetState() == TRISTATE_TRUE ) ); + rArgSet->Put( SfxStringItem( FID_VALID_HELPTITLE, pEdtTitle->GetText() ) ); + rArgSet->Put( SfxStringItem( FID_VALID_HELPTEXT, pEdInputHelp->GetText() ) ); return true; } @@ -774,12 +774,12 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet ) SelectActionHdl( NULL ); } -bool ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) +bool ScTPValidationError::FillItemSet( SfxItemSet* rArgSet ) { - rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, m_pTsbShow->GetState() == TRISTATE_TRUE ) ); - rArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, m_pLbAction->GetSelectEntryPos() ) ); - rArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, m_pEdtTitle->GetText() ) ); - rArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, m_pEdError->GetText() ) ); + rArgSet->Put( SfxBoolItem( FID_VALID_SHOWERR, m_pTsbShow->GetState() == TRISTATE_TRUE ) ); + rArgSet->Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, m_pLbAction->GetSelectEntryPos() ) ); + rArgSet->Put( SfxStringItem( FID_VALID_ERRTITLE, m_pEdtTitle->GetText() ) ); + rArgSet->Put( SfxStringItem( FID_VALID_ERRTEXT, m_pEdError->GetText() ) ); return true; } |