[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 20 13:21:59 UTC 2021
svx/source/svdraw/svdotxtr.cxx | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
New commits:
commit 01408f9da879f69adbfee515efb4d8a57af2460e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 19 15:58:16 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 20 15:21:21 2021 +0200
Revert "ofz#37370 Null-dereference"
This reverts the code of commit 9343551f5588ffa4916e2c5d33cbd6fcf56ca99d
but keeps the test-case
No reason to have this after: 0bb3ccf9148106ce3e5d9e03c23ab5a9602e843c
'Revert "Simplify Rect2Poly"'
Change-Id: I37f363e51dc5daed3faf85f27203b2cfe09b82c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120746
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 0b667f18ce0c..e499a332400c 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -239,21 +239,20 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
std::abs(rRef1.X()-rRef2.X())==std::abs(rRef1.Y()-rRef2.Y()))) {
bRotate90=maGeo.nRotationAngle.get() % 9000 ==0;
}
- if (!maRect.IsEmpty()) { // ofz#37370 an 'empty' rect creates a polygon with 0 points
- tools::Polygon aPol(Rect2Poly(maRect,maGeo));
- sal_uInt16 nPointCount = aPol.GetSize();
- for (sal_uInt16 i = 0; i < nPointCount; ++i) {
- MirrorPoint(aPol[i],rRef1,rRef2);
- }
- // turn polygon and move it a little
- tools::Polygon aPol0(aPol);
- aPol[0]=aPol0[1];
- aPol[1]=aPol0[0];
- aPol[2]=aPol0[3];
- aPol[3]=aPol0[2];
- aPol[4]=aPol0[1];
- Poly2Rect(aPol,maRect,maGeo);
+ tools::Polygon aPol(Rect2Poly(maRect,maGeo));
+ sal_uInt16 i;
+ sal_uInt16 nPointCount=aPol.GetSize();
+ for (i=0; i<nPointCount; i++) {
+ MirrorPoint(aPol[i],rRef1,rRef2);
}
+ // turn polygon and move it a little
+ tools::Polygon aPol0(aPol);
+ aPol[0]=aPol0[1];
+ aPol[1]=aPol0[0];
+ aPol[2]=aPol0[3];
+ aPol[3]=aPol0[2];
+ aPol[4]=aPol0[1];
+ Poly2Rect(aPol,maRect,maGeo);
if (bRotate90) {
bool bRota90=maGeo.nRotationAngle.get() % 9000 ==0;
More information about the Libreoffice-commits
mailing list