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 /vcl/win | |
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 'vcl/win')
-rw-r--r-- | vcl/win/gdi/DWriteTextRenderer.cxx | 4 | ||||
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx index 734b68b0780a..da8eab0e6ce0 100644 --- a/vcl/win/gdi/DWriteTextRenderer.cxx +++ b/vcl/win/gdi/DWriteTextRenderer.cxx @@ -397,13 +397,13 @@ WinFontTransformGuard::WinFontTransformGuard(ID2D1RenderTarget* pRenderTarget, f = aTransform * D2D1::Matrix3x2F::Scale(D2D1::Size(fHScale, 1.0f), D2D1::Point2F(0, 0)); } - if (rLayout.GetOrientation() != 0) + if (rLayout.GetOrientation()) { // DWrite angle is in clockwise degrees, our orientation is in counter-clockwise 10th // degrees. aTransform = aTransform * D2D1::Matrix3x2F::Rotation( - -static_cast<FLOAT>(rLayout.GetOrientation()) / 10, rBaseline); + -static_cast<FLOAT>(rLayout.GetOrientation().get()) / 10, rBaseline); } mpRenderTarget->SetTransform(aTransform); } diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index f37ae89a00a8..7b4c0f042d9e 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -603,7 +603,7 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ) nFontHeight += nDPIY/2; nFontHeight /= nDPIY; rFont.SetFontSize( Size( 0, nFontHeight ) ); - rFont.SetOrientation( static_cast<short>(rLogFont.lfEscapement) ); + rFont.SetOrientation( Degree10(static_cast<sal_Int16>(rLogFont.lfEscapement)) ); if ( rLogFont.lfItalic ) rFont.SetItalic( ITALIC_NORMAL ); else @@ -805,7 +805,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, rLogFont.lfUnderline = 0; rLogFont.lfStrikeOut = 0; rLogFont.lfItalic = BYTE(rFont.GetItalic() != ITALIC_NONE); - rLogFont.lfEscapement = rFont.mnOrientation; + rLogFont.lfEscapement = rFont.mnOrientation.get(); rLogFont.lfOrientation = rLogFont.lfEscapement; rLogFont.lfClipPrecision = CLIP_DEFAULT_PRECIS; rLogFont.lfQuality = nDefaultQuality; |