diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-11 10:35:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-11 10:39:03 +0200 |
commit | a92e973b6d0a9ad87fe014442e1678af2ce0c7d0 (patch) | |
tree | b39139c7992a853cc5e4d836fc35cd45c01a3f6d /svx/source | |
parent | 88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e (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 'svx/source')
-rw-r--r-- | svx/source/dialog/hdft.cxx | 14 | ||||
-rw-r--r-- | svx/source/dialog/optgrid.cxx | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 99ddba702096..dd67155f5233 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -319,10 +319,10 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet ) } -void SvxHFPage::Reset( const SfxItemSet& rSet ) +void SvxHFPage::Reset( const SfxItemSet* rSet ) { - ActivatePage( rSet ); - ResetBackground_Impl( rSet ); + ActivatePage( *rSet ); + ResetBackground_Impl( *rSet ); SfxItemPool* pPool = GetItemSet().GetPool(); DBG_ASSERT( pPool, "Where is the pool" ); @@ -330,8 +330,8 @@ void SvxHFPage::Reset( const SfxItemSet& rSet ) //hide "same content on first page when this is calc bool bIsCalc = false; - const SfxPoolItem* pExt1 = GetItem(rSet, SID_ATTR_PAGE_EXT1); - const SfxPoolItem* pExt2 = GetItem(rSet, SID_ATTR_PAGE_EXT2); + const SfxPoolItem* pExt1 = GetItem(*rSet, SID_ATTR_PAGE_EXT1); + const SfxPoolItem* pExt2 = GetItem(*rSet, SID_ATTR_PAGE_EXT2); if (pExt1 && pExt1->ISA(SfxBoolItem) && pExt2 && pExt2->ISA(SfxBoolItem)) bIsCalc = true; m_pCntSharedFirstBox->Show(!bIsCalc); @@ -339,7 +339,7 @@ void SvxHFPage::Reset( const SfxItemSet& rSet ) // Evaluate header-/footer- attributes const SvxSetItem* pSetItem = 0; - if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich(nId), false, + if ( SFX_ITEM_SET == rSet->GetItemState( GetWhich(nId), false, (const SfxPoolItem**)&pSetItem ) ) { const SfxItemSet& rHeaderSet = pSetItem->GetItemSet(); @@ -423,7 +423,7 @@ void SvxHFPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem = 0; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem) || + if(SFX_ITEM_SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 2ab8df62cd36..86cbc461809b 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -218,11 +218,11 @@ bool SvxGridTabPage::FillItemSet( SfxItemSet* rCoreSet ) -void SvxGridTabPage::Reset( const SfxItemSet& rSet ) +void SvxGridTabPage::Reset( const SfxItemSet* rSet ) { const SfxPoolItem* pAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS , false, + if( SFX_ITEM_SET == rSet->GetItemState( SID_ATTR_GRID_OPTIONS , false, (const SfxPoolItem**)&pAttr )) { const SvxGridItem* pGridAttr = (SvxGridItem*)pAttr; @@ -231,7 +231,7 @@ void SvxGridTabPage::Reset( const SfxItemSet& rSet ) pCbxGridVisible->Check( pGridAttr->bGridVisible ); SfxMapUnit eUnit = - rSet.GetPool()->GetMetric( GetWhich( SID_ATTR_GRID_OPTIONS ) ); + rSet->GetPool()->GetMetric( GetWhich( SID_ATTR_GRID_OPTIONS ) ); SetMetricValue( *pMtrFldDrawX , pGridAttr->nFldDrawX, eUnit ); SetMetricValue( *pMtrFldDrawY , pGridAttr->nFldDrawY, eUnit ); |