diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-07-25 12:16:34 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-07-25 22:15:03 +0200 |
commit | b75ffa19c102d8485bc3b3c6c3a438058aca5dc5 (patch) | |
tree | 40b7ad00df5c820445df4bfac8ca2cacb01453b2 | |
parent | 40fbde8f75cbda538eccec558cdb8c0c0a659c31 (diff) |
tdf#109281 add fallback to GDI back when we can't bind a DC
Change-Id: Ideae3a5bcacfaadd2cb9d6b014a449d423d332dc
Reviewed-on: https://gerrit.libreoffice.org/40395
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 15c4b9730808..aa2992b9cbe0 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -481,6 +481,11 @@ bool D2DWriteTextOutRenderer::performRender(CommonSalLayout const & rLayout, Sal bRetry = true; return false; } + if (FAILED(hr)) + { + // If for any reason we can't bind fallback to legacy APIs. + return ExTextOutRenderer()(rLayout, rGraphics, hDC); + } mlfEmHeight = 0; if (!GetDWriteFaceFromHDC(hDC, &mpFontFace, &mlfEmHeight)) |