diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-10-20 07:27:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-21 08:13:05 +0200 |
commit | 0fb58a1ff168ae122e9c8993a3136658e3b0e3f0 (patch) | |
tree | 908983b02f466e0a49599edc70aaa1baaa240371 /filter/source/msfilter/escherex.cxx | |
parent | b84afd2188d6993c91081885dc24664bd3f1cc73 (diff) |
new tools::Degree10 strong typedef
partly to flush some use of "long" out the codebase,
but also to make it obvious which units are being used
for angle values.
Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/source/msfilter/escherex.cxx')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index f9f3f7197f21..ce03064a89c0 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1452,7 +1452,8 @@ Graphic lclDrawHatch( const drawing::Hatch& rHatch, const Color& rBackColor, boo pVDev->SetLineColor(); pVDev->SetFillColor(bFillBackground ? rBackColor : COL_TRANSPARENT); pVDev->DrawRect(rRect); - pVDev->DrawHatch(tools::PolyPolygon(rRect), Hatch(static_cast<HatchStyle>(rHatch.Style), Color(rHatch.Color), rHatch.Distance, static_cast<sal_uInt16>(rHatch.Angle))); + pVDev->DrawHatch(tools::PolyPolygon(rRect), Hatch(static_cast<HatchStyle>(rHatch.Style), Color(rHatch.Color), rHatch.Distance, + Degree10(rHatch.Angle))); aMtf.Stop(); aMtf.WindStart(); aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM)); @@ -3926,7 +3927,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject .WriteInt32( pGraphicAttr->GetTopCrop() ) .WriteInt32( pGraphicAttr->GetRightCrop() ) .WriteInt32( pGraphicAttr->GetBottomCrop() ) - .WriteUInt16( pGraphicAttr->GetRotation() ) + .WriteUInt16( pGraphicAttr->GetRotation().get() ) .WriteInt16( pGraphicAttr->GetLuminance() ) .WriteInt16( pGraphicAttr->GetContrast() ) .WriteInt16( pGraphicAttr->GetChannelR() ) @@ -4622,7 +4623,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst ) sal_Int32 nAngle = ( EscherPropertyValueHelper::GetPropertyValue( aAny, aPropertySet, "RotateAngle", true ) ) ? *o3tl::doAccess<sal_Int32>(aAny) : 0; if ( nAngle ) - aPoly.Rotate( aRect.TopLeft(), static_cast<sal_uInt16>( ( nAngle + 5 ) / 10 ) ); + aPoly.Rotate( aRect.TopLeft(), Degree10(static_cast<sal_Int16>( ( nAngle + 5 ) / 10 )) ); nRule = GetClosestPoint( aPoly, aRefPoint ); if (aType == OString( "drawing.Ellipse" )) |