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 /sd | |
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 'sd')
-rw-r--r-- | sd/source/ui/dlg/paragr.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/dlg/prntopts.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpaction.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpoption.cxx | 26 | ||||
-rw-r--r-- | sd/source/ui/inc/prntopts.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/tpaction.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/tpoption.hxx | 6 |
7 files changed, 30 insertions, 30 deletions
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index d4cbe22c66de..d438f3f75cdc 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -43,7 +43,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); static const sal_uInt16* GetRanges(); - virtual bool FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE; + virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE; private: @@ -90,7 +90,7 @@ const sal_uInt16* SdParagraphNumTabPage::GetRanges() return aRange; } -bool SdParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) +bool SdParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) { if(m_pNewStartCB->IsValueChangedFromSaved() || m_pNewStartNumberCB->IsValueChangedFromSaved()|| @@ -99,10 +99,10 @@ bool SdParagraphNumTabPage::FillItemSet( SfxItemSet& rSet ) mbModified = true; bool bNewStartChecked = TRISTATE_TRUE == m_pNewStartCB->GetState(); bool bNumberNewStartChecked = TRISTATE_TRUE == m_pNewStartNumberCB->GetState(); - rSet.Put(SfxBoolItem(ATTR_NUMBER_NEWSTART, bNewStartChecked)); + rSet->Put(SfxBoolItem(ATTR_NUMBER_NEWSTART, bNewStartChecked)); const sal_Int16 nStartAt = (sal_Int16)m_pNewStartNF->GetValue(); - rSet.Put(SfxInt16Item(ATTR_NUMBER_NEWSTART_AT, bNumberNewStartChecked && bNewStartChecked ? nStartAt : -1)); + rSet->Put(SfxInt16Item(ATTR_NUMBER_NEWSTART_AT, bNumberNewStartChecked && bNewStartChecked ? nStartAt : -1)); } return mbModified; diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index eaf7233563a7..9a0167324a1f 100644 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -80,7 +80,7 @@ SdPrintOptions::~SdPrintOptions() -bool SdPrintOptions::FillItemSet( SfxItemSet& rAttrs ) +bool SdPrintOptions::FillItemSet( SfxItemSet* rAttrs ) { if( m_pCbxDraw->IsValueChangedFromSaved() || m_pCbxNotes->IsValueChangedFromSaved() || @@ -124,7 +124,7 @@ bool SdPrintOptions::FillItemSet( SfxItemSet& rAttrs ) nQuality = 2; aOptions.GetOptionsPrint().SetOutputQuality( nQuality ); - rAttrs.Put( aOptions ); + rAttrs->Put( aOptions ); return true; } diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index e65398ba7f62..f08751c5363a 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -265,7 +265,7 @@ void SdTPAction::Construct() -bool SdTPAction::FillItemSet( SfxItemSet& rAttrs ) +bool SdTPAction::FillItemSet( SfxItemSet* rAttrs ) { bool bModified = false; presentation::ClickAction eCA = presentation::ClickAction_NONE; @@ -275,15 +275,15 @@ bool SdTPAction::FillItemSet( SfxItemSet& rAttrs ) if( m_pLbAction->IsValueChangedFromSaved() ) { - rAttrs.Put( SfxAllEnumItem( ATTR_ACTION, (sal_uInt16)eCA ) ); + rAttrs->Put( SfxAllEnumItem( ATTR_ACTION, (sal_uInt16)eCA ) ); bModified = true; } else - rAttrs.InvalidateItem( ATTR_ACTION ); + rAttrs->InvalidateItem( ATTR_ACTION ); OUString aFileName = GetEditText( true ); if( aFileName.isEmpty() ) - rAttrs.InvalidateItem( ATTR_ACTION_FILENAME ); + rAttrs->InvalidateItem( ATTR_ACTION_FILENAME ); else { if( mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() ) @@ -296,7 +296,7 @@ bool SdTPAction::FillItemSet( SfxItemSet& rAttrs ) INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ); - rAttrs.Put( SfxStringItem( ATTR_ACTION_FILENAME, aFileName ) ); + rAttrs->Put( SfxStringItem( ATTR_ACTION_FILENAME, aFileName ) ); bModified = true; } else @@ -368,7 +368,7 @@ void SdTPAction::ActivatePage( const SfxItemSet& ) int SdTPAction::DeactivatePage( SfxItemSet* pPageSet ) { if( pPageSet ) - FillItemSet( *pPageSet ); + FillItemSet( pPageSet ); return( LEAVE_PAGE ); } diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index bf80be0d46da..8cdbfbc55c58 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -59,7 +59,7 @@ SdTpOptionsSnap::~SdTpOptionsSnap() -bool SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs ) +bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs ) { SvxGridTabPage::FillItemSet(rAttrs); SdOptionsSnapItem aOptsItem( ATTR_OPTIONS_SNAP ); @@ -75,7 +75,7 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs ) aOptsItem.GetOptionsSnap().SetAngle( (sal_Int16) pMtrFldAngle->GetValue() ); aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle( (sal_Int16) pMtrFldBezAngle->GetValue() ); - rAttrs.Put( aOptsItem ); + rAttrs->Put( aOptsItem ); // we get a possible existing GridItem, this ensures that we do net set // some default values by accident @@ -136,7 +136,7 @@ SdTpOptionsContents::~SdTpOptionsContents() -bool SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs ) +bool SdTpOptionsContents::FillItemSet( SfxItemSet* rAttrs ) { bool bModified = false; @@ -152,7 +152,7 @@ bool SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs ) aOptsItem.GetOptionsLayout().SetDragStripes( m_pCbxDragStripes->IsChecked() ); aOptsItem.GetOptionsLayout().SetHandlesBezier( m_pCbxHandlesBezier->IsChecked() ); - rAttrs.Put( aOptsItem ); + rAttrs->Put( aOptsItem ); bModified = true; } return( bModified ); @@ -347,7 +347,7 @@ int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet ) if( SetScale( m_pCbScale->GetText(), nX, nY ) ) { if( pActiveSet ) - FillItemSet( *pActiveSet ); + FillItemSet( pActiveSet ); return( LEAVE_PAGE ); } WarningBox aWarnBox( GetParent(), WB_YES_NO, SD_RESSTR( STR_WARN_SCALE_FAIL ) ); @@ -357,14 +357,14 @@ int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet ) return( KEEP_PAGE ); if( pActiveSet ) - FillItemSet( *pActiveSet ); + FillItemSet( pActiveSet ); return( LEAVE_PAGE ); } -bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs ) +bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs ) { bool bModified = false; @@ -394,7 +394,7 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs ) m_pCbxUsePrinterMetrics->IsChecked() ? ::com::sun::star::document::PrinterIndependentLayout::DISABLED : ::com::sun::star::document::PrinterIndependentLayout::ENABLED); - rAttrs.Put( aOptsItem ); + rAttrs->Put( aOptsItem ); bModified = true; } @@ -404,7 +404,7 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs ) if ( m_pLbMetric->IsValueChangedFromSaved() ) { sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pLbMetric->GetEntryData( nMPos ); - rAttrs.Put( SfxUInt16Item( GetWhich( SID_ATTR_METRIC ), + rAttrs->Put( SfxUInt16Item( GetWhich( SID_ATTR_METRIC ), (sal_uInt16)nFieldUnit ) ); bModified = true; } @@ -413,17 +413,17 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs ) if( m_pMtrFldTabstop->IsValueChangedFromSaved() ) { sal_uInt16 nWh = GetWhich( SID_ATTR_DEFTABSTOP ); - SfxMapUnit eUnit = rAttrs.GetPool()->GetMetric( nWh ); + SfxMapUnit eUnit = rAttrs->GetPool()->GetMetric( nWh ); SfxUInt16Item aDef( nWh,(sal_uInt16)GetCoreValue( *m_pMtrFldTabstop, eUnit ) ); - rAttrs.Put( aDef ); + rAttrs->Put( aDef ); bModified = true; } sal_Int32 nX, nY; if( SetScale( m_pCbScale->GetText(), nX, nY ) ) { - rAttrs.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_X, nX ) ); - rAttrs.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_Y, nY ) ); + rAttrs->Put( SfxInt32Item( ATTR_OPTIONS_SCALE_X, nX ) ); + rAttrs->Put( SfxInt32Item( ATTR_OPTIONS_SCALE_Y, nY ) ); bModified = true; } diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx index 0de3e9c62ca5..bca0debb02f0 100644 --- a/sd/source/ui/inc/prntopts.hxx +++ b/sd/source/ui/inc/prntopts.hxx @@ -66,7 +66,7 @@ public: static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual bool FillItemSet( SfxItemSet& ) SAL_OVERRIDE; + virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE; void SetDrawMode(); diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx index b2d97df13848..91275a0347c1 100644 --- a/sd/source/ui/inc/tpaction.hxx +++ b/sd/source/ui/inc/tpaction.hxx @@ -103,7 +103,7 @@ public: static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual bool FillItemSet( SfxItemSet& ) SAL_OVERRIDE; + virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE; virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE; diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx index cfc9d9ebbb0d..0ae5b87e41a2 100644 --- a/sd/source/ui/inc/tpoption.hxx +++ b/sd/source/ui/inc/tpoption.hxx @@ -40,7 +40,7 @@ public: virtual ~SdTpOptionsSnap(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual bool FillItemSet( SfxItemSet& ) SAL_OVERRIDE; + virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE; }; @@ -62,7 +62,7 @@ public: virtual ~SdTpOptionsContents(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual bool FillItemSet( SfxItemSet& ) SAL_OVERRIDE; + virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE; }; @@ -135,7 +135,7 @@ public: virtual ~SdTpOptionsMisc(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual bool FillItemSet( SfxItemSet& ) SAL_OVERRIDE; + virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE; /** Hide Impress specific controls, make Draw specific controls visible |