summaryrefslogtreecommitdiff
path: root/emfio/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-20 07:27:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-21 08:13:05 +0200
commit0fb58a1ff168ae122e9c8993a3136658e3b0e3f0 (patch)
tree908983b02f466e0a49599edc70aaa1baaa240371 /emfio/source
parentb84afd2188d6993c91081885dc24664bd3f1cc73 (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 'emfio/source')
-rw-r--r--emfio/source/reader/mtftools.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index a903bf99aa99..080521ed0523 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -254,7 +254,7 @@ namespace emfio
if( rFont.lfStrikeOut )
aFont.SetStrikeout( STRIKEOUT_SINGLE );
- aFont.SetOrientation( static_cast<short>(rFont.lfEscapement) );
+ aFont.SetOrientation( Degree10(static_cast<sal_Int16>(rFont.lfEscapement)) );
Size aFontSize( Size( rFont.lfWidth, rFont.lfHeight ) );
if ( rFont.lfHeight > 0 )
@@ -504,7 +504,7 @@ namespace emfio
sal_Int32 nResult;
const bool bFail = o3tl::checked_multiply(mnWinExtX, mnWinExtY, nResult);
if (!bFail && nResult < 0)
- rFont.SetOrientation( 3600 - rFont.GetOrientation() );
+ rFont.SetOrientation( Degree10(3600) - rFont.GetOrientation() );
}
tools::Polygon& MtfTools::ImplMap( tools::Polygon& rPolygon )
@@ -1514,8 +1514,7 @@ namespace emfio
fOrientation = 360 - fOrientation;
fOrientation += 90;
fOrientation *= 10;
- fOrientation += aTmp.GetOrientation();
- aTmp.SetOrientation( sal_Int16( fOrientation ) );
+ aTmp.SetOrientation( aTmp.GetOrientation() + Degree10( static_cast<sal_Int16>(fOrientation) ) );
}
}