summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/linectrl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-08-09 16:30:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-10 08:20:28 +0200
commit7fdd5a12f6d20422ebda1d3afd5e5146cadbe0e5 (patch)
tree0370d19faf39b778517b2bce6c483cc0c82a11e0 /svx/source/tbxctrls/linectrl.cxx
parentb268ef57e97e692644335afeae834205ecb73557 (diff)
unnecessary null check before dynamic_cast, in svx
Change-Id: I5174c9530d18e5d88ad8a41cc2bb02c6d090f3cf Reviewed-on: https://gerrit.libreoffice.org/58771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/tbxctrls/linectrl.cxx')
-rw-r--r--svx/source/tbxctrls/linectrl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 10ca0115120f..f26249b451dc 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -163,7 +163,7 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState )
}
}
- if ( pState && ( dynamic_cast<const SvxDashListItem*>( pState) != nullptr ) )
+ if ( auto pDashListItem = dynamic_cast<const SvxDashListItem*>( pState) )
{
// The list of line styles has changed
SvxLineBox* pBox = static_cast<SvxLineBox*>(GetToolBox().GetItemWindow( GetId() ));
@@ -173,7 +173,7 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState )
pBox->Clear();
pBox->InsertEntry( SvxResId(RID_SVXSTR_INVISIBLE) );
pBox->InsertEntry( SvxResId(RID_SVXSTR_SOLID) );
- pBox->Fill( static_cast<const SvxDashListItem*>(pState)->GetDashList() );
+ pBox->Fill( pDashListItem->GetDashList() );
pBox->SelectEntry( aString );
}
}