summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/tpoption.cxx
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/source/ui/dlg/tpoption.cxx
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/source/ui/dlg/tpoption.cxx')
-rw-r--r--sd/source/ui/dlg/tpoption.cxx32
1 files changed, 16 insertions, 16 deletions
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 ) );