https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4abf2277a10d72fa7dc36…
commit 4abf2277a10d72fa7dc36bf9f4fd0726a94b5bf6
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Feb 2 13:25:12 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Feb 2 13:25:12 2019 +0100
[OLEDLG] Sync with Wine Staging 4.0. CORE-15682
---
dll/win32/oledlg/insobjdlg.c | 2 +-
dll/win32/oledlg/oledlg_main.c | 8 ++++----
dll/win32/oledlg/pastespl.c | 8 ++++----
media/doc/README.WINE | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dll/win32/oledlg/insobjdlg.c b/dll/win32/oledlg/insobjdlg.c
index 8c1d20588e..f32f3814e5 100644
--- a/dll/win32/oledlg/insobjdlg.c
+++ b/dll/win32/oledlg/insobjdlg.c
@@ -350,7 +350,7 @@ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo*
pdlgInfo)
RegOpenKeyExW(HKEY_CLASSES_ROOT, szClsid, 0, KEY_READ, &hkclsids);
- while (ERROR_SUCCESS == (ret = RegEnumKeyW(hkclsids, index, szclsid,
sizeof(szclsid)/sizeof(szclsid[0]))))
+ while (ERROR_SUCCESS == (ret = RegEnumKeyW(hkclsids, index, szclsid,
ARRAY_SIZE(szclsid))))
{
index++;
diff --git a/dll/win32/oledlg/oledlg_main.c b/dll/win32/oledlg/oledlg_main.c
index 8ba9f17a7a..ba5b7c8081 100644
--- a/dll/win32/oledlg/oledlg_main.c
+++ b/dll/win32/oledlg/oledlg_main.c
@@ -181,7 +181,7 @@ BOOL WINAPI OleUIAddVerbMenuW(IOleObject *object, LPCWSTR shorttype,
if (object)
IOleObject_EnumVerbs(object, &enumverbs);
- LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_OBJECT, resstrW,
sizeof(resstrW)/sizeof(WCHAR));
+ LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_OBJECT, resstrW, ARRAY_SIZE(resstrW));
/* no object, or object without enumeration support */
if (!object || !enumverbs) {
RemoveMenu(hMenu, uPos, MF_BYPOSITION);
@@ -202,7 +202,7 @@ BOOL WINAPI OleUIAddVerbMenuW(IOleObject *object, LPCWSTR shorttype,
singleverb = get_next_insertable_verb(enumverbs, idmin, idmax, &verb) != S_OK;
if (singleverb && !addConvert) {
- LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_SINGLEVERB_OBJECT, resstrW,
sizeof(resstrW)/sizeof(WCHAR));
+ LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_SINGLEVERB_OBJECT, resstrW,
ARRAY_SIZE(resstrW));
args[0] = (DWORD_PTR)firstverb.lpszVerbName;
args[1] = (DWORD_PTR)objecttype;
@@ -235,7 +235,7 @@ BOOL WINAPI OleUIAddVerbMenuW(IOleObject *object, LPCWSTR shorttype,
/* convert verb is at the bottom of a popup, separated from verbs */
if (addConvert) {
- LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_CONVERT, resstrW,
sizeof(resstrW)/sizeof(WCHAR));
+ LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_CONVERT, resstrW,
ARRAY_SIZE(resstrW));
InsertMenuW(submenu, ~0, MF_BYPOSITION|MF_SEPARATOR, 0, NULL);
InsertMenuW(submenu, ~0, MF_BYPOSITION|MF_STRING, idConvert, resstrW);
}
@@ -244,7 +244,7 @@ BOOL WINAPI OleUIAddVerbMenuW(IOleObject *object, LPCWSTR shorttype,
*ret_submenu = submenu;
/* now submenu is ready, add root entry to original menu, attach submenu */
- LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_OBJECT_WITH_NAME, resstrW,
sizeof(resstrW)/sizeof(WCHAR));
+ LoadStringW(OLEDLG_hInstance, IDS_VERBMENU_OBJECT_WITH_NAME, resstrW,
ARRAY_SIZE(resstrW));
args[0] = (DWORD_PTR)objecttype;
FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_ARGUMENT_ARRAY,
diff --git a/dll/win32/oledlg/pastespl.c b/dll/win32/oledlg/pastespl.c
index 530c4eddda..0b8c8c95a1 100644
--- a/dll/win32/oledlg/pastespl.c
+++ b/dll/win32/oledlg/pastespl.c
@@ -182,14 +182,14 @@ static void get_descriptors(HWND hdlg, ps_struct_t *ps_struct)
if(ps_struct->source_name == NULL && ps_struct->link_source_name ==
NULL)
{
WCHAR buf[200];
- LoadStringW(OLEDLG_hInstance, IDS_PS_UNKNOWN_SRC, buf,
sizeof(buf)/sizeof(WCHAR));
+ LoadStringW(OLEDLG_hInstance, IDS_PS_UNKNOWN_SRC, buf, ARRAY_SIZE(buf));
ps_struct->source_name = strdupW(buf);
}
if(ps_struct->type_name == NULL && ps_struct->link_type_name == NULL)
{
WCHAR buf[200];
- LoadStringW(OLEDLG_hInstance, IDS_PS_UNKNOWN_TYPE, buf,
sizeof(buf)/sizeof(WCHAR));
+ LoadStringW(OLEDLG_hInstance, IDS_PS_UNKNOWN_TYPE, buf, ARRAY_SIZE(buf));
ps_struct->type_name = strdupW(buf);
}
}
@@ -228,7 +228,7 @@ static DWORD init_pastelist(HWND hdlg, OLEUIPASTESPECIALW *ps)
}
/* The native version grabs only the first 20 fmts and we do the same */
- hr = IEnumFORMATETC_Next(penum, sizeof(fmts)/sizeof(fmts[0]), fmts, &fetched);
+ hr = IEnumFORMATETC_Next(penum, ARRAY_SIZE(fmts), fmts, &fetched);
TRACE("got %d formats hr %08x\n", fetched, hr);
if(SUCCEEDED(hr))
@@ -431,7 +431,7 @@ static void update_result_text(HWND hdlg, const ps_struct_t
*ps_struct)
res_id = IDS_PS_PASTE_LINK_DATA;
}
- LoadStringW(OLEDLG_hInstance, res_id, resource_txt,
sizeof(resource_txt)/sizeof(WCHAR));
+ LoadStringW(OLEDLG_hInstance, res_id, resource_txt, ARRAY_SIZE(resource_txt));
if((ptr = strstrW(resource_txt, percent_s)))
{
/* FIXME handle %s in ResultText. Sub appname if IDS_PS_PASTE_OBJECT{_AS_ICON}.
Else sub appropriate type name */
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 3ebbe55390..6807b80ceb 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -143,7 +143,7 @@ reactos/dll/win32/ole32 # Synced to WineStaging-4.0
reactos/dll/win32/oleacc # Synced to WineStaging-4.0
reactos/dll/win32/oleaut32 # Synced to WineStaging-4.0
reactos/dll/win32/olecli32 # Synced to WineStaging-3.3
-reactos/dll/win32/oledlg # Synced to WineStaging-3.3
+reactos/dll/win32/oledlg # Synced to WineStaging-4.0
reactos/dll/win32/olepro32 # Synced to WineStaging-3.3
reactos/dll/win32/olesvr32 # Synced to WineStaging-3.3
reactos/dll/win32/olethk32 # Synced to WineStaging-3.3