summaryrefslogtreecommitdiff
path: root/sw/source/ui/chrdlg
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 /sw/source/ui/chrdlg
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 'sw/source/ui/chrdlg')
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx6
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx4
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx22
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx2
4 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 8797e1ca133c..bd03f177cfc0 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -188,10 +188,10 @@ SwCharURLPage::~SwCharURLPage()
delete pINetItem;
}
-void SwCharURLPage::Reset(const SfxItemSet& rSet)
+void SwCharURLPage::Reset(const SfxItemSet* rSet)
{
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_TXTATR_INETFMT, false, &pItem ) )
+ if ( SFX_ITEM_SET == rSet->GetItemState( RES_TXTATR_INETFMT, false, &pItem ) )
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*) pItem;
m_pURLED->SetText(INetURLObject::decode(pINetFmt->GetValue(),
@@ -225,7 +225,7 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
if( pINetFmt->GetMacroTbl() )
pINetItem->SetMacroTable( *pINetFmt->GetMacroTbl() );
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, false, &pItem))
+ if(SFX_ITEM_SET == rSet->GetItemState(FN_PARAM_SELECTION, false, &pItem))
{
m_pTextED->SetText(((const SfxStringItem*)pItem)->GetValue());
m_pTextFT->Enable( false );
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index adf11c0a13af..8b986aee7b44 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -588,10 +588,10 @@ bool SwDropCapsPage::FillItemSet(SfxItemSet *rSet)
return bModified;
}
-void SwDropCapsPage::Reset(const SfxItemSet &rSet)
+void SwDropCapsPage::Reset(const SfxItemSet *rSet)
{
// Characters, lines, gap and text
- SwFmtDrop aFmtDrop((SwFmtDrop &) rSet.Get(RES_PARATR_DROP));
+ SwFmtDrop aFmtDrop((SwFmtDrop &) rSet->Get(RES_PARATR_DROP));
if (aFmtDrop.GetLines() > 1)
{
m_pDropCapsField->SetValue(aFmtDrop.GetChars());
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 8dfdcb9b8b92..b4bcde7e5776 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -158,16 +158,16 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
return bModified;
}
-void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
+void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet )
{
bool bHasNumberStyle = false;
- SfxItemState eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) );
+ SfxItemState eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) );
sal_Int16 nOutlineLv;
if( eItemState >= SFX_ITEM_AVAILABLE )
{
- nOutlineLv = ((const SfxUInt16Item &)rSet.Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue();
+ nOutlineLv = ((const SfxUInt16Item &)rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue();
m_pOutlineLvLB->SelectEntryPos( nOutlineLv ) ;
}
else
@@ -176,11 +176,11 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
}
m_pOutlineLvLB->SaveValue();
- eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_NUMRULE) );
+ eItemState = rSet->GetItemState( GetWhich(SID_ATTR_PARA_NUMRULE) );
if( eItemState >= SFX_ITEM_AVAILABLE )
{
- OUString aStyle = ((const SfxStringItem &)rSet.Get( GetWhich(SID_ATTR_PARA_NUMRULE) )).GetValue();
+ OUString aStyle = ((const SfxStringItem &)rSet->Get( GetWhich(SID_ATTR_PARA_NUMRULE) )).GetValue();
if(aStyle.isEmpty())
aStyle = m_pNumberStyleLB->GetEntry(0);
@@ -203,11 +203,11 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
m_pNumberStyleLB->SaveValue();
- eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART );
+ eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART );
if(eItemState > SFX_ITEM_AVAILABLE )
{
bCurNumrule = true;
- const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART);
+ const SfxBoolItem& rStart = (const SfxBoolItem&)rSet->Get(FN_NUMBER_NEWSTART);
m_pNewStartCB->SetState(rStart.GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
@@ -218,10 +218,10 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
m_pNewStartCB->SaveValue();
- eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT);
+ eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART_AT);
if( eItemState > SFX_ITEM_AVAILABLE )
{
- const sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ const sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
const bool bNotMax = USHRT_MAX != nNewStart;
m_pNewStartNumberCB->Check(bNotMax);
m_pNewStartNF->SetValue(bNotMax ? nNewStart : 1);
@@ -233,9 +233,9 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
m_pNewStartNF->SaveValue();
m_pNewStartNumberCB->SaveValue();
StyleHdl_Impl(m_pNumberStyleLB);
- if( SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_LINENUMBER))
+ if( SFX_ITEM_AVAILABLE <= rSet->GetItemState(RES_LINENUMBER))
{
- SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet.Get(RES_LINENUMBER);
+ SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet->Get(RES_LINENUMBER);
sal_uLong nStartValue = rNum.GetStartValue();
bool bCount = rNum.IsCount();
m_pCountParaCB->SetState( bCount ? TRISTATE_TRUE : TRISTATE_FALSE );
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index da29f85c9c8c..0f80203c7dc2 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -155,7 +155,7 @@ bool SwCondCollPage::FillItemSet(SfxItemSet *rSet)
return bModified;
}
-void SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
+void SwCondCollPage::Reset(const SfxItemSet */*rSet*/)
{
if(bNewTemplate)
m_pConditionCB->Enable();