summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg
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 /sc/source/ui/optdlg
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 'sc/source/ui/optdlg')
-rw-r--r--sc/source/ui/optdlg/opredlin.cxx2
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx2
-rw-r--r--sc/source/ui/optdlg/tpcompatibility.cxx4
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx4
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx4
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx6
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx6
-rw-r--r--sc/source/ui/optdlg/tpview.cxx34
8 files changed, 31 insertions, 31 deletions
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 9caa442e2edf..7bf8636ffbc6 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -128,7 +128,7 @@ bool ScRedlineOptionsTabPage::FillItemSet( SfxItemSet* /* rSet */ )
return false;
}
-void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
+void ScRedlineOptionsTabPage::Reset( const SfxItemSet* /* rSet */ )
{
m_pContentColorLB->InsertEntry(aAuthorStr);
m_pMoveColorLB->InsertEntry(aAuthorStr);
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index cff06b6995c7..27337df0a914 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -84,7 +84,7 @@ SfxTabPage* ScTpCalcOptions::Create( Window* pParent, const SfxItemSet& rAttrSet
return ( new ScTpCalcOptions( pParent, rAttrSet ) );
}
-void ScTpCalcOptions::Reset( const SfxItemSet& /* rCoreAttrs */ )
+void ScTpCalcOptions::Reset( const SfxItemSet* /* rCoreAttrs */ )
{
sal_uInt16 d,m,y;
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
index 2c6dfdf1d6a1..709faaddc696 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -43,10 +43,10 @@ bool ScTpCompatOptions::FillItemSet(SfxItemSet *rCoreAttrs)
return bRet;
}
-void ScTpCompatOptions::Reset(const SfxItemSet &rCoreAttrs)
+void ScTpCompatOptions::Reset(const SfxItemSet *rCoreAttrs)
{
const SfxPoolItem* pItem;
- if (rCoreAttrs.HasItem(SID_SC_OPT_KEY_BINDING_COMPAT, &pItem))
+ if (rCoreAttrs->HasItem(SID_SC_OPT_KEY_BINDING_COMPAT, &pItem))
{
const SfxUInt16Item* p16Item = static_cast<const SfxUInt16Item*>(pItem);
ScOptionsUtil::KeyBindingType eKeyB =
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index f68ee2f79046..a20f1c21e24b 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -60,12 +60,12 @@ bool ScTpDefaultsOptions::FillItemSet(SfxItemSet *rCoreSet)
return bRet;
}
-void ScTpDefaultsOptions::Reset(const SfxItemSet& rCoreSet)
+void ScTpDefaultsOptions::Reset(const SfxItemSet* rCoreSet)
{
ScDefaultsOptions aOpt;
const SfxPoolItem* pItem = NULL;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCDEFAULTSOPTIONS, false , &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SCDEFAULTSOPTIONS, false , &pItem))
aOpt = ((const ScTpDefaultsItem*)pItem)->GetDefaultsOptions();
m_pEdNSheets->SetValue( static_cast<sal_uInt16>( aOpt.GetInitTabCount()) );
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 587928018961..b2aaff2aa24c 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -285,12 +285,12 @@ bool ScTpFormulaOptions::FillItemSet(SfxItemSet* rCoreSet)
return bRet;
}
-void ScTpFormulaOptions::Reset(const SfxItemSet& rCoreSet)
+void ScTpFormulaOptions::Reset(const SfxItemSet* rCoreSet)
{
ScFormulaOptions aOpt;
const SfxPoolItem* pItem = NULL;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCFORMULAOPTIONS, false , &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SCFORMULAOPTIONS, false , &pItem))
aOpt = ((const ScTpFormulaItem*)pItem)->GetFormulaOptions();
// formula grammar.
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index eb49658e800d..f96e88b3fcb9 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -57,12 +57,12 @@ int ScTpPrintOptions::DeactivatePage( SfxItemSet* pSetP )
return LEAVE_PAGE;
}
-void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
+void ScTpPrintOptions::Reset( const SfxItemSet* rCoreSet )
{
ScPrintOptions aOptions;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCPRINTOPTIONS, false , &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SCPRINTOPTIONS, false , &pItem))
aOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions();
else
{
@@ -70,7 +70,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
aOptions = SC_MOD()->GetPrintOptions();
}
- if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) )
+ if ( SFX_ITEM_SET == rCoreSet->GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) )
{
bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue();
m_pSelectedSheetsCB->Check( bChecked );
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 06abb7ae9d53..dd8bb5070793 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -81,7 +81,7 @@ ScTpUserLists::ScTpUserLists( Window* pParent,
SetExchangeSupport();
Init();
- Reset(rCoreAttrs);
+ Reset(&rCoreAttrs);
}
ScTpUserLists::~ScTpUserLists()
@@ -142,10 +142,10 @@ SfxTabPage* ScTpUserLists::Create( Window* pParent, const SfxItemSet& rAttrSet )
return ( new ScTpUserLists( pParent, rAttrSet ) );
}
-void ScTpUserLists::Reset( const SfxItemSet& rCoreAttrs )
+void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
{
const ScUserListItem& rUserListItem = (const ScUserListItem&)
- rCoreAttrs.Get( nWhichUserLists );
+ rCoreAttrs->Get( nWhichUserLists );
const ScUserList* pCoreList = rUserListItem.GetUserList();
OSL_ENSURE( pCoreList, "UserList not found :-/" );
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 2bf7d4d62f28..1c0b23a862e7 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -148,10 +148,10 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
return bRet;
}
-void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
+void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet )
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCVIEWOPTIONS, false , &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SCVIEWOPTIONS, false , &pItem))
pLocalOptions = new ScViewOptions(
((const ScTpViewItem*)pItem)->GetViewOptions() );
else
@@ -178,9 +178,9 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet )
pBreakCB->Check( pLocalOptions->GetOption(VOPT_PAGEBREAKS) );
pGuideLineCB->Check( pLocalOptions->GetOption(VOPT_HELPLINES) );
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_RANGEFINDER, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_RANGEFINDER, false, &pItem))
pRangeFindCB->Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_OPT_SYNCZOOM, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_OPT_SYNCZOOM, false, &pItem))
pSyncZoomCB->Check(((const SfxBoolItem*)pItem)->GetValue());
pRangeFindCB->SaveValue();
@@ -521,12 +521,12 @@ bool ScTpLayoutOptions::FillItemSet( SfxItemSet* rCoreSet )
return bRet;
}
-void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
+void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet )
{
m_pUnitLB->SetNoSelection();
- if ( rCoreSet.GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_AVAILABLE )
+ if ( rCoreSet->GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_AVAILABLE )
{
- const SfxUInt16Item& rItem = (SfxUInt16Item&)rCoreSet.Get( SID_ATTR_METRIC );
+ const SfxUInt16Item& rItem = (SfxUInt16Item&)rCoreSet->Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
for ( sal_Int32 i = 0; i < m_pUnitLB->GetEntryCount(); ++i )
@@ -542,7 +542,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
m_pUnitLB->SaveValue();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem))
m_pTabMF->SetValue(m_pTabMF->Normalize(((SfxUInt16Item*)pItem)->GetValue()), FUNIT_TWIP);
m_pTabMF->SaveValue();
@@ -572,32 +572,32 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
// added to avoid warnings
}
}
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTION, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_SELECTION, false, &pItem))
m_pAlignCB->Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTIONPOS, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_SELECTIONPOS, false, &pItem))
m_pAlignLB->SelectEntryPos(((const SfxUInt16Item*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_EDITMODE, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_EDITMODE, false, &pItem))
m_pEditModeCB->Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_FMT_EXPAND, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_FMT_EXPAND, false, &pItem))
m_pFormatCB->Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_REF_EXPAND, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_REF_EXPAND, false, &pItem))
m_pExpRefCB->Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_MARK_HEADER, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_MARK_HEADER, false, &pItem))
m_pMarkHdrCB->Check(((const SfxBoolItem*)pItem)->GetValue());
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_TEXTWYSIWYG, false, &pItem))
+ if(SFX_ITEM_SET == rCoreSet->GetItemState(SID_SC_INPUT_TEXTWYSIWYG, false, &pItem))
m_pTextFmtCB->Check(((const SfxBoolItem*)pItem)->GetValue());
- if( SFX_ITEM_SET == rCoreSet.GetItemState( SID_SC_INPUT_REPLCELLSWARN, false, &pItem ) )
+ if( SFX_ITEM_SET == rCoreSet->GetItemState( SID_SC_INPUT_REPLCELLSWARN, false, &pItem ) )
m_pReplWarnCB->Check( ( (const SfxBoolItem*)pItem)->GetValue() );
- if( SFX_ITEM_SET == rCoreSet.GetItemState( SID_SC_INPUT_LEGACY_CELL_SELECTION, false, &pItem ) )
+ if( SFX_ITEM_SET == rCoreSet->GetItemState( SID_SC_INPUT_LEGACY_CELL_SELECTION, false, &pItem ) )
m_pLegacyCellSelectionCB->Check( ( (const SfxBoolItem*)pItem)->GetValue() );