[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/win

Mike Kaganski mike.kaganski at collabora.com
Fri Nov 3 20:43:22 UTC 2017


 vcl/win/gdi/winlayout.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit de811bb2359757b90a0a9851963bd8702b97dab0
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Fri Nov 3 13:19:10 2017 +0200

    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 <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 11459949e920fab6074bab85e3e1a748e9aee1ee)
    Reviewed-on: https://gerrit.libreoffice.org/44253
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 47eda10aedf3..f9d1c2812066 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -562,7 +562,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;


More information about the Libreoffice-commits mailing list