diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-11 10:35:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-11 10:39:03 +0200 |
commit | a92e973b6d0a9ad87fe014442e1678af2ce0c7d0 (patch) | |
tree | b39139c7992a853cc5e4d836fc35cd45c01a3f6d /sfx2 | |
parent | 88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e (diff) |
Change SfxTabPage::Reset param from ref to pointer
...there was a call site that passed undefined "null pointer reference"
(apparently in a case where the passed argument was actually unused)
Change-Id: I663d4264b7a84f44ca69c732f3bc502f614b2b2a
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 22 | ||||
-rw-r--r-- | sfx2/source/dialog/documentfontsdialog.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/printopt.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/styledlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/inc/documentfontsdialog.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/printer.cxx | 4 |
10 files changed, 30 insertions, 30 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 026ee868a9ba..e464e61a6406 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -771,7 +771,7 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage, OUString sUserData; aUserItem >>= sUserData; pImpl->m_pSfxPage->SetUserData(sUserData); - pImpl->m_pSfxPage->Reset( *GetInputItemSet() ); + pImpl->m_pSfxPage->Reset( GetInputItemSet() ); pImpl->m_pSfxPage->Show(); pHelpBtn->Show(Help::IsContextHelpEnabled()); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 65c1a87cc36b..fbfe1211394d 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -695,16 +695,16 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet) } -void SfxDocumentDescPage::Reset(const SfxItemSet &rSet) +void SfxDocumentDescPage::Reset(const SfxItemSet *rSet) { - m_pInfoItem = &(SfxDocumentInfoItem &)rSet.Get(SID_DOCINFO); + m_pInfoItem = &(SfxDocumentInfoItem &)rSet->Get(SID_DOCINFO); m_pTitleEd->SetText( m_pInfoItem->getTitle() ); m_pThemaEd->SetText( m_pInfoItem->getSubject() ); m_pKeywordsEd->SetText( m_pInfoItem->getKeywords() ); m_pCommentEd->SetText( m_pInfoItem->getDescription() ); - SFX_ITEMSET_ARG( &rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, false ); + SFX_ITEMSET_ARG( rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, false ); if ( pROItem && pROItem->GetValue() ) { m_pTitleEd->SetReadOnly( true ); @@ -987,11 +987,11 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) -void SfxDocumentPage::Reset( const SfxItemSet& rSet ) +void SfxDocumentPage::Reset( const SfxItemSet* rSet ) { // Determine the document information const SfxDocumentInfoItem *m_pInfoItem = - &(const SfxDocumentInfoItem &)rSet.Get(SID_DOCINFO); + &(const SfxDocumentInfoItem &)rSet->Get(SID_DOCINFO); // template data if ( m_pInfoItem->HasTemplate() ) @@ -1015,7 +1015,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) // determine name OUString aName; const SfxPoolItem* pItem = 0; - if ( SFX_ITEM_SET != rSet.GetItemState( ID_FILETP_TITLE, false, &pItem ) ) + if ( SFX_ITEM_SET != rSet->GetItemState( ID_FILETP_TITLE, false, &pItem ) ) { INetURLObject aURL(aFile); aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET ); @@ -1032,7 +1032,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) m_pNameED->ClearModifyFlag(); // determine RO-Flag - if ( SFX_ITEM_UNKNOWN == rSet.GetItemState( ID_FILETP_READONLY, false, &pItem ) + if ( SFX_ITEM_UNKNOWN == rSet->GetItemState( ID_FILETP_READONLY, false, &pItem ) || !pItem ) m_pReadOnlyCB->Hide(); else @@ -2094,10 +2094,10 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet ) return bModified; } -void SfxCustomPropertiesPage::Reset( const SfxItemSet& rItemSet ) +void SfxCustomPropertiesPage::Reset( const SfxItemSet* rItemSet ) { m_pPropertiesCtrl->ClearAllLines(); - const SfxDocumentInfoItem* m_pInfoItem = &(const SfxDocumentInfoItem &)rItemSet.Get(SID_DOCINFO); + const SfxDocumentInfoItem* m_pInfoItem = &(const SfxDocumentInfoItem &)rItemSet->Get(SID_DOCINFO); std::vector< CustomProperty* > aCustomProps = m_pInfoItem->GetCustomProperties(); for ( sal_uInt32 i = 0; i < aCustomProps.size(); i++ ) { @@ -2585,10 +2585,10 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet ) return modifiedNum; } -void SfxCmisPropertiesPage::Reset( const SfxItemSet& rItemSet ) +void SfxCmisPropertiesPage::Reset( const SfxItemSet* rItemSet ) { m_pPropertiesCtrl.ClearAllLines(); - const SfxDocumentInfoItem* m_pInfoItem = &(const SfxDocumentInfoItem &)rItemSet.Get(SID_DOCINFO); + const SfxDocumentInfoItem* m_pInfoItem = &(const SfxDocumentInfoItem &)rItemSet->Get(SID_DOCINFO); uno::Sequence< document::CmisProperty > aCmisProps = m_pInfoItem->GetCmisProperties(); for ( sal_Int32 i = 0; i < aCmisProps.getLength(); i++ ) { diff --git a/sfx2/source/dialog/documentfontsdialog.cxx b/sfx2/source/dialog/documentfontsdialog.cxx index 7bf4d3993175..20b4a8fb3cd5 100644 --- a/sfx2/source/dialog/documentfontsdialog.cxx +++ b/sfx2/source/dialog/documentfontsdialog.cxx @@ -34,7 +34,7 @@ SfxDocumentFontsPage::SfxDocumentFontsPage( Window* parent, const SfxItemSet& se get( embedFontsCheckbox, "embedFonts" ); } -void SfxDocumentFontsPage::Reset( const SfxItemSet& ) +void SfxDocumentFontsPage::Reset( const SfxItemSet* ) { bool bVal = false; SfxObjectShell* pDocSh = SfxObjectShell::Current(); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 6855e62ecb27..abfccc64c087 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -399,7 +399,7 @@ bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet* rSet ) -void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ ) +void SfxManageStyleSheetPage::Reset( const SfxItemSet* /*rAttrSet*/ ) /* [Description] diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 792401c3ccf9..5f7a87b164e7 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -138,7 +138,7 @@ bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet* /*rSet*/ ) return bModified; } -void SfxCommonPrintOptionsTabPage::Reset( const SfxItemSet& /*rSet*/ ) +void SfxCommonPrintOptionsTabPage::Reset( const SfxItemSet* /*rSet*/ ) { SvtPrintWarningOptions aWarnOptions; SvtPrinterOptions aPrinterOptions; diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index ea2515d5675f..e75f88dedd1b 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -449,11 +449,11 @@ bool SfxSecurityPage::FillItemSet( SfxItemSet * rItemSet ) } -void SfxSecurityPage::Reset( const SfxItemSet & rItemSet ) +void SfxSecurityPage::Reset( const SfxItemSet * rItemSet ) { DBG_ASSERT( m_pImpl.get(), "implementation pointer is 0. Still in c-tor?" ); if (m_pImpl.get() != 0) - m_pImpl->Reset_Impl( rItemSet ); + m_pImpl->Reset_Impl( *rItemSet ); } diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 73cd4255dbc3..c9231d4549c9 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -142,7 +142,7 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton ) } if ( pPage ) - pPage->Reset( *GetInputSetImpl() ); + pPage->Reset( GetInputSetImpl() ); EndDialog( RET_CANCEL ); return 0; } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 98a9adc87251..55483d81192b 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -211,10 +211,10 @@ bool SfxTabPage::FillItemSet( SfxItemSet* rSet ) -void SfxTabPage::Reset( const SfxItemSet& rSet ) +void SfxTabPage::Reset( const SfxItemSet* rSet ) { - pImpl->maItemConn.DoApplyFlags( rSet ); - pImpl->maItemConn.DoReset( rSet ); + pImpl->maItemConn.DoApplyFlags( *rSet ); + pImpl->maItemConn.DoReset( *rSet ); } @@ -1060,10 +1060,10 @@ IMPL_LINK_NOARG(SfxTabDialog, ResetHdl) { // CSet on AIS has problems here, thus separated const SfxItemSet* pItemSet = &pDataObject->pTabPage->GetItemSet(); - pDataObject->pTabPage->Reset( *(SfxItemSet*)pItemSet ); + pDataObject->pTabPage->Reset( pItemSet ); } else - pDataObject->pTabPage->Reset( *pSet ); + pDataObject->pTabPage->Reset( pSet ); return 0; } @@ -1139,7 +1139,7 @@ IMPL_LINK_NOARG(SfxTabDialog, BaseFmtHdl) } // Set all Items as new -> the call the current Page Reset() DBG_ASSERT( pDataObject->pTabPage, "the Page is gone" ); - pDataObject->pTabPage->Reset( aTmpSet ); + pDataObject->pTabPage->Reset( &aTmpSet ); pDataObject->pTabPage->pImpl->mbStandard = true; } return 1; @@ -1228,14 +1228,14 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl ) PageCreated( nId, *pTabPage ); if ( pDataObject->bOnDemand ) - pTabPage->Reset( (SfxItemSet &)pTabPage->GetItemSet() ); + pTabPage->Reset( &pTabPage->GetItemSet() ); else - pTabPage->Reset( *pSet ); + pTabPage->Reset( pSet ); pTabCtrl->SetTabPage( nId, pTabPage ); } else if ( pDataObject->bRefresh ) - pTabPage->Reset( *pSet ); + pTabPage->Reset( pSet ); pDataObject->bRefresh = false; if ( pExampleSet ) diff --git a/sfx2/source/inc/documentfontsdialog.hxx b/sfx2/source/inc/documentfontsdialog.hxx index 847baa6bbd22..0264b97772c8 100644 --- a/sfx2/source/inc/documentfontsdialog.hxx +++ b/sfx2/source/inc/documentfontsdialog.hxx @@ -34,7 +34,7 @@ public: static SfxTabPage* Create( Window* parent, const SfxItemSet& set ); protected: virtual bool FillItemSet( SfxItemSet* set ) SAL_OVERRIDE; - virtual void Reset( const 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 f37cc45672f3..ba4f4ebc3a31 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -215,7 +215,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog(Window *pParent, DBG_ASSERT( pPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" ); if( pPage ) { - pPage->Reset( *pOptions ); + pPage->Reset( pOptions ); SetHelpId( pPage->GetHelpId() ); pPage->Show(); } @@ -241,7 +241,7 @@ short SfxPrintOptionsDialog::Execute() if ( nRet == RET_OK ) pPage->FillItemSet( pOptions ); else - pPage->Reset( *pOptions ); + pPage->Reset( pOptions ); return nRet; } |