summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-11 10:35:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-11 10:39:03 +0200
commita92e973b6d0a9ad87fe014442e1678af2ce0c7d0 (patch)
treeb39139c7992a853cc5e4d836fc35cd45c01a3f6d /sd
parent88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e (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 'sd')
-rw-r--r--sd/source/ui/dlg/paragr.cxx12
-rw-r--r--sd/source/ui/dlg/prntopts.cxx4
-rw-r--r--sd/source/ui/dlg/tpaction.cxx10
-rw-r--r--sd/source/ui/dlg/tpoption.cxx32
-rw-r--r--sd/source/ui/inc/prntopts.hxx2
-rw-r--r--sd/source/ui/inc/tpaction.hxx2
-rw-r--r--sd/source/ui/inc/tpoption.hxx6
7 files changed, 34 insertions, 34 deletions
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index d438f3f75cdc..c6642099c98c 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -44,7 +44,7 @@ public:
static const sal_uInt16* GetRanges();
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
- virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
+ virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
private:
TriStateBox* m_pNewStartCB;
@@ -108,12 +108,12 @@ bool SdParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
return mbModified;
}
-void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet )
+void SdParagraphNumTabPage::Reset( const SfxItemSet* rSet )
{
- SfxItemState eItemState = rSet.GetItemState( ATTR_NUMBER_NEWSTART );
+ SfxItemState eItemState = rSet->GetItemState( ATTR_NUMBER_NEWSTART );
if(eItemState > SFX_ITEM_AVAILABLE )
{
- const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(ATTR_NUMBER_NEWSTART);
+ const SfxBoolItem& rStart = (const SfxBoolItem&)rSet->Get(ATTR_NUMBER_NEWSTART);
m_pNewStartCB->SetState( rStart.GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pNewStartCB->EnableTriState(false);
}
@@ -124,10 +124,10 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet )
}
m_pNewStartCB->SaveValue();
- eItemState = rSet.GetItemState( ATTR_NUMBER_NEWSTART_AT);
+ eItemState = rSet->GetItemState( ATTR_NUMBER_NEWSTART_AT);
if( eItemState > SFX_ITEM_AVAILABLE )
{
- sal_Int16 nNewStart = ((const SfxInt16Item&)rSet.Get(ATTR_NUMBER_NEWSTART_AT)).GetValue();
+ sal_Int16 nNewStart = ((const SfxInt16Item&)rSet->Get(ATTR_NUMBER_NEWSTART_AT)).GetValue();
m_pNewStartNumberCB->Check(-1 != nNewStart);
if(-1 == nNewStart)
nNewStart = 1;
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index 9a0167324a1f..e54400c1dac2 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -133,10 +133,10 @@ bool SdPrintOptions::FillItemSet( SfxItemSet* rAttrs )
-void SdPrintOptions::Reset( const SfxItemSet& rAttrs )
+void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
{
const SdOptionsPrintItem* pPrintOpts = NULL;
- if( SFX_ITEM_SET == rAttrs.GetItemState( ATTR_OPTIONS_PRINT, false,
+ if( SFX_ITEM_SET == rAttrs->GetItemState( ATTR_OPTIONS_PRINT, false,
(const SfxPoolItem**) &pPrintOpts ) )
{
m_pCbxDraw->Check( pPrintOpts->GetOptionsPrint().IsDraw() );
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index f08751c5363a..2c4084aca333 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -310,15 +310,15 @@ bool SdTPAction::FillItemSet( SfxItemSet* rAttrs )
-void SdTPAction::Reset( const SfxItemSet& rAttrs )
+void SdTPAction::Reset( const SfxItemSet* rAttrs )
{
presentation::ClickAction eCA = presentation::ClickAction_NONE;
OUString aFileName;
// m_pLbAction
- if( rAttrs.GetItemState( ATTR_ACTION ) != SFX_ITEM_DONTCARE )
+ if( rAttrs->GetItemState( ATTR_ACTION ) != SFX_ITEM_DONTCARE )
{
- eCA = (presentation::ClickAction) ( ( const SfxAllEnumItem& ) rAttrs.
+ eCA = (presentation::ClickAction) ( ( const SfxAllEnumItem& ) rAttrs->
Get( ATTR_ACTION ) ).GetValue();
SetActualClickAction( eCA );
}
@@ -326,9 +326,9 @@ void SdTPAction::Reset( const SfxItemSet& rAttrs )
m_pLbAction->SetNoSelection();
// m_pEdtSound
- if( rAttrs.GetItemState( ATTR_ACTION_FILENAME ) != SFX_ITEM_DONTCARE )
+ if( rAttrs->GetItemState( ATTR_ACTION_FILENAME ) != SFX_ITEM_DONTCARE )
{
- aFileName = ( ( const SfxStringItem& ) rAttrs.Get( ATTR_ACTION_FILENAME ) ).GetValue();
+ aFileName = ( ( const SfxStringItem& ) rAttrs->Get( ATTR_ACTION_FILENAME ) ).GetValue();
SetEditText( aFileName );
}
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 8cdbfbc55c58..44aced815aeb 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -84,11 +84,11 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
-void SdTpOptionsSnap::Reset( const SfxItemSet& rAttrs )
+void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
{
SvxGridTabPage::Reset(rAttrs);
- SdOptionsSnapItem aOptsItem( (const SdOptionsSnapItem&) rAttrs.
+ SdOptionsSnapItem aOptsItem( (const SdOptionsSnapItem&) rAttrs->
Get( ATTR_OPTIONS_SNAP ) );
pCbxSnapHelplines->Check( aOptsItem.GetOptionsSnap().IsSnapHelplines() );
@@ -160,12 +160,12 @@ bool SdTpOptionsContents::FillItemSet( SfxItemSet* rAttrs )
-void SdTpOptionsContents::Reset( const SfxItemSet& rAttrs )
+void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs )
{
- SdOptionsContentsItem aOptsItem( (const SdOptionsContentsItem&) rAttrs.
+ SdOptionsContentsItem aOptsItem( (const SdOptionsContentsItem&) rAttrs->
Get( ATTR_OPTIONS_CONTENTS ) );
- SdOptionsLayoutItem aLayoutItem( (const SdOptionsLayoutItem&) rAttrs.
+ SdOptionsLayoutItem aLayoutItem( (const SdOptionsLayoutItem&) rAttrs->
Get( ATTR_OPTIONS_LAYOUT ) );
m_pCbxRuler->Check( aLayoutItem.GetOptionsLayout().IsRulerVisible() );
@@ -433,9 +433,9 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs )
-void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
+void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
{
- SdOptionsMiscItem aOptsItem( (const SdOptionsMiscItem&) rAttrs.
+ SdOptionsMiscItem aOptsItem( (const SdOptionsMiscItem&) rAttrs->
Get( ATTR_OPTIONS_MISC ) );
m_pCbxStartWithTemplate->Check( aOptsItem.GetOptionsMisc().IsStartWithTemplate() );
@@ -464,9 +464,9 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC );
m_pLbMetric->SetNoSelection();
- if ( rAttrs.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ if ( rAttrs->GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
{
- const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich );
+ const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs->Get( nWhich );
long nFieldUnit = (long)rItem.GetValue();
for ( sal_Int32 i = 0; i < m_pLbMetric->GetEntryCount(); ++i )
@@ -481,22 +481,22 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
// tabulator space
nWhich = GetWhich( SID_ATTR_DEFTABSTOP );
- if( rAttrs.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ if( rAttrs->GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
{
- SfxMapUnit eUnit = rAttrs.GetPool()->GetMetric( nWhich );
- const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich );
+ SfxMapUnit eUnit = rAttrs->GetPool()->GetMetric( nWhich );
+ const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs->Get( nWhich );
SetMetricValue( *m_pMtrFldTabstop, rItem.GetValue(), eUnit );
}
m_pLbMetric->SaveValue();
m_pMtrFldTabstop->SaveValue();
//Scale
- sal_Int32 nX = ( (const SfxInt32Item&) rAttrs.
+ sal_Int32 nX = ( (const SfxInt32Item&) rAttrs->
Get( ATTR_OPTIONS_SCALE_X ) ).GetValue();
- sal_Int32 nY = ( (const SfxInt32Item&) rAttrs.
+ sal_Int32 nY = ( (const SfxInt32Item&) rAttrs->
Get( ATTR_OPTIONS_SCALE_Y ) ).GetValue();
- nWidth = ( (const SfxUInt32Item&) rAttrs.
+ nWidth = ( (const SfxUInt32Item&) rAttrs->
Get( ATTR_OPTIONS_SCALE_WIDTH ) ).GetValue();
- nHeight = ( (const SfxUInt32Item&) rAttrs.
+ nHeight = ( (const SfxUInt32Item&) rAttrs->
Get( ATTR_OPTIONS_SCALE_HEIGHT ) ).GetValue();
m_pCbScale->SetText( GetScale( nX, nY ) );
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index bca0debb02f0..550a0a4efc36 100644
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -67,7 +67,7 @@ public:
static SfxTabPage* Create( Window*, const SfxItemSet& );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
- virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE;
+ virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
void SetDrawMode();
virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index 91275a0347c1..4839b2090987 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -104,7 +104,7 @@ public:
static SfxTabPage* Create( Window*, const SfxItemSet& );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
- virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE;
+ virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
virtual int DeactivatePage( SfxItemSet* pSet ) SAL_OVERRIDE;
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 0ae5b87e41a2..f94b06a99483 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -41,7 +41,7 @@ public:
static SfxTabPage* Create( Window*, const SfxItemSet& );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
- virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE;
+ virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
};
@@ -63,7 +63,7 @@ public:
static SfxTabPage* Create( Window*, const SfxItemSet& );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
- virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE;
+ virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
};
/**
@@ -136,7 +136,7 @@ public:
static SfxTabPage* Create( Window*, const SfxItemSet& );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
- virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE;
+ virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
/** Hide Impress specific controls, make Draw specific controls visible
and arrange the visible controls. Do not call this method or the