diff options
author | Noel Grandin <noel@peralex.com> | 2018-09-14 08:50:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-14 10:47:39 +0200 |
commit | 9e568efaad811e57e89ca68649d5112d77c7957a (patch) | |
tree | a7049ecd034f0301e824c9b103bc11f598995819 /vcl/win | |
parent | eaf6fa7dd8643a6d02704797b51e7a815b31f0bb (diff) |
make WinFontInstance take and return a WinFontFace
to make the handling more explicit here
Change-Id: I934fcc7b0da8a160acd904440f18fc6c01ec1ad3
Reviewed-on: https://gerrit.libreoffice.org/60475
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 6 | ||||
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index ae8628079021..6b50e55433f2 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -950,7 +950,7 @@ void WinSalGraphics::SetFont(LogicalFontInstance* pFont, int nFallbackLevel) } // now the font is live => update font face - const WinFontFace* pFontFace = static_cast<const WinFontFace*>(pFontInstance->GetFontFace()); + const WinFontFace* pFontFace = pFontInstance->GetFontFace(); pFontFace->UpdateFromHDC(getHDC()); } @@ -1004,14 +1004,14 @@ const FontCharMapRef WinSalGraphics::GetFontCharMap() const FontCharMapRef xDefFontCharMap( new FontCharMap() ); return xDefFontCharMap; } - return static_cast<const WinFontFace*>(mpWinFontEntry[0]->GetFontFace())->GetFontCharMap(); + return mpWinFontEntry[0]->GetFontFace()->GetFontCharMap(); } bool WinSalGraphics::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const { if (!mpWinFontEntry[0]) return false; - return static_cast<const WinFontFace*>(mpWinFontEntry[0]->GetFontFace())->GetFontCapabilities(rFontCapabilities); + return mpWinFontEntry[0]->GetFontFace()->GetFontCapabilities(rFontCapabilities); } int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe, diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 5cef9f5534aa..84cc3600de3b 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -312,7 +312,7 @@ std::unique_ptr<SalLayout> WinSalGraphics::GetTextLayout(ImplLayoutArgs& /*rArgs return std::unique_ptr<SalLayout>(aLayout); } -WinFontInstance::WinFontInstance(const PhysicalFontFace& rPFF, const FontSelectPattern& rFSP) +WinFontInstance::WinFontInstance(const WinFontFace& rPFF, const FontSelectPattern& rFSP) : LogicalFontInstance(rPFF, rFSP) , m_pGraphics(nullptr) , m_hFont(nullptr) |