diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-12-23 09:09:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-23 17:06:56 +0100 |
commit | 666e14ba6e82dcad6912a205694978b2736e4319 (patch) | |
tree | b4f13570b51f96ee9f1e7825c4422ea55c8fa620 /filter/source | |
parent | 961f6db0b647614e8221185c0e8ac661d87de9b6 (diff) |
add utility NbcRotate method
Change-Id: I66d016a22158f9f9ef68a80842e95e45516f0b4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108228
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 15 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 5 |
2 files changed, 4 insertions, 16 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 395822273865..d3d548c39265 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4137,10 +4137,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r } if ( nGroupRotateAngle ) - { - double a = nGroupRotateAngle * F_PI18000; - pRet->NbcRotate( aClientRect.Center(), nGroupRotateAngle, sin( a ), cos( a ) ); - } + pRet->NbcRotate( aClientRect.Center(), nGroupRotateAngle ); if ( nSpFlags & ShapeFlag::FlipV ) { // BoundRect in aBoundRect Point aLeft( aClientRect.Left(), ( aClientRect.Top() + aClientRect.Bottom() ) >> 1 ); @@ -4720,10 +4717,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r if( bIsConnector ) { if( nObjectRotation ) - { - double a = nObjectRotation * F_PI18000; - pRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation, sin( a ), cos( a ) ); - } + pRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation ); // mirrored horizontally? if ( nSpFlags & ShapeFlag::FlipH ) { @@ -4831,10 +4825,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r if ( pRet ) { if( nObjectRotation ) - { - double a = nObjectRotation * F_PI18000; - pRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation, sin( a ), cos( a ) ); - } + pRet->NbcRotate( aObjData.aBoundRect.Center(), nObjectRotation ); // mirrored horizontally? if ( nSpFlags & ShapeFlag::FlipH ) { diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index f877bbc99e09..d287e0ab012a 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1187,10 +1187,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, Svx if ( rObjData.nSpFlags & ShapeFlag::FlipH ) nAngle = 36000 - nAngle; if ( nAngle ) - { - double a = nAngle * F_PI18000; - pTObj->NbcRotate( rObjData.aBoundRect.Center(), nAngle, sin( a ), cos( a ) ); - } + pTObj->NbcRotate( rObjData.aBoundRect.Center(), nAngle ); } if ( pRet ) { |