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

Tim Eves tim_eves at sil.org
Tue May 3 17:18:04 UTC 2016


 vcl/win/source/gdi/winlayout.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 397284189411a6142ef8a1cd6787de287d742b3f
Author: Tim Eves <tim_eves at sil.org>
Date:   Fri Mar 18 14:19:50 2016 +0700

    Fix failure to print when using the D2DWrite path
    
    It seems that D2D1DCRenderrTarget cannot bind to a DC on a printer
    device. Now whenever that attempt to bind the DC fails we run the
    legacy API path as a fallback.
    
    Change-Id: I6ad8d82e5280fd2dcf669310bab0f5bfc23a138a
    Reviewed-on: https://gerrit.libreoffice.org/23366
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Martin Hosken <martin_hosken at sil.org>
    Reviewed-on: https://gerrit.libreoffice.org/24603
    (cherry picked from commit a55530d7ef9d48299308094ac58c8e9eaa34e3c6)
    Reviewed-on: https://gerrit.libreoffice.org/24616
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index f5b3a6b..aa42a19 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -3694,7 +3694,11 @@ bool D2DWriteTextOutRenderer::operator ()(WinLayout const &rLayout, HDC hDC,
         return false;
 
     if (!BindFont(hDC))
-        return false;
+    {
+        // If for any reason we can't bind fallback to legacy APIs.
+        return ExTextOutRenderer()(rLayout, hDC, pRectToErase, pPos, pGetNextGlypInfo);
+    }
+
 #if 0
     // Gather glyph positioning data.
     std::vector<uint16_t> indices;


More information about the Libreoffice-commits mailing list