diff options
Diffstat (limited to 'svx/source/svdraw/svdoashp.cxx')
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 4c4c39f7225b..85ca4c4ff09a 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -94,6 +94,7 @@ #include <svx/svdview.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/matrix/b2dhommatrixtools.hxx> // #104018# replace macros above with type-safe methods inline double ImplTwipsToMM(double fVal) { return (fVal * (127.0 / 72.0)); } @@ -3444,31 +3445,11 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba } // 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 struct 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; } |