summaryrefslogtreecommitdiff
path: root/sd/source/ui/app/optsitem.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-23 09:57:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-23 11:09:43 +0100
commitcf5715da45ddce8b667f1b999d41c4e6e7e65659 (patch)
tree6040e786e24b6a7c3ade19e5ecee547d6000d543 /sd/source/ui/app/optsitem.cxx
parenta385c5c568fbbb56750f68afed16b26b6828b5d4 (diff)
use Degree10 in SdOptionsSnap and fix some conversions
Change-Id: I254b11d08049c4fbeaf77dc84812b19bc7f55c45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108230 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/app/optsitem.cxx')
-rw-r--r--sd/source/ui/app/optsitem.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index b247a7e02a72..7944bf5c93e6 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -799,8 +799,8 @@ bool SdOptionsSnap::ReadData( const Any* pValues )
if( pValues[5].hasValue() ) SetBigOrtho( *o3tl::doAccess<bool>(pValues[ 5 ]) );
if( pValues[6].hasValue() ) SetRotate( *o3tl::doAccess<bool>(pValues[ 6 ]) );
if( pValues[7].hasValue() ) SetSnapArea( static_cast<sal_Int16>(*o3tl::doAccess<sal_Int32>(pValues[ 7 ])) );
- if( pValues[8].hasValue() ) SetAngle( static_cast<sal_Int16>(*o3tl::doAccess<sal_Int32>(pValues[ 8 ])) );
- if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( static_cast<sal_Int16>(*o3tl::doAccess<sal_Int32>(pValues[ 9 ])) );
+ if( pValues[8].hasValue() ) SetAngle( Degree10(*o3tl::doAccess<sal_Int32>(pValues[ 8 ])) );
+ if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( Degree10(*o3tl::doAccess<sal_Int32>(pValues[ 9 ])) );
return true;
}
@@ -815,8 +815,8 @@ bool SdOptionsSnap::WriteData( Any* pValues ) const
pValues[ 5 ] <<= IsBigOrtho();
pValues[ 6 ] <<= IsRotate();
pValues[ 7 ] <<= static_cast<sal_Int32>(GetSnapArea());
- pValues[ 8 ] <<= static_cast<sal_Int32>(GetAngle());
- pValues[ 9 ] <<= static_cast<sal_Int32>(GetEliminatePolyPointLimitAngle());
+ pValues[ 8 ] <<= static_cast<sal_Int32>(GetAngle().get());
+ pValues[ 9 ] <<= static_cast<sal_Int32>(GetEliminatePolyPointLimitAngle().get());
return true;
}
@@ -847,8 +847,8 @@ SdOptionsSnapItem::SdOptionsSnapItem( SdOptions const * pOpts, ::sd::FrameView c
maOptionsSnap.SetBigOrtho( pView->IsBigOrtho() );
maOptionsSnap.SetRotate( pView->IsAngleSnapEnabled() );
maOptionsSnap.SetSnapArea( pView->GetSnapMagneticPixel() );
- maOptionsSnap.SetAngle( static_cast<sal_Int16>(pView->GetSnapAngle()) );
- maOptionsSnap.SetEliminatePolyPointLimitAngle( static_cast<sal_Int16>(pView->GetEliminatePolyPointLimitAngle()) );
+ maOptionsSnap.SetAngle( Degree10(pView->GetSnapAngle() / 10) );
+ maOptionsSnap.SetEliminatePolyPointLimitAngle( Degree10(pView->GetEliminatePolyPointLimitAngle() / 10) );
}
else if( pOpts )
{