diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-20 20:51:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-10-21 15:44:11 +0200 |
commit | ead920a48aa8c35075fdb980b9d213ff1c580dd1 (patch) | |
tree | bb1628fd293f03b22920bc74e89657320da6442e /svtools | |
parent | fe5b70723fc83f229fb4b41231a663a8700f48c4 (diff) |
loplugin:redundantcast handle dynamic_cast
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb
Reviewed-on: https://gerrit.libreoffice.org/43621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index beaeb7a7beeb..46286451c11c 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3413,20 +3413,13 @@ void SvTreeListBox::ModelNotification( SvListAction nActionId, SvTreeListEntry* { case SvListAction::INSERTED: { - SvTreeListEntry* pEntry( dynamic_cast< SvTreeListEntry* >( pEntry1 ) ); - if ( !pEntry ) - { - SAL_WARN( "svtools.contnr", "SvTreeListBox::ModelNotification: invalid entry!" ); - break; - } - - SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry->GetFirstItem( SvLBoxItemType::ContextBmp ) ); + SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry1->GetFirstItem( SvLBoxItemType::ContextBmp ) ); if ( !pBmpItem ) break; const Image& rBitmap1( pBmpItem->GetBitmap1() ); const Image& rBitmap2( pBmpItem->GetBitmap2() ); short nMaxWidth = short( std::max( rBitmap1.GetSizePixel().Width(), rBitmap2.GetSizePixel().Width() ) ); - nMaxWidth = pImpl->UpdateContextBmpWidthVector( pEntry, nMaxWidth ); + nMaxWidth = pImpl->UpdateContextBmpWidthVector( pEntry1, nMaxWidth ); if( nMaxWidth > nContextBmpWidthMax ) { nContextBmpWidthMax = nMaxWidth; |