diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-06 10:50:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-06 15:10:51 +0100 |
commit | 31ee230b6efac9a6a60ceb5c2367ae9a5cf98929 (patch) | |
tree | c7ff6f56f5295caa88bda7ceb2036691e3db5c36 /sc/source/ui/drawfunc | |
parent | 5a242f651c8ae8d53ac67f5059f64629303848ab (diff) |
Related: tdf#94814 some cleanup of static_cast following dynamic_cast
to the same type
Change-Id: I197e88acbc30f8e8bb9e7f2d54803971df6062af
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index a0c259259b13..a09ca5dfd373 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -323,9 +323,8 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) if ( pFieldItem ) { const SvxFieldData* pField = pFieldItem->GetField(); - if( pField && dynamic_cast<const SvxURLField*>( pField) != nullptr ) + if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(pField)) { - const SvxURLField* pURLField = static_cast< const SvxURLField* >( pField ); ScGlobal::OpenURL( pURLField->GetURL(), pURLField->GetTargetFrame() ); } } @@ -391,9 +390,8 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) if (pFieldItem) { const SvxFieldData* pField = pFieldItem->GetField(); - if ( pField && dynamic_cast<const SvxURLField*>( pField) != nullptr ) + if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(pField)) { - const SvxURLField* pURLField = static_cast<const SvxURLField*>(pField); aHLinkItem.SetName( pURLField->GetRepresentation() ); aHLinkItem.SetURL( pURLField->GetURL() ); aHLinkItem.SetTargetFrame( pURLField->GetTargetFrame() ); |