summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-07 09:08:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-07 12:16:13 +0000
commitbe8b9b4d29abb951aea0ea195541143d256954dc (patch)
treef35cddad2b45e189b23d881cb7c194845eb5c933 /sd/source
parent7d98edfa4955ab6280655a9678d6a913845fa2f3 (diff)
loplugin:redundantcast find cstyle arithmetic casts
Change-Id: If7c259f0d12a41182f476ddb558f7cb5f76f9577 Reviewed-on: https://gerrit.libreoffice.org/36253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/view/drtxtob1.cxx8
-rw-r--r--sd/source/ui/view/drviewse.cxx4
-rw-r--r--sd/source/ui/view/outlnvs2.cxx4
-rw-r--r--sd/source/ui/view/viewshel.cxx4
4 files changed, 10 insertions, 10 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 6f88b159c6ac..9a084422fc29 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -162,7 +162,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
else
{
nUpper -= 100;
- nUpper = std::max( (long) nUpper, 0L );
+ nUpper = std::max<long>( nUpper, 0 );
}
pNewItem->SetUpper( (sal_uInt16) nUpper );
@@ -172,7 +172,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
else
{
nLower -= 100;
- nLower = std::max( (long) nLower, 0L );
+ nLower = std::max<long>( nLower, 0 );
}
pNewItem->SetLower( (sal_uInt16) nLower );
@@ -203,7 +203,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
else
{
nUpper -= 100;
- nUpper = std::max( (long) nUpper, 0L );
+ nUpper = std::max<long>( nUpper, 0 );
}
pNewItem->SetUpper( (sal_uInt16) nUpper );
@@ -213,7 +213,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
else
{
nLower -= 100;
- nLower = std::max( (long) nLower, 0L );
+ nLower = std::max<long>( nLower, 0 );
}
pNewItem->SetLower( (sal_uInt16) nLower );
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 0c9eb63b06a7..7cd022d38ea1 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1136,7 +1136,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_ZOOM_IN: // BASIC
{
mbZoomOnPage = false;
- SetZoom( std::max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) );
+ SetZoom( std::max<long>( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) );
::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0),
GetActiveWindow()->GetOutputSizePixel()) );
mpZoomList->InsertZoomRect(aVisAreaWin);
@@ -1150,7 +1150,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_ZOOM_OUT:
{
mbZoomOnPage = false;
- SetZoom( std::min( (long) ( GetActiveWindow()->GetZoom() * 2 ), (long) GetActiveWindow()->GetMaxZoom() ) );
+ SetZoom( std::min<long>( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) );
::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0),
GetActiveWindow()->GetOutputSizePixel()) );
mpZoomList->InsertZoomRect(aVisAreaWin);
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index fc1ac93e8383..b3df9d061523 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -142,7 +142,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
case SID_ZOOM_OUT:
{
- SetZoom( std::min( (long) ( GetActiveWindow()->GetZoom() * 2 ), (long) GetActiveWindow()->GetMaxZoom() ) );
+ SetZoom( std::min<long>( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) );
::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0),
GetActiveWindow()->GetOutputSizePixel()) );
mpZoomList->InsertZoomRect(aVisAreaWin);
@@ -169,7 +169,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
case SID_ZOOM_IN:
{
- SetZoom( std::max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) );
+ SetZoom( std::max<long>( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) );
::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0),
GetActiveWindow()->GetOutputSizePixel()) );
mpZoomList->InsertZoomRect(aVisAreaWin);
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 97b709768cb4..f54d8df16cd1 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -790,9 +790,9 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
Point aOldMousePos = GetActiveWindow()->PixelToLogic(rCEvt.GetMousePosPixel());
if( pData->GetDelta() < 0L )
- nNewZoom = std::max( (long) pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom ));
+ nNewZoom = std::max<long>( pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom ));
else
- nNewZoom = std::min( (long) pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom ));
+ nNewZoom = std::min<long>( pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom ));
SetZoom( nNewZoom );
// Keep mouse at same doc point before zoom