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/pagedlg | |
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/pagedlg')
-rw-r--r-- | sc/source/ui/pagedlg/scuitphfedit.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/tphf.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/tptable.cxx | 32 |
3 files changed, 24 insertions, 24 deletions
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index dcbcedac8c81..1ffa69423c1d 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -183,7 +183,7 @@ void ScHFEditPage::Reset( const SfxItemSet& rCoreSet ) } } -bool ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet ) +bool ScHFEditPage::FillItemSet( SfxItemSet* rCoreSet ) { ScPageHFItem aItem( nWhich ); EditTextObject* pLeft = m_pWndLeft->CreateTextObject(); @@ -197,7 +197,7 @@ bool ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet ) delete pCenter; delete pRight; - rCoreSet.Put( aItem ); + rCoreSet->Put( aItem ); return true; } diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index 3d495da48f0b..e1cf1d5d994c 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -87,19 +87,19 @@ void ScHFPage::Reset( const SfxItemSet& rSet ) TurnOnHdl( 0 ); } -bool ScHFPage::FillItemSet( SfxItemSet& rOutSet ) +bool ScHFPage::FillItemSet( SfxItemSet* rOutSet ) { bool bResult = SvxHFPage::FillItemSet( rOutSet ); if ( nId == SID_ATTR_PAGE_HEADERSET ) { - rOutSet.Put( aDataSet.Get( ATTR_PAGE_HEADERLEFT ) ); - rOutSet.Put( aDataSet.Get( ATTR_PAGE_HEADERRIGHT ) ); + rOutSet->Put( aDataSet.Get( ATTR_PAGE_HEADERLEFT ) ); + rOutSet->Put( aDataSet.Get( ATTR_PAGE_HEADERRIGHT ) ); } else { - rOutSet.Put( aDataSet.Get( ATTR_PAGE_FOOTERLEFT ) ); - rOutSet.Put( aDataSet.Get( ATTR_PAGE_FOOTERRIGHT ) ); + rOutSet->Put( aDataSet.Get( ATTR_PAGE_FOOTERLEFT ) ); + rOutSet->Put( aDataSet.Get( ATTR_PAGE_FOOTERRIGHT ) ); } return bResult; @@ -125,7 +125,7 @@ int ScHFPage::DeactivatePage( SfxItemSet* pSetP ) { if ( LEAVE_PAGE == SvxHFPage::DeactivatePage( pSetP ) ) if ( pSetP ) - FillItemSet( *pSetP ); + FillItemSet( pSetP ); return LEAVE_PAGE; } diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index e99f4566ca59..ac2453831436 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -231,7 +231,7 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) m_pEdScalePageNum->SaveValue(); } -bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) +bool ScTablePage::FillItemSet( SfxItemSet* rCoreSet ) { const SfxItemSet& rOldSet = GetItemSet(); sal_uInt16 nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO); @@ -239,32 +239,32 @@ bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) // sal_Bool flags bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NOTES), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, m_pBtnNotes->IsChecked(), m_pBtnNotes->GetSavedValue() != TRISTATE_FALSE ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_GRID), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, m_pBtnGrid->IsChecked(), m_pBtnGrid->GetSavedValue() != TRISTATE_FALSE ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_HEADERS), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, m_pBtnHeaders->IsChecked(), m_pBtnHeaders->GetSavedValue() != TRISTATE_FALSE ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_TOPDOWN), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, m_pBtnTopDown->IsChecked(), m_pBtnTopDown->GetSavedValue() ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_FORMULAS), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, m_pBtnFormulas->IsChecked(), m_pBtnFormulas->GetSavedValue() != TRISTATE_FALSE ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NULLVALS), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, m_pBtnNullVals->IsChecked(), m_pBtnNullVals->GetSavedValue() != TRISTATE_FALSE ); @@ -276,7 +276,7 @@ bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) || ( bUseValue && (bUseValue ? 1 : 0) == m_pBtnPageNo->GetSavedValue() && ! m_pEdPageNo->IsValueChangedFromSaved() ) ) ) { - rCoreSet.ClearItem( nWhichPageNo ); + rCoreSet->ClearItem( nWhichPageNo ); } else { @@ -284,19 +284,19 @@ bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) ? m_pEdPageNo->GetValue() : 0 ); - rCoreSet.Put( SfxUInt16Item( nWhichPageNo, nPage ) ); + rCoreSet->Put( SfxUInt16Item( nWhichPageNo, nPage ) ); bDataChanged = true; } // object representation: bDataChanged |= lcl_PutVObjModeItem( GetWhich(SID_SCATTR_PAGE_CHARTS), - rCoreSet, rOldSet, *m_pBtnCharts ); + *rCoreSet, rOldSet, *m_pBtnCharts ); bDataChanged |= lcl_PutVObjModeItem( GetWhich(SID_SCATTR_PAGE_OBJECTS), - rCoreSet, rOldSet, *m_pBtnObjects ); + *rCoreSet, rOldSet, *m_pBtnObjects ); bDataChanged |= lcl_PutVObjModeItem( GetWhich(SID_SCATTR_PAGE_DRAWINGS), - rCoreSet, rOldSet, *m_pBtnDrawings ); + *rCoreSet, rOldSet, *m_pBtnDrawings ); // scaling: if( !m_pEdScalePageWidth->GetValue() && !m_pEdScalePageHeight->GetValue() ) @@ -306,17 +306,17 @@ bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) } bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALE), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, *m_pLbScaleMode, SC_TPTABLE_SCALE_PERCENT, *m_pEdScaleAll, (sal_uInt16)m_pEdScaleAll->GetValue() ); bDataChanged |= lcl_PutScaleItem2( GetWhich(SID_SCATTR_PAGE_SCALETO), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, *m_pLbScaleMode, SC_TPTABLE_SCALE_TO, *m_pEdScalePageWidth, *m_pEdScalePageHeight ); bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALETOPAGES), - rCoreSet, rOldSet, + *rCoreSet, rOldSet, *m_pLbScaleMode, SC_TPTABLE_SCALE_TO_PAGES, *m_pEdScalePageNum, (sal_uInt16)m_pEdScalePageNum->GetValue() ); @@ -326,7 +326,7 @@ bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) int ScTablePage::DeactivatePage( SfxItemSet* pSetP ) { if ( pSetP ) - FillItemSet( *pSetP ); + FillItemSet( pSetP ); return LEAVE_PAGE; } |