diff options
author | Noel <noel.grandin@collabora.co.uk> | 2020-12-22 15:42:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-02 15:26:38 +0100 |
commit | 11e52fe2979b0947814a49b9c17ec373795cbf8e (patch) | |
tree | 48268579f052b7fdfcc2c334fffe8c91d29cb234 /sw/source/uibase | |
parent | 610ceb05025c9c7a9a34dddcb0dac506b8eab441 (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 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/ribbar/concustomshape.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/beziersh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/frmsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/grfsh.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx index be3820dab9b1..97914c8003b5 100644 --- a/sw/source/uibase/ribbar/concustomshape.cxx +++ b/sw/source/uibase/ribbar/concustomshape.cxx @@ -137,7 +137,7 @@ void ConstCustomShape::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/sw/source/uibase/shells/beziersh.cxx b/sw/source/uibase/shells/beziersh.cxx index 4764decede3b..73bbc88acbc8 100644 --- a/sw/source/uibase/shells/beziersh.cxx +++ b/sw/source/uibase/shells/beziersh.cxx @@ -54,7 +54,7 @@ SwBezierShell::SwBezierShell(SwView &_rView): SwWrtShell *pSh = &GetShell(); SdrView* pSdrView = pSh->GetDrawView(); - pSdrView->SetEliminatePolyPointLimitAngle(1500); + pSdrView->SetEliminatePolyPointLimitAngle(1500_deg100); SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Draw)); } diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 10476553c9f7..6e990cd632b6 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -400,7 +400,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_DELTA_ANGLE, false, &pItem)) { - const Degree10 nDeltaRot(static_cast<const SdrAngleItem*>(pItem)->GetValue() / 10); + const Degree10 nDeltaRot = toDegree10(static_cast<const SdrAngleItem*>(pItem)->GetValue()); aMgr.SetRotation(nOldRot, nOldRot + nDeltaRot, rRotation.GetUnrotatedSize()); } @@ -410,7 +410,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) // 100th degrees in SID_ATTR_TRANSFORM_ANGLE to 10th degrees in RES_GRFATR_ROTATION if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_ANGLE, false, &pItem)) { - const Degree10 nNewRot(static_cast<const SdrAngleItem*>(pItem)->GetValue() / 10); + const Degree10 nNewRot = toDegree10(static_cast<const SdrAngleItem*>(pItem)->GetValue()); // RotGrfFlyFrame: Rotation change here, SwFlyFrameAttrMgr aMgr is available aMgr.SetRotation(nOldRot, nNewRot, rRotation.GetUnrotatedSize()); diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index c3eedb17a7d6..d4197cba5c85 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -511,7 +511,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) // RotGrfFlyFrame: Get and process evtl. changed RotationAngle if ( SfxItemState::SET == pSet->GetItemState(SID_ATTR_TRANSFORM_ANGLE, false, &pItem )) { - const Degree10 aNewRotation((static_cast<const SdrAngleItem*>(pItem)->GetValue() / 10) % 3600); + const Degree10 aNewRotation = toDegree10(static_cast<const SdrAngleItem*>(pItem)->GetValue() % 36000_deg100); // RotGrfFlyFrame: Possible rotation change here, SwFlyFrameAttrMgr aMgr is available aMgr.SetRotation(nCurrentRotation, aNewRotation, aUnrotatedSize); |