office-gobmx/shell
Stephan Bergmann 3ca8fe5c0d Fix passing RT_RCDATA into FindResourceW
RT_RCDATA is defined as MAKEINTRESOURCE(10) in WinUser.h, and MAKEINTRESOURCE is
defined as MAKEINTRESOURCEA in WinUser.h absent a definition of UNICODE.

649854544e "WinAPI: Fix some leftovers having
UNICODE-define-dependency" had changed this

> -        HRSRC hrc = FindResourceW(g_hModule, L"#2000", RT_RCDATA);
> +        HRSRC hrc = FindResourceW(g_hModule, L"#2000", MAKEINTRESOURCEW(RT_RCDATA));

before 558956dc81 "Drop UNICODE/_UNICODE defines"
dropped defining UNICODE.  But that change was technically wrong, as now flagged
by LLVM 10 trunk clang-cl:

> C:/lo-clang/core/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx(50,56): error: cast to smaller integer type 'unsigned short' from 'char *' [-Werror,-Wpointer-to-int-cast]
>         HRSRC hrc = FindResourceW(g_hModule, L"#2000", MAKEINTRESOURCEW(RT_RCDATA));
>                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/um\winuser.h(236,51): note: expanded from macro 'MAKEINTRESOURCEW'
> #define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
>                                                   ^~~~~~~~~

There appears to be no explicit define for MAKEINTRESOURCEW(10), and the fix
presented here seems like a cleaner way than replacing the use of RC_RCDATA with
MAKEINTRESOURCEW(10).

Change-Id: I36f60a8647ac264085656fc9ec3b129c2d81f480
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90799
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2020-03-20 19:14:43 +01:00
..
inc
qa/zip
source
AllLangMoTarget_shell.mk
CppunitTest_shell_zip.mk
CustomTarget_shlxthdl_res.mk
CustomTarget_spsupp_idl.mk
CustomTarget_x64.mk
Executable_lngconvex.mk
Executable_regsvrex.mk
Executable_senddoc.mk
Executable_spsupp_helper.mk
Executable_uri_encode.mk
Library_cmdmail.mk
Library_desktopbe.mk
Library_kf5be.mk
Library_localebe.mk
Library_losessioninstall.mk
Library_macbe.mk
Library_ooofilt.mk
Library_ooofilt_x64.mk
Library_propertyhdl.mk
Library_propertyhdl_x64.mk
Library_shlxthdl.mk
Library_shlxthdl_x64.mk
Library_smplmail.mk
Library_spsupp_x64.mk
Library_spsupp_x86.mk
Library_syssh.mk
Library_wininetbe.mk
Makefile
Module_shell.mk
Package_senddoc.mk
README
StaticLibrary_shlxthandler_common.mk
StaticLibrary_shlxthandler_common_x64.mk
StaticLibrary_xmlparser.mk
StaticLibrary_xmlparser_x64.mk
WinResTarget_shlxthdl.mk
WinResTarget_spsupp.mk
WinResTarget_spsupp_dlg.mk

System helpers - launching URI, system integration, external mailer support etc.