summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-07-25 12:16:34 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-07-25 22:16:15 +0200
commit10a2dd0ca46cf05234019d10d8eac19ebaca1b63 (patch)
tree6c79c9536ec6b8fd8d8844d2e2e3489b5e3d8878
parent4bf7f18669983517cdd5f31d786f5b3d2b3f34c4 (diff)
tdf#109281 add fallback to GDI back when we can't bind a DClibreoffice-5-4-0
Change-Id: Ideae3a5bcacfaadd2cb9d6b014a449d423d332dc Reviewed-on: https://gerrit.libreoffice.org/40399 Reviewed-by: Caolán McNamara <caolanm@redhat.com> 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.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 0682c4d9c2ad..6f33aaba63e5 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -478,6 +478,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))