Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/oledlg/insobjdlg.c | 2 +- dlls/oledlg/oledlg_main.c | 8 ++++---- dlls/oledlg/pastespl.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/oledlg/insobjdlg.c b/dlls/oledlg/insobjdlg.c index 506196ed45..00b991e390 100644 --- a/dlls/oledlg/insobjdlg.c +++ b/dlls/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/dlls/oledlg/oledlg_main.c b/dlls/oledlg/oledlg_main.c index 8ba9f17a7a..ba5b7c8081 100644 --- a/dlls/oledlg/oledlg_main.c +++ b/dlls/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/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index 530c4eddda..0b8c8c95a1 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/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 */