diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-21 14:43:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-22 07:22:33 +0100 |
commit | 8ec0f90a287febe661c89e098be457c5d593ded3 (patch) | |
tree | b6facee7fd0cc0e77330c94202c4d75b788144ab /tools | |
parent | 8e7226233940a201c76c6a43e0648603d17961f4 (diff) |
loplugin:changetoolsgen in tools..toolkit
Change-Id: I3d87ee59258567b5a82cb459248539faea1b3ca9
Reviewed-on: https://gerrit.libreoffice.org/50101
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/line.cxx | 4 | ||||
-rw-r--r-- | tools/source/generic/poly.cxx | 40 | ||||
-rw-r--r-- | tools/source/generic/svborder.cxx | 8 |
3 files changed, 26 insertions, 26 deletions
diff --git a/tools/source/generic/line.cxx b/tools/source/generic/line.cxx index 597b783f3523..b1a23635e9d6 100644 --- a/tools/source/generic/line.cxx +++ b/tools/source/generic/line.cxx @@ -39,8 +39,8 @@ bool Line::Intersection( const Line& rLine, Point& rIntersection ) const if( Intersection( rLine, fX, fY ) ) { - rIntersection.X() = FRound( fX ); - rIntersection.Y() = FRound( fY ); + rIntersection.setX( FRound( fX ) ); + rIntersection.setY( FRound( fY ) ); bRet = true; } else diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 3c78b5a04bc8..387282b4af0e 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -206,17 +206,17 @@ ImplPolygon::ImplPolygon( const Point& rCenter, long nRadX, long nRadY ) long nY = FRound( -nRadY * sin( nAngle ) ); Point* pPt = &(mxPointAry[i]); - pPt->X() = nX + rCenter.X(); - pPt->Y() = nY + rCenter.Y(); + pPt->setX( nX + rCenter.X() ); + pPt->setY( nY + rCenter.Y() ); pPt = &(mxPointAry[nPoints2-i-1]); - pPt->X() = -nX + rCenter.X(); - pPt->Y() = nY + rCenter.Y(); + pPt->setX( -nX + rCenter.X() ); + pPt->setY( nY + rCenter.Y() ); pPt = &(mxPointAry[i+nPoints2]); - pPt->X() = -nX + rCenter.X(); - pPt->Y() = -nY + rCenter.Y(); + pPt->setX( -nX + rCenter.X() ); + pPt->setY( -nY + rCenter.Y() ); pPt = &(mxPointAry[nPoints-i-1]); - pPt->X() = nX + rCenter.X(); - pPt->Y() = -nY + rCenter.Y(); + pPt->setX( nX + rCenter.X() ); + pPt->setY( -nY + rCenter.Y() ); } } else @@ -297,8 +297,8 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rBound, const Point& rStart, c { Point& rPt = mxPointAry[nStart]; - rPt.X() = FRound( fCenterX + fRadX * cos( fStart ) ); - rPt.Y() = FRound( fCenterY - fRadY * sin( fStart ) ); + rPt.setX( FRound( fCenterX + fRadX * cos( fStart ) ) ); + rPt.setY( FRound( fCenterY - fRadY * sin( fStart ) ) ); } if( PolyStyle::Chord == eStyle ) @@ -340,8 +340,8 @@ ImplPolygon::ImplPolygon( const Point& rBezPt1, const Point& rCtrlPt1, double fK12 = fK_1 * fK1_2; double fK21 = fK_2 * fK1_1; - rPt.X() = FRound( fK1_3 * fX0 + fK12 * fX1 + fK21 * fX2 + fK_3 * fX3 ); - rPt.Y() = FRound( fK1_3 * fY0 + fK12 * fY1 + fK21 * fY2 + fK_3 * fY3 ); + rPt.setX( FRound( fK1_3 * fX0 + fK12 * fX1 + fK21 * fX2 + fK_3 * fX3 ) ); + rPt.setY( FRound( fK1_3 * fY0 + fK12 * fY1 + fK21 * fY2 + fK_3 * fY3 ) ); } } @@ -1368,8 +1368,8 @@ void Polygon::Move( long nHorzMove, long nVertMove ) for ( sal_uInt16 i = 0; i < nCount; i++ ) { Point& rPt = mpImplPolygon->mxPointAry[i]; - rPt.X() += nHorzMove; - rPt.Y() += nVertMove; + rPt.AdjustX(nHorzMove ); + rPt.AdjustY(nVertMove ); } } @@ -1384,8 +1384,8 @@ void Polygon::Scale( double fScaleX, double fScaleY ) for ( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ ) { Point& rPnt = mpImplPolygon->mxPointAry[i]; - rPnt.X() = static_cast<long>( fScaleX * rPnt.X() ); - rPnt.Y() = static_cast<long>( fScaleY * rPnt.Y() ); + rPnt.setX( static_cast<long>( fScaleX * rPnt.X() ) ); + rPnt.setY( static_cast<long>( fScaleY * rPnt.Y() ) ); } } @@ -1411,8 +1411,8 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos ) const long nX = rPt.X() - nCenterX; const long nY = rPt.Y() - nCenterY; - rPt.X() = FRound( fCos * nX + fSin * nY ) + nCenterX; - rPt.Y() = - FRound( fSin * nX - fCos * nY ) + nCenterY; + rPt.setX( FRound( fCos * nX + fSin * nY ) + nCenterX ); + rPt.setY( - FRound( fSin * nX - fCos * nY ) + nCenterY ); } } @@ -1629,8 +1629,8 @@ SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly ) { sal_Int32 nTmpX(0), nTmpY(0); rIStream.ReadInt32( nTmpX ).ReadInt32( nTmpY ); - rPoly.mpImplPolygon->mxPointAry[i].X() = nTmpX; - rPoly.mpImplPolygon->mxPointAry[i].Y() = nTmpY; + rPoly.mpImplPolygon->mxPointAry[i].setX( nTmpX ); + rPoly.mpImplPolygon->mxPointAry[i].setY( nTmpY ); } } diff --git a/tools/source/generic/svborder.cxx b/tools/source/generic/svborder.cxx index 053fa25ab315..f9145dc21233 100644 --- a/tools/source/generic/svborder.cxx +++ b/tools/source/generic/svborder.cxx @@ -22,11 +22,11 @@ tools::Rectangle & operator += ( tools::Rectangle & rRect, const SvBorder & rBor { // call GetSize first due to Empty-Rect Size aS( rRect.GetSize() ); - aS.Width() += rBorder.Left() + rBorder.Right(); - aS.Height() += rBorder.Top() + rBorder.Bottom(); + aS.AdjustWidth(rBorder.Left() + rBorder.Right() ); + aS.AdjustHeight(rBorder.Top() + rBorder.Bottom() ); - rRect.Left() -= rBorder.Left(); - rRect.Top() -= rBorder.Top(); + rRect.AdjustLeft( -(rBorder.Left()) ); + rRect.AdjustTop( -(rBorder.Top()) ); rRect.SetSize( aS ); return rRect; } |