summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdocapt.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-03-06 13:42:34 +0000
committerOliver Bolte <obo@openoffice.org>2007-03-06 13:42:34 +0000
commit6d2020b605d3b208d1d0f8272dfac9245d9094ce (patch)
tree999c913d629b28a07aa6ae0f16c5590119fa3a94 /svx/source/svdraw/svdocapt.cxx
parent3d6d27de687b1abedc1f178d0e5bbaaa56c8cb7e (diff)
INTEGRATION: CWS aw047_SRC680 (1.26.168); FILE MERGED
2007/03/05 14:32:49 aw 1.26.168.1: #i75086# secured TRSetBaseGeometry to work with objects mirrored in X and Y
Diffstat (limited to 'svx/source/svdraw/svdocapt.cxx')
-rw-r--r--svx/source/svdraw/svdocapt.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 2eca824ebcbe..6102f71c67af 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: svdocapt.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: vg $ $Date: 2006-11-21 16:56:03 $
+ * last change: $Author: obo $ $Date: 2007-03-06 14:42:34 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -971,6 +971,15 @@ void SdrCaptionObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons
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);
+ }
+
// force metric to pool metric
SfxMapUnit eMapUnit = pModel->GetItemPool().GetMetric(0);
if(eMapUnit != SFX_MAPUNIT_100TH_MM)