summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdotext.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-01-21 13:49:22 +0100
committerMathias Bauer <mba@openoffice.org>2010-01-21 13:49:22 +0100
commitd5d854cc42815ff0bbe0347be4e28c8896048b8d (patch)
tree29000ef0d8c19f47b31d81dbca2fa3205e0ad3c7 /svx/source/svdraw/svdotext.cxx
parentd668e9b58922429c5e16abc698520efdc32c7af8 (diff)
parent3b3e144c13a85b21b32904f245f44256c63e10e5 (diff)
resync to DEV300_m70
Diffstat (limited to 'svx/source/svdraw/svdotext.cxx')
-rw-r--r--svx/source/svdraw/svdotext.cxx42
1 files changed, 10 insertions, 32 deletions
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 6382ceebceac..72522c3d8793 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -63,17 +63,14 @@
#include <editeng/editeng.hxx>
#include <svl/itemiter.hxx>
#include <svx/sdr/properties/textproperties.hxx>
-
-// #110496#
#include <vcl/metaact.hxx>
-
-// #111111#
#include <svx/sdr/contact/viewcontactoftextobj.hxx>
#include <basegfx/tuple/b2dtuple.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <vcl/virdev.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -737,9 +734,9 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAncho
{
basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly());
basegfx::B2DPolyPolygon* pContourPolyPolygon = 0L;
- basegfx::B2DHomMatrix aMatrix;
+ basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix(
+ -rAnchorRect.Left(), -rAnchorRect.Top()));
- aMatrix.translate(-rAnchorRect.Left(), -rAnchorRect.Top());
if(aGeo.nDrehWink)
{
// Unrotate!
@@ -1735,31 +1732,11 @@ sal_Bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::
}
// build matrix
- rMatrix.identity();
-
- if(!basegfx::fTools::equal(aScale.getX(), 1.0) || !basegfx::fTools::equal(aScale.getY(), 1.0))
- {
- rMatrix.scale(aScale.getX(), aScale.getY());
- }
-
- if(!basegfx::fTools::equalZero(fShearX))
- {
- rMatrix.shearX(tan(fShearX));
- }
-
- if(!basegfx::fTools::equalZero(fRotate))
- {
- // #i78696#
- // fRotate is from the old GeoStat and thus mathematically wrong orientated. For
- // the linear combination of matrices it needed to be fixed in the API, so it needs to
- // be mirrored here
- rMatrix.rotate(-fRotate);
- }
-
- if(!aTranslate.equalZero())
- {
- rMatrix.translate(aTranslate.getX(), aTranslate.getY());
- }
+ rMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
+ aScale,
+ basegfx::fTools::equalZero(fShearX) ? 0.0 : tan(fShearX),
+ basegfx::fTools::equalZero(fRotate) ? 0.0 : -fRotate,
+ aTranslate);
return sal_False;
}
@@ -1772,7 +1749,8 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b
// break up matrix
basegfx::B2DTuple aScale;
basegfx::B2DTuple aTranslate;
- double fRotate, fShearX;
+ double fRotate(0.0);
+ double fShearX(0.0);
rMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
// #i75086# Old DrawingLayer (GeoStat and geometry) does not support holding negative scalings