summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-03-06 13:44:12 +0000
committerOliver Bolte <obo@openoffice.org>2007-03-06 13:44:12 +0000
commitd7c7f59683a7e977dc179dd6e0552d94d862997e (patch)
treed9a89061ff85e49fc96075ae1f08a46d49f36d70 /svx
parent0ced4aa2ec15adf266b1cd13558797b738b2d0df (diff)
INTEGRATION: CWS aw047_SRC680 (1.79.168); FILE MERGED
2007/03/05 14:32:50 aw 1.79.168.1: #i75086# secured TRSetBaseGeometry to work with objects mirrored in X and Y
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdotext.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 38201812ceff..ed86fdb31697 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: svdotext.cxx,v $
*
- * $Revision: 1.79 $
+ * $Revision: 1.80 $
*
- * last change: $Author: vg $ $Date: 2006-11-21 16:56:42 $
+ * last change: $Author: obo $ $Date: 2007-03-06 14:44:12 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2211,6 +2211,15 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b
double fRotate, fShearX;
rMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
+ // #i75086# Old DrawingLayer (GeoStat and geometry) does not support holding negative scalings
+ // in X and Y which equal a 180 degree rotation. Recognize it and react accordingly
+ if(basegfx::fTools::less(aScale.getX(), 0.0) && basegfx::fTools::less(aScale.getY(), 0.0))
+ {
+ aScale.setX(fabs(aScale.getX()));
+ aScale.setY(fabs(aScale.getY()));
+ fRotate = fmod(fRotate + F_PI, F_2PI);
+ }
+
// reset object shear and rotations
aGeo.nDrehWink = 0;
aGeo.RecalcSinCos();