diff options
author | Paul Trojahn <paul.trojahn@gmail.com> | 2017-08-01 15:56:48 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-08-10 17:38:20 +0200 |
commit | 3e33a2551532806b99f6c8ca415136cd3f2f9256 (patch) | |
tree | bbb764d93b878d215b2c1e7fae12ea34789f9d58 /svx/source/customshapes/EnhancedCustomShapeEngine.cxx | |
parent | 93a3739bf47ada4549b3c139c55a9b039c1db1ee (diff) |
tdf#109317 Fix incorrect rotation of flipped custom OOXML shapes
The shape wasn't imported correctly because IsPostRotateAngle wasn't
set. As a result the shape was flipped after it was rotated instead
of before. This commit removes 1c44b263 and converts the rotation to
the internal format instead. This also fixes that ooxml preset shapes
can't be exported to odf correctly and that ooxml preset shapes rotate
in the wrong direction when rotated in LO.
Change-Id: I9691902fdfb2cfecc8fe50d6eb66ac3880ddd4e8
Reviewed-on: https://gerrit.libreoffice.org/40789
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'svx/source/customshapes/EnhancedCustomShapeEngine.cxx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index a734d24c0c75..fc2f2dc7cb60 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -267,7 +267,6 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render() EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape ); sal_Int32 nRotateAngle = aCustomShape2d.GetRotateAngle(); - bool bPostRotateAngle = aCustomShape2d.IsPostRotate(); bool bFlipV = aCustomShape2d.IsFlipVert(); bool bFlipH = aCustomShape2d.IsFlipHorz(); @@ -307,7 +306,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render() } pRenderedShape->Shear( pSdrObjCustomShape->GetSnapRect().Center(), nShearAngle, nTan, false); } - if( !bPostRotateAngle && nRotateAngle ) + if(nRotateAngle ) { double a = nRotateAngle * F_PI18000; pRenderedShape->NbcRotate( pSdrObjCustomShape->GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) ); @@ -324,12 +323,6 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render() Point aBottom( aTop.X(), aTop.Y() + 1000 ); pRenderedShape->NbcMirror( aTop, aBottom ); } - // Specifically for pptx imports - if( bPostRotateAngle && nRotateAngle ) - { - double a = nRotateAngle * F_PI18000; - pRenderedShape->NbcRotate( pSdrObjCustomShape->GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) ); - } pRenderedShape->NbcSetStyleSheet( pSdrObjCustomShape->GetStyleSheet(), true ); pRenderedShape->RecalcSnapRect(); } |