diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-03-30 12:34:20 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-03-31 11:03:51 +0200 |
commit | 7392abbe587cfe4d1547646e5cf2358e4f749981 (patch) | |
tree | 611b41fb8d13bfde57b23c041f806392b9ad8574 /vcl | |
parent | 0c67c664d2e6df873243b12d69feb47986ca4491 (diff) |
build Skia on Windows with UNICODE set
Skia uses the Windows generic macros that map to the ANSI *A variants
or the unicode *W variants of functions/types, but in LO code we
mostly use explicitly the *W variants and do not set the UNICODE
define. So build Skia with UNICODE and explicitly use *W API
in SKia's API that we use.
Change-Id: I689797b30a412820f97d9ce88e9fe078ead2cf76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91376
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/skia/win/gdiimpl.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx index e7d0b576e37a..c90185b3e4bf 100644 --- a/vcl/skia/win/gdiimpl.cxx +++ b/vcl/skia/win/gdiimpl.cxx @@ -117,16 +117,8 @@ bool WinSkiaSalGraphicsImpl::DrawTextLayout(const GenericSalLayout& rLayout) assert(dynamic_cast<const WinFontInstance*>(&rLayout.GetFont())); const WinFontInstance* pWinFont = static_cast<const WinFontInstance*>(&rLayout.GetFont()); const HFONT hLayoutFont = pWinFont->GetHFONT(); - LOGFONT logFont; -// Bring back GetObject that got #undef-ed in include/postwin.hxx . -// The GetObjectA/W() functions are type-unsafe, so they should match the LOGFONTA/W, -// otherwise the font name will be incorrect and Skia will choose an incorrect font. -#ifdef UNICODE -#define GetObject GetObjectW -#else -#define GetObject GetObjectA -#endif - if (GetObject(hLayoutFont, sizeof(logFont), &logFont) == 0) + LOGFONTW logFont; + if (GetObjectW(hLayoutFont, sizeof(logFont), &logFont) == 0) { assert(false); return false; |