diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-28 12:01:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-01 07:49:28 +0100 |
commit | e85b482df3fa01e5a2b549df63db96cc49f1ca78 (patch) | |
tree | cdeda4bcdcb113f980852bb409648ff2b00e2d9d /cui/source/tabpages/backgrnd.cxx | |
parent | 51b995b9861c3415c44f59fa5367347fd7eee255 (diff) |
use SfxItemSet::GetItemIfSet in cui
Change-Id: I0a6dbf50d29adf9da9512a9136709bf563e478f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130689
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/tabpages/backgrnd.cxx')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 6b9d906ec907..f1c0765fa70e 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -118,10 +118,9 @@ void SvxBkgTabPage::Reset( const SfxItemSet* ) if ( m_xTblLBox && m_xTblLBox->get_visible() ) { m_nActPos = -1; - const SfxPoolItem* pItem; - if ( SfxItemState::SET == m_pResetSet->GetItemState( SID_BACKGRND_DESTINATION, false, &pItem ) ) + if ( const SfxUInt16Item* pDestItem = m_pResetSet->GetItemIfSet( SID_BACKGRND_DESTINATION, false ) ) { - sal_uInt16 nDestValue = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); + sal_uInt16 nDestValue = pDestItem->GetValue(); m_xTblLBox->set_active( nDestValue ); TblDestinationHdl_Impl( *m_xTblLBox ); } |