summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTim Eves <tim_eves@sil.org>2016-03-18 14:19:50 +0700
committerMartin Hosken <martin_hosken@sil.org>2016-05-03 04:51:01 +0000
commita55530d7ef9d48299308094ac58c8e9eaa34e3c6 (patch)
treec4e1e7a4585ca05ed6e7a9d7911ad2baf220085f /vcl
parentf8c9603830836e94782a82377e67e295910a18e2 (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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/source/gdi/winlayout.cxx6
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;