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 /sw/source/core/txtnode/fntcache.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 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 16b88d3fef39..34bb365233c3 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -296,11 +296,11 @@ static void lcl_calcLinePos( const CalcLinePosData &rData, sal_Int32 nKernStart = nStart ? rData.pKernArray[sal_Int32(nStart) - 1] : 0; sal_Int32 nKernEnd = rData.pKernArray[sal_Int32(nEnd) - 1]; - const sal_uInt16 nDir = rData.bBidiPor ? 1800 + const Degree10 nDir = rData.bBidiPor ? Degree10(1800) : UnMapDirection(rData.rFont.GetOrientation(), rData.bSwitchH2V, rData.bSwitchH2VLRBT); - switch ( nDir ) + switch ( nDir.get() ) { case 0 : rStart.AdjustX(nKernStart ); @@ -1735,12 +1735,12 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) Point aEnd; tools::Long nKernVal = pKernArray[sal_Int32(rInf.GetLen()) - 1]; - const sal_uInt16 nDir = bBidiPor - ? 1800 + const Degree10 nDir = bBidiPor + ? Degree10(1800) : UnMapDirection(GetFont().GetOrientation(), bSwitchH2V, bSwitchH2VLRBT); - switch ( nDir ) + switch ( nDir.get() ) { case 0 : aEnd.setX( rInf.GetPos().X() + nKernVal ); |