diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:13:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:13:55 +0100 |
commit | c049c76fc521f2b55b39a6e9eb0f0092bcf6ef77 (patch) | |
tree | 2bc2c059a6f6a175a0c0e5321887adc077fef419 /svx/source/svdraw/svddrgmt.cxx | |
parent | 0ae2d98d1f6d29c80bd1ee830db4c333e4ee1e1d (diff) |
More loplugin:cstylecast: svx
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I100e6c14cbf1d780f0e5ebca6b0c9e71ce1caaf7
Diffstat (limited to 'svx/source/svdraw/svddrgmt.cxx')
-rw-r--r-- | svx/source/svdraw/svddrgmt.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 536c27e1b271..3ba7c41b8b6b 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -2840,8 +2840,8 @@ basegfx::B2DPolyPolygon impCreateDragRaster(SdrPageView const & rPageView, const if(nVerDiv < DRAG_CROOK_RASTER_MINIMUM) nVerDiv = DRAG_CROOK_RASTER_MINIMUM; - const double fXLen(rMarkRect.GetWidth() / (double)nHorDiv); - const double fYLen(rMarkRect.GetHeight() / (double)nVerDiv); + const double fXLen(rMarkRect.GetWidth() / static_cast<double>(nHorDiv)); + const double fYLen(rMarkRect.GetHeight() / static_cast<double>(nVerDiv)); double fYPos(rMarkRect.Top()); sal_uInt32 a, b; @@ -3158,15 +3158,15 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) if (bVertical) { - a=((double)dy1)/((double)dx1); // slope of the radius - nNeuRad=((long)(dy1*a)+dx1) /2; + a=static_cast<double>(dy1)/static_cast<double>(dx1); // slope of the radius + nNeuRad=(static_cast<long>(dy1*a)+dx1) /2; aNeuCenter.X()+=nNeuRad; nPntWink=GetAngle(aPnt-aNeuCenter); } else { - a=((double)dx1)/((double)dy1); // slope of the radius - nNeuRad=((long)(dx1*a)+dy1) /2; + a=static_cast<double>(dx1)/static_cast<double>(dy1); // slope of the radius + nNeuRad=(static_cast<long>(dx1*a)+dy1) /2; aNeuCenter.Y()+=nNeuRad; nPntWink=GetAngle(aPnt-aNeuCenter)-9000; } @@ -3200,7 +3200,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) if (bResize) { - long nMul=(long)(nUmfang*NormAngle360(nPntWink)/36000); + long nMul=static_cast<long>(nUmfang*NormAngle360(nPntWink)/36000); if (bAtCenter) nMul*=2; @@ -3210,7 +3210,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) } else { - nAngle=(long)((nMarkSize*360/nUmfang)*100)/2; + nAngle=static_cast<long>((nMarkSize*360/nUmfang)*100)/2; if (nAngle==0) bValid=false; @@ -3841,8 +3841,8 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/) } const SdrGrafCropItem& rOldCrop = pObj->GetMergedItem(SDRATTR_GRAFCROP); - double fScaleX = ( aGraphicSize.Width() - rOldCrop.GetLeft() - rOldCrop.GetRight() ) / (double)aOldRect.GetWidth(); - double fScaleY = ( aGraphicSize.Height() - rOldCrop.GetTop() - rOldCrop.GetBottom() ) / (double)aOldRect.GetHeight(); + double fScaleX = ( aGraphicSize.Width() - rOldCrop.GetLeft() - rOldCrop.GetRight() ) / static_cast<double>(aOldRect.GetWidth()); + double fScaleY = ( aGraphicSize.Height() - rOldCrop.GetTop() - rOldCrop.GetBottom() ) / static_cast<double>(aOldRect.GetHeight()); sal_Int32 nDiffLeft = aNewRect.Left() - aOldRect.Left(); sal_Int32 nDiffTop = aNewRect.Top() - aOldRect.Top(); |