From 7139563afe073b0e4e819fdaf7fe285e597f4c5f Mon Sep 17 00:00:00 2001 From: Noel Grandin <noel.grandin@collabora.co.uk> Date: Fri, 3 Mar 2017 16:42:37 +0200 Subject: 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> --- editeng/source/uno/unotext.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editeng/source/uno') 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(); } -- cgit