diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-22 15:55:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-30 08:50:31 +0200 |
commit | 2ccde70d60d3a5074faf49260e8fe0ccdb91ff26 (patch) | |
tree | 82555c2aac7ca37c30e1084a7a8069c71fc11fbc /framework/source/layoutmanager | |
parent | 61ff1d919e317947c769e61eeda7f1bb8132f273 (diff) |
teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/layoutmanager')
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index a897906009fb..9ef5503210fa 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -182,7 +182,7 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl { // Left docking area window // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! - sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); + sal_Int32 nHeight = std::max<sal_Int32>( 0, nLeftRightDockingAreaHeight ); xLeftDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, awt::PosSize::POSSIZE ); xLeftDockAreaWindow->setVisible( true ); @@ -191,8 +191,8 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl { // Right docking area window // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority! - sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width )); - sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight )); + sal_Int32 nLeftPos = std::max<sal_Int32>( 0, aContainerClientSize.Width - rBorderSpace.Width ); + sal_Int32 nHeight = std::max<sal_Int32>( 0, nLeftRightDockingAreaHeight ); sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width; xRightDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, awt::PosSize::POSSIZE ); @@ -2921,12 +2921,12 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( } else { - sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), sal_Int32( nMaxLeftRightDockAreaSize )); - sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); + sal_Int32 nMaxDockingAreaHeight = std::max<sal_Int32>( 0, nMaxLeftRightDockAreaSize ); + sal_Int32 nPosY( std::max<sal_Int32>( aTrackingRect.Top(), nTopDockingAreaSize )); if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) nPosY = std::min( nPosY, - std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), - sal_Int32( nTopDockingAreaSize ))); + std::max<sal_Int32>( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() ), + nTopDockingAreaSize )); sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast<sal_Int32>(aTrackingRect.getHeight()) ); sal_Int32 nDockWidth = std::max( static_cast<sal_Int32>(aDockingAreaRect.getWidth()), sal_Int32( 0 )); @@ -3051,14 +3051,13 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d } else { - sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), - sal_Int32( nMaxLeftRightDockAreaSize )); + sal_Int32 nMaxDockingAreaHeight = std::max<sal_Int32>( 0, nMaxLeftRightDockAreaSize ); - sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize ))); + sal_Int32 nPosY( std::max<sal_Int32>( aTrackingRect.Top(), nTopDockingAreaSize )); if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight )) nPosY = std::min( nPosY, - std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )), - sal_Int32( nTopDockingAreaSize ))); + std::max<sal_Int32>( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() ), + nTopDockingAreaSize )); sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast<sal_Int32>(aTrackingRect.getHeight()) ); |