Kaydet (Commit) 2ee177e5 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

tdf#119756 assume the HFONT is always valid

This is a regression from the commit 7cb3e475 ("WIN add
SalGraphics* to WinFontInstance"). We need a sensible way to
compare the SalGraphics / HFONT. I'm not sure how to implement
this yet, so just assume unchanged, as the old code did.

Change-Id: I828a41e529976c500eedaef3afd40cf20287f746
Reviewed-on: https://gerrit.libreoffice.org/60256
Tested-by: Jenkins
Reviewed-by: 's avatarJan-Marek Glogowski <glogow@fbihome.de>
üst bb209f2f
......@@ -395,10 +395,9 @@ hb_font_t* WinFontInstance::ImplInitHbFont()
void WinFontInstance::SetGraphics(WinSalGraphics *pGraphics)
{
ReleaseHbFont();
if (m_hFont)
::DeleteFont(m_hFont);
m_pGraphics = pGraphics;
if (m_hFont)
return;
HFONT hOrigFont;
m_hFont = m_pGraphics->ImplDoSetFont(GetFontSelectPattern(), GetFontFace(), m_fScale, hOrigFont);
SelectObject(m_pGraphics->getHDC(), hOrigFont);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment