diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-03 16:42:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-06 06:00:38 +0000 |
commit | 7139563afe073b0e4e819fdaf7fe285e597f4c5f (patch) | |
tree | 927396085af6961ae7fbe7f3bb5f2821a5c35f0e /editeng/source/uno | |
parent | aadf790bbceb1cde94c2a6fe8edfb9951edca0a0 (diff) |
make use of the SfxItemSet::GetItem<T> method
Change-Id: I8201429993129b019a6dd51c203a9f8dcbb2253e
Reviewed-on: https://gerrit.libreoffice.org/34867
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/uno')
-rw-r--r-- | editeng/source/uno/unotext.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 70df9b115bf1..99f8884d951c 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -634,7 +634,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM case EE_FEATURE_FIELD: if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET ) { - const SvxFieldItem* pItem = static_cast<const SvxFieldItem*>(rSet.GetItem( EE_FEATURE_FIELD )); + const SvxFieldItem* pItem = rSet.GetItem<SvxFieldItem>( EE_FEATURE_FIELD ); const SvxFieldData* pData = pItem->GetField(); uno::Reference< text::XTextRange > xAnchor( this ); @@ -690,7 +690,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxIt if( eState != SfxItemState::SET && eState != SfxItemState::DEFAULT) throw uno::RuntimeException(); - const SvxNumBulletItem* pBulletItem = static_cast<const SvxNumBulletItem*>(rSet.GetItem( EE_PARA_NUMBULLET )); + const SvxNumBulletItem* pBulletItem = rSet.GetItem<SvxNumBulletItem>( EE_PARA_NUMBULLET ); if( pBulletItem == nullptr ) throw uno::RuntimeException(); @@ -731,7 +731,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxIt SfxItemState eState = rSet.GetItemState( EE_PARA_BULLETSTATE ); if( eState == SfxItemState::SET || eState == SfxItemState::DEFAULT ) { - const SfxBoolItem* pItem = static_cast<const SfxBoolItem*>(rSet.GetItem( EE_PARA_BULLETSTATE )); + const SfxBoolItem* pItem = rSet.GetItem<SfxBoolItem>( EE_PARA_BULLETSTATE ); bState = pItem->GetValue(); } |