diff options
author | Tim Eves <tim_eves@sil.org> | 2016-03-18 14:19:50 +0700 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-05-03 17:17:42 +0000 |
commit | 397284189411a6142ef8a1cd6787de287d742b3f (patch) | |
tree | 0734059dfd8af139ed1b1a6b92ddba4369e662cb | |
parent | 207d8440429d03d846f94c8c25fb0ff1bc773a95 (diff) |
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@libreoffice.org>
Reviewed-by: Martin Hosken <martin_hosken@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@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index f5b3a6ba8f2d..aa42a1950306 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; |