diff options
author | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-02-09 12:13:51 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-02-09 12:13:51 +0100 |
commit | bb0818a178385577253cbe0f2aaaa34ccb0a5dfe (patch) | |
tree | baed242748e92858e1aed42bb36ccd06eea87524 /svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx | |
parent | 5f1e3bff24310560c4a3c314bb0cd909d1f423c2 (diff) | |
parent | 3c550e9f7bdd8c9f1f75f4148f516ddc94290f92 (diff) |
aw069 changes after resync to m71#
Diffstat (limited to 'svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 36475a38eb64..a1e426dc5b15 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -68,11 +68,10 @@ namespace sdr // no need to correct if no extra text range if(aTextRange != aObjectRange) { - const double fExtraTextRotation(GetCustomShapeObj().GetExtraTextRotation()); const GeoStat& rGeoStat(GetCustomShapeObj().GetGeoStat()); // only correct when rotation and/or shear is used - if(rGeoStat.nShearWink || rGeoStat.nDrehWink || !basegfx::fTools::equalZero(fExtraTextRotation)) + if(rGeoStat.nShearWink || rGeoStat.nDrehWink ) { // text range needs to be corrected by // aObjectRange.getCenter() - aRotObjectRange.getCenter() since it's @@ -96,11 +95,6 @@ namespace sdr aRotMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); } - if(!basegfx::fTools::equalZero(fExtraTextRotation)) - { - aRotMatrix.rotate((360.0 - fExtraTextRotation) * F_PI180); - } - aRotMatrix.translate(aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY()); aRotObjectRange.transform(aRotMatrix); @@ -187,6 +181,16 @@ namespace sdr aTextRange.getMinY() - aObjectRange.getMinimum().getY()); } + if(!basegfx::fTools::equalZero(fExtraTextRotation)) + { + basegfx::B2DVector aTranslation( + ( aTextRange.getWidth() / 2 ) + ( aTextRange.getMinX() - aObjectRange.getMinimum().getX() ), + ( aTextRange.getHeight() / 2 ) + ( aTextRange.getMinY() - aObjectRange.getMinimum().getY() ) ); + aTextBoxMatrix.translate( -aTranslation.getX(), -aTranslation.getY() ); + aTextBoxMatrix.rotate((360.0 - fExtraTextRotation) * F_PI180); + aTextBoxMatrix.translate( aTranslation.getX(), aTranslation.getY() ); + } + if(rGeoStat.nShearWink) { aTextBoxMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000)); @@ -197,11 +201,6 @@ namespace sdr aTextBoxMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); } - if(!basegfx::fTools::equalZero(fExtraTextRotation)) - { - aTextBoxMatrix.rotate((360.0 - fExtraTextRotation) * F_PI180); - } - // give text it's target position aTextBoxMatrix.translate(aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY()); } |