summaryrefslogtreecommitdiff
path: root/sw/source/core/draw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-28 13:24:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-29 08:07:51 +0100
commit0df65d9b1643c651143b51e315c97e732e8a6c00 (patch)
treeb93b7cf366facf62a56206cc5604c05086172679 /sw/source/core/draw
parent15bd7a41587f48307a1ecd5fffecc2e1b229774e (diff)
use Degree10 in SwRotationGrf
(*) Fix SwRotationGrf::GetPresentation to return a more accurate string (*) Add utility functions sal_Int32 toDegree100(Degree10) double toRadians(Degree10) (*) Fix SwVirtFlyDrawObj::GetRotateAngle to return the angle in the units that svx expects (deg100) which was introduced in commit c2e30949e0fb7c6a73742450f646e0d8d59d5e4f Date: Wed Apr 10 15:13:53 2019 +0200 lok: writer: svg export transformed images and consequently we can remove the kludge from that commit in SdrMarkView::SetMarkHandlesForLOKit Change-Id: I1a8c5f3a417f887f85b92ae5464578e9ee251619 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108406 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/draw')
-rw-r--r--sw/source/core/draw/dflyobj.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 1d46ff307b63..31ddcf4dd727 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -396,10 +396,10 @@ void SwVirtFlyDrawObj::Rotate(const Point& rRef, tools::Long nAngle, double sn,
{
// RotGrfFlyFrame: Add transformation to placeholder object
Size aSize;
- const sal_uInt16 nOldRot(SwVirtFlyDrawObj::getPossibleRotationFromFraphicFrame(aSize));
+ const Degree10 nOldRot(SwVirtFlyDrawObj::getPossibleRotationFromFraphicFrame(aSize));
SwFlyFrameAttrMgr aMgr(false, pShForAngle, Frmmgr_Type::NONE, nullptr);
- aMgr.SetRotation(nOldRot, (nOldRot + static_cast<sal_uInt16>(nAngle)) % 3600, aSize);
+ aMgr.SetRotation(nOldRot, (nOldRot + Degree10(nAngle)) % 3600_deg10, aSize);
}
}
else
@@ -1144,9 +1144,9 @@ void SwVirtFlyDrawObj::Crop(const basegfx::B2DPoint& rRef, double fxFact, double
}
// RotGrfFlyFrame: Helper to access possible rotation of Graphic contained in FlyFrame
-sal_uInt16 SwVirtFlyDrawObj::getPossibleRotationFromFraphicFrame(Size& rSize) const
+Degree10 SwVirtFlyDrawObj::getPossibleRotationFromFraphicFrame(Size& rSize) const
{
- sal_uInt16 nRetval(0);
+ Degree10 nRetval;
const SwNoTextFrame* pNoTx = dynamic_cast< const SwNoTextFrame* >(GetFlyFrame()->Lower());
if(pNoTx)
@@ -1172,7 +1172,7 @@ tools::Long SwVirtFlyDrawObj::GetRotateAngle() const
if(ContainsSwGrfNode())
{
Size aSize;
- return getPossibleRotationFromFraphicFrame(aSize);
+ return toDegree100(getPossibleRotationFromFraphicFrame(aSize));
}
else
{