[Libreoffice-commits] core.git: vcl/win
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 11 14:10:31 UTC 2018
vcl/win/gdi/winlayout.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 2ee177e58a57420eaa18b9d39ade4c28907bc0c8
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Mon Sep 10 13:15:36 2018 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Sep 11 16:10:08 2018 +0200
tdf#119756 assume the HFONT is always valid
This is a regression from the commit 7cb3e475f2fb ("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: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index a1d76c8026a4..5cef9f5534aa 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -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);
More information about the Libreoffice-commits
mailing list