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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 26 | ||||
-rw-r--r-- | sfx2/source/dialog/documentfontsdialog.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/printopt.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/inc/documentfontsdialog.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/printer.cxx | 2 |
9 files changed, 28 insertions, 28 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 9bebf9dff15b..026ee868a9ba 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -680,7 +680,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl) bModified = ( GetOutputItemSet()->Count() > 0 ); } else - bModified = pImpl->m_pSfxPage->FillItemSet( *GetOutputSetImpl() ); + bModified = pImpl->m_pSfxPage->FillItemSet( GetOutputSetImpl() ); if ( bModified ) { diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index e307917ea525..65c1a87cc36b 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -637,7 +637,7 @@ SfxTabPage *SfxDocumentDescPage::Create(Window *pParent, const SfxItemSet &rItem } -bool SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet) +bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet) { // Test whether a change is present const bool bTitleMod = m_pTitleEd->IsModified(); @@ -685,7 +685,7 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet) { pInfo->setDescription( m_pCommentEd->GetText() ); } - rSet.Put( SfxDocumentInfoItem( *pInfo ) ); + rSet->Put( SfxDocumentInfoItem( *pInfo ) ); if ( pInfo != m_pInfoItem ) { delete pInfo; @@ -928,7 +928,7 @@ void SfxDocumentPage::EnableUseUserData() -bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) +bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) { bool bRet = false; @@ -944,7 +944,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) SfxDocumentInfoItem* m_pInfoItem = (SfxDocumentInfoItem*)pItem; bool bUseData = ( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); m_pInfoItem->SetUseUserData( bUseData ); - rSet.Put( SfxDocumentInfoItem( *m_pInfoItem ) ); + rSet->Put( SfxDocumentInfoItem( *m_pInfoItem ) ); bRet = true; } } @@ -965,20 +965,20 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) newItem.SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); newItem.SetDeleteUserData( true ); - rSet.Put( newItem ); + rSet->Put( newItem ); bRet = true; } } if ( m_pNameED->IsModified() && !m_pNameED->GetText().isEmpty() ) { - rSet.Put( SfxStringItem( ID_FILETP_TITLE, m_pNameED->GetText() ) ); + rSet->Put( SfxStringItem( ID_FILETP_TITLE, m_pNameED->GetText() ) ); bRet = true; } if ( /* m_pReadOnlyCB->IsModified() */ true ) { - rSet.Put( SfxBoolItem( ID_FILETP_READONLY, m_pReadOnlyCB->IsChecked() ) ); + rSet->Put( SfxBoolItem( ID_FILETP_READONLY, m_pReadOnlyCB->IsChecked() ) ); bRet = true; } @@ -2043,7 +2043,7 @@ IMPL_LINK_NOARG(SfxCustomPropertiesPage, AddHdl) return 0; } -bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) +bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet ) { bool bModified = false; const SfxPoolItem* pItem = NULL; @@ -2054,7 +2054,7 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) { if ( SFX_ITEM_SET != GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) ) - pInfo = &( SfxDocumentInfoItem& )rSet.Get( SID_DOCINFO ); + pInfo = &( SfxDocumentInfoItem& )rSet->Get( SID_DOCINFO ); else { bMustDelete = true; @@ -2087,7 +2087,7 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet& rSet ) if (pInfo) { if ( bModified ) - rSet.Put( *pInfo ); + rSet->Put( *pInfo ); if ( bMustDelete ) delete pInfo; } @@ -2516,7 +2516,7 @@ SfxCmisPropertiesPage::SfxCmisPropertiesPage( Window* pParent, const SfxItemSet& { } -bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet ) +bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet ) { const SfxPoolItem* pItem = NULL; SfxDocumentInfoItem* pInfo = NULL; @@ -2526,7 +2526,7 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet ) { if ( SFX_ITEM_SET != GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) ) - pInfo = &( SfxDocumentInfoItem& )rSet.Get( SID_DOCINFO ); + pInfo = &( SfxDocumentInfoItem& )rSet->Get( SID_DOCINFO ); else { bMustDelete = true; @@ -2577,7 +2577,7 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet ) pIter != changedProps.end( ); ++pIter ) aModifiedProps[ nCount++ ] = *pIter; pInfo->SetCmisProperties( aModifiedProps ); - rSet.Put( *pInfo ); + rSet->Put( *pInfo ); if ( bMustDelete ) delete pInfo; } diff --git a/sfx2/source/dialog/documentfontsdialog.cxx b/sfx2/source/dialog/documentfontsdialog.cxx index fa41757001e4..7bf4d3993175 100644 --- a/sfx2/source/dialog/documentfontsdialog.cxx +++ b/sfx2/source/dialog/documentfontsdialog.cxx @@ -53,7 +53,7 @@ void SfxDocumentFontsPage::Reset( const SfxItemSet& ) embedFontsCheckbox->Check( bVal ); } -bool SfxDocumentFontsPage::FillItemSet( SfxItemSet& ) +bool SfxDocumentFontsPage::FillItemSet( SfxItemSet* ) { bool bVal = embedFontsCheckbox->IsChecked(); SfxObjectShell* pDocSh = SfxObjectShell::Current(); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 733abce27130..6855e62ecb27 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -352,7 +352,7 @@ IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, LoseFocusHdl, Edit *, pEdit ) -bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet ) +bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet* rSet ) /* [Description] @@ -391,7 +391,7 @@ bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet ) if(m_pAutoCB->IsVisible() && m_pAutoCB->IsValueChangedFromSaved()) { - rSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, m_pAutoCB->IsChecked())); + rSet->Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, m_pAutoCB->IsChecked())); } return bModified; @@ -592,7 +592,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) } if ( pItemSet ) - FillItemSet( *pItemSet ); + FillItemSet( pItemSet ); return nRet; } diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 2cc667fd6913..792401c3ccf9 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -114,7 +114,7 @@ Window* SfxCommonPrintOptionsTabPage::GetParentLabelFor( const Window* pWindow ) return SfxTabPage::GetParentLabelFor( pWindow ); } -bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) +bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet* /*rSet*/ ) { SvtPrintWarningOptions aWarnOptions; SvtPrinterOptions aPrinterOptions; @@ -162,7 +162,7 @@ void SfxCommonPrintOptionsTabPage::Reset( const SfxItemSet& /*rSet*/ ) int SfxCommonPrintOptionsTabPage::DeactivatePage( SfxItemSet* pItemSet ) { if( pItemSet ) - FillItemSet( *pItemSet ); + FillItemSet( pItemSet ); return LEAVE_PAGE; } diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index fe41bedc485e..ea2515d5675f 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -439,12 +439,12 @@ SfxSecurityPage::~SfxSecurityPage() } -bool SfxSecurityPage::FillItemSet( SfxItemSet & rItemSet ) +bool SfxSecurityPage::FillItemSet( SfxItemSet * rItemSet ) { bool bModified = false; DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" ); if (m_pImpl.get() != 0) - bModified = m_pImpl->FillItemSet_Impl( rItemSet ); + bModified = m_pImpl->FillItemSet_Impl( *rItemSet ); return bModified; } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 7cdc84401841..98a9adc87251 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -204,9 +204,9 @@ SfxTabPage::~SfxTabPage() -bool SfxTabPage::FillItemSet( SfxItemSet& rSet ) +bool SfxTabPage::FillItemSet( SfxItemSet* rSet ) { - return pImpl->maItemConn.DoFillItemSet( rSet, GetItemSet() ); + return pImpl->maItemConn.DoFillItemSet( *rSet, GetItemSet() ); } @@ -882,13 +882,13 @@ short SfxTabDialog::Ok() { SfxItemSet& rSet = (SfxItemSet&)pTabPage->GetItemSet(); rSet.ClearItem(); - bModified |= pTabPage->FillItemSet( rSet ); + bModified |= pTabPage->FillItemSet( &rSet ); } else if ( pSet && !pTabPage->HasExchangeSupport() ) { SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() ); - if ( pTabPage->FillItemSet( aTmp ) ) + if ( pTabPage->FillItemSet( &aTmp ) ) { bModified |= true; if (pExampleSet) diff --git a/sfx2/source/inc/documentfontsdialog.hxx b/sfx2/source/inc/documentfontsdialog.hxx index 585e97dcdc7e..847baa6bbd22 100644 --- a/sfx2/source/inc/documentfontsdialog.hxx +++ b/sfx2/source/inc/documentfontsdialog.hxx @@ -33,7 +33,7 @@ public: SfxDocumentFontsPage( Window* parent, const SfxItemSet& set ); static SfxTabPage* Create( Window* parent, const SfxItemSet& set ); protected: - virtual bool FillItemSet( SfxItemSet& set ) SAL_OVERRIDE; + virtual bool FillItemSet( SfxItemSet* set ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet& set ) SAL_OVERRIDE; private: CheckBox* embedFontsCheckbox; diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index bfaa3ed10c09..f37cc45672f3 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -239,7 +239,7 @@ short SfxPrintOptionsDialog::Execute() short nRet = ModalDialog::Execute(); if ( nRet == RET_OK ) - pPage->FillItemSet( *pOptions ); + pPage->FillItemSet( pOptions ); else pPage->Reset( *pOptions ); return nRet; |