summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-04-08 17:04:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-07 20:41:54 +0100
commit6e4637db213e7570d3920902288ca15b5e61b190 (patch)
tree276b353eb13dd40972fb63c8892088ffc3b733b2 /svx
parent501e0246bc72783f2dc830ea6b29f4a9e7c3045f (diff)
Resolves: #i121932# fixed ODF CustomShape import/export
(cherry picked from commit 970ff93fdf7d85b5d4f96d35aff641fe3c681668) Change-Id: Ib95e9a551912de1aff2318093b0104cf4699df77
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdoashp.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index e930d31017b9..a0c09cb4dc29 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -3029,7 +3029,8 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix,
if(!basegfx::fTools::equalZero(fShearX))
{
GeoStat aGeoStat;
- aGeoStat.nShearWink = FRound((atan(fShearX) / F_PI180) * 100.0);
+ // #i121932# do *not* forget to invert shearX(!)
+ aGeoStat.nShearWink = FRound((atan(-fShearX) / F_PI180) * 100.0);
aGeoStat.RecalcTan();
Shear(Point(), aGeoStat.nShearWink, aGeoStat.nTan, sal_False);
}
@@ -3108,11 +3109,11 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba
}
// mirror polygon and move it a bit
Polygon aPol0(aPol);
- aPol[0]=aPol0[3]; // This was WRONG for vertical (!)
- aPol[1]=aPol0[2];
- aPol[2]=aPol0[1];
- aPol[3]=aPol0[0];
- aPol[4]=aPol0[3];
+ aPol[0]=aPol0[1]; // This was WRONG for vertical (!)
+ aPol[1]=aPol0[0]; // #i121932# Despite my own coment above
+ aPol[2]=aPol0[3]; // it was *not* wrong even when the reordering
+ aPol[3]=aPol0[2]; // *seems* to be specific for X-Mirrorings. Oh
+ aPol[4]=aPol0[1]; // will I be happy when this old stuff is |gone| with aw080 (!)
Poly2Rect(aPol,aRectangle,aNewGeo);
}
}