From 11459949e920fab6074bab85e3e1a748e9aee1ee Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 1 Nov 2017 22:11:01 +0200 Subject: Related: tdf#113347: properly check HRESULT value HRESULT's "success" value S_OK is 0; they are failed when their values are negative. So, the incorrect check resulted in false failures. Change-Id: I56560ced73e335af49c66d58201d5455e555e431 Reviewed-on: https://gerrit.libreoffice.org/44180 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- vcl/win/gdi/DWriteTextRenderer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl/win') diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx index 95dd9e9d9b97..9819ef205aa1 100644 --- a/vcl/win/gdi/DWriteTextRenderer.cxx +++ b/vcl/win/gdi/DWriteTextRenderer.cxx @@ -341,7 +341,7 @@ bool D2DWriteTextOutRenderer::BindFont(HDC hDC) // Initially bind to an empty rectangle to get access to the font face, // we'll update it once we've calculated a bounding rect in DrawGlyphs - if (!BindDC(mhDC = hDC)) + if (FAILED(BindDC(mhDC = hDC))) return false; mlfEmHeight = 0; -- cgit