diff options
Diffstat (limited to 'sc/source/ui/drawfunc/drtxtob.cxx')
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 065f08bdcdbd..3e8a7f975f23 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -218,9 +218,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) if ( pItem ) { aString = static_cast<const SfxStringItem*>(pItem)->GetValue(); - const SfxPoolItem* pFtItem = nullptr; - pArgs->GetItemState( SID_ATTR_SPECIALCHAR, false, &pFtItem); - const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem ); + const SfxStringItem* pFontItem = pArgs->GetItemIfSet( SID_ATTR_SPECIALCHAR, false); if ( pFontItem ) { const OUString& aFontName(pFontItem->GetValue()); @@ -262,10 +260,8 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) case SID_HYPERLINK_SETLINK: if( pReqArgs ) { - const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, true, &pItem ) == SfxItemState::SET ) + if ( const SvxHyperlinkItem* pHyper = pReqArgs->GetItemIfSet( SID_HYPERLINK_SETLINK) ) { - const SvxHyperlinkItem* pHyper = static_cast<const SvxHyperlinkItem*>(pItem); const OUString& rName = pHyper->GetName(); const OUString& rURL = pHyper->GetURL(); const OUString& rTarget = pHyper->GetTargetFrame(); |