summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2020-12-22 15:42:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-02 15:26:38 +0100
commit11e52fe2979b0947814a49b9c17ec373795cbf8e (patch)
tree48268579f052b7fdfcc2c334fffe8c91d29cb234 /sd/source/ui/func
parent610ceb05025c9c7a9a34dddcb0dac506b8eab441 (diff)
introduce Degree100 strong_int type
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/fuconarc.cxx8
-rw-r--r--sd/source/ui/func/fuconcs.cxx2
-rw-r--r--sd/source/ui/func/fucopy.cxx3
-rw-r--r--sd/source/ui/func/fusel.cxx12
4 files changed, 13 insertions, 12 deletions
diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx
index 2671f4e2fa76..1ced022927ac 100644
--- a/sd/source/ui/func/fuconarc.cxx
+++ b/sd/source/ui/func/fuconarc.cxx
@@ -94,8 +94,8 @@ void FuConstructArc::DoExecute( SfxRequest& rReq )
mpView->getSdrModelFromSdrView(),
ToSdrCircKind(mpView->GetCurrentObjIdentifier()),
aNewRectangle,
- static_cast<::tools::Long>(pPhiStart->GetValue () * 10.0),
- static_cast<::tools::Long>(pPhiEnd->GetValue () * 10.0));
+ pPhiStart->GetValue(),
+ pPhiEnd->GetValue());
SdrPageView *pPV = mpView->GetSdrPageView();
mpView->InsertObjectAtView(pNewCircle, *pPV, SdrInsertFlags::SETDEFLAYER);
@@ -226,8 +226,8 @@ SdrObjectUniquePtr FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, con
pObj->SetLogicRect(aRect);
SfxItemSet aAttr(mpDoc->GetPool());
- aAttr.Put(makeSdrCircStartAngleItem(9000));
- aAttr.Put(makeSdrCircEndAngleItem(0));
+ aAttr.Put(makeSdrCircStartAngleItem(9000_deg100));
+ aAttr.Put(makeSdrCircEndAngleItem(0_deg100));
if(SID_DRAW_PIE_NOFILL == nID ||
SID_DRAW_CIRCLEPIE_NOFILL == nID ||
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 844bd824fc74..d1fcf0f3e36e 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -183,7 +183,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
- sal_Int32 nAngle = pSourceObj->GetRotateAngle();
+ Degree100 nAngle = pSourceObj->GetRotateAngle();
if ( nAngle )
pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle );
bAttributesAppliedFromGallery = true;
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index ba50612dce3d..c291e3468349 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -120,7 +120,8 @@ void FuCopy::DoExecute( SfxRequest& rReq )
}
::tools::Rectangle aRect;
- sal_Int32 lWidth = 0, lHeight = 0, lSizeX = 0, lSizeY = 0, lAngle = 0;
+ sal_Int32 lWidth = 0, lHeight = 0, lSizeX = 0, lSizeY = 0;
+ Degree100 lAngle(0);
sal_uInt16 nNumber = 0;
Color aStartColor, aEndColor;
bool bColor = false;
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 904696bb063a..fbcd7ada5c53 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -169,10 +169,10 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
mpWindow->CaptureMouse();
pHdl = mpView->PickHandle(aMDPos);
- ::tools::Long nAngle0 = GetAngle(aMDPos - mpView->GetRef1());
- nAngle0 -= 27000;
+ Degree100 nAngle0 = GetAngle(aMDPos - mpView->GetRef1());
+ nAngle0 -= 27000_deg100;
nAngle0 = NormAngle36000(nAngle0);
- bMirrorSide0 = nAngle0 < 18000;
+ bMirrorSide0 = nAngle0 < 18000_deg100;
if (!pHdl && mpView->Is3DRotationCreationActive())
{
@@ -742,10 +742,10 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* If 3D-rotation bodies are about to be created,
* end creation now
**********************************************************/
- ::tools::Long nAngle1 = GetAngle(aPnt - mpView->GetRef1());
- nAngle1 -= 27000;
+ Degree100 nAngle1 = GetAngle(aPnt - mpView->GetRef1());
+ nAngle1 -= 27000_deg100;
nAngle1 = NormAngle36000(nAngle1);
- bool bMirrorSide1 = nAngle1 < 18000;
+ bool bMirrorSide1 = nAngle1 < 18000_deg100;
if (bMirrorSide0 != bMirrorSide1)
{