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 /svx/source/sidebar | |
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 'svx/source/sidebar')
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 8f34d7051889..69e0d42f0808 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -449,11 +449,11 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ClickAutoHdl, weld::ToggleButton&, void ) IMPL_LINK_NOARG( PosSizePropertyPanel, RotationHdl, DialControl&, void ) { - sal_Int32 nTmp = mxCtrlDial->GetRotation(); + Degree100 nTmp = mxCtrlDial->GetRotation(); // #i123993# Need to take UIScale into account when executing rotations const double fUIScale(mpView && mpView->GetModel() ? double(mpView->GetModel()->GetUIScale()) : 1.0); - SdrAngleItem aAngleItem( SID_ATTR_TRANSFORM_ANGLE,static_cast<sal_uInt32>(nTmp)); + SdrAngleItem aAngleItem( SID_ATTR_TRANSFORM_ANGLE, nTmp); SfxInt32Item aRotXItem( SID_ATTR_TRANSFORM_ROT_X, basegfx::fround(mlRotX * fUIScale)); SfxInt32Item aRotYItem( SID_ATTR_TRANSFORM_ROT_Y, basegfx::fround(mlRotY * fUIScale)); @@ -680,10 +680,9 @@ void PosSizePropertyPanel::NotifyItemUpdate( if(pItem) { - tools::Long nTmp = pItem->GetValue(); - nTmp = nTmp < 0 ? 36000+nTmp : nTmp; + Degree100 nTmp = NormAngle36000(pItem->GetValue()); - mxMtrAngle->set_value(nTmp, FieldUnit::DEGREE); + mxMtrAngle->set_value(nTmp.get(), FieldUnit::DEGREE); mxCtrlDial->SetRotation(nTmp); break; @@ -691,7 +690,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( } mxMtrAngle->set_text( "" ); - mxCtrlDial->SetRotation( 0 ); + mxCtrlDial->SetRotation( 0_deg100 ); break; case SID_ATTR_METRIC: |