diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-11-16 20:04:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-11-17 10:31:21 +0100 |
commit | c2fc5d4fc042460eaac1d6407f45d2f0073bf6a7 (patch) | |
tree | 4582755227fbfa2b7c591a76efdc9f0c3f85714d /tools | |
parent | e96dd14288172187372b3a4f82de870b1d660020 (diff) |
ofz#53450 Integer-overflow
Change-Id: I106e703714083631c67d7b8a84180c3c485953d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142814
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/poly.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 2c12ad777ec1..ae3465a2ce22 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1432,8 +1432,8 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos ) const tools::Long nX = rPt.X() - nCenterX; const tools::Long nY = rPt.Y() - nCenterY; - rPt.setX( FRound( fCos * nX + fSin * nY ) + nCenterX ); - rPt.setY( - FRound( fSin * nX - fCos * nY ) + nCenterY ); + rPt.setX( FRound(fCos * nX + fSin * nY + nCenterX) ); + rPt.setY( - FRound(fSin * nX - fCos * nY - nCenterY) ); } } |