From: Rémi Bernon rbernon@codeweavers.com
--- dlls/uxtheme/msstyles.c | 44 ++++++++++++++++++++--------------------- dlls/uxtheme/stylemap.c | 8 ++++---- 2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c index aa1f10949ce..a64d518ec32 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c @@ -341,7 +341,7 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR WCHAR state[60] = {'\0'}; LPWSTR tmp; LPWSTR comp; - lstrcpynW(sec, lpSection, min(dwLen+1, ARRAY_SIZE(sec))); + strupperW(sec, lpSection, min(dwLen+1, ARRAY_SIZE(sec)));
*szAppName = 0; *szClassName = 0; @@ -353,47 +353,47 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR if(tmp) { *tmp++ = 0; tmp++; - lstrcpynW(szAppName, comp, MAX_THEME_APP_NAME); + strupperW(szAppName, comp, MAX_THEME_APP_NAME); comp = tmp; }
tmp = wcschr(comp, '.'); if(tmp) { *tmp++ = 0; - lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME); + strupperW(szClassName, comp, MAX_THEME_CLASS_NAME); comp = tmp; /* now get the part & state */ tmp = wcschr(comp, '('); if(tmp) { *tmp++ = 0; - lstrcpynW(part, comp, ARRAY_SIZE(part)); + strupperW(part, comp, ARRAY_SIZE(part)); comp = tmp; /* now get the state */ tmp = wcschr(comp, ')'); if (!tmp) return FALSE; *tmp = 0; - lstrcpynW(state, comp, ARRAY_SIZE(state)); + strupperW(state, comp, ARRAY_SIZE(state)); } else { - lstrcpynW(part, comp, ARRAY_SIZE(part)); + strupperW(part, comp, ARRAY_SIZE(part)); } } else { tmp = wcschr(comp, '('); if(tmp) { *tmp++ = 0; - lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME); + strupperW(szClassName, comp, MAX_THEME_CLASS_NAME); comp = tmp; /* now get the state */ tmp = wcschr(comp, ')'); if (!tmp) return FALSE; *tmp = 0; - lstrcpynW(state, comp, ARRAY_SIZE(state)); + strupperW(state, comp, ARRAY_SIZE(state)); } else { - lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME); + strupperW(szClassName, comp, MAX_THEME_CLASS_NAME); } } if(!*szClassName) return FALSE; @@ -418,11 +418,11 @@ static PTHEME_CLASS MSSTYLES_FindClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWS PTHEME_CLASS cur = tf->classes; while(cur) { if(!pszAppName) { - if(!*cur->szAppName && !lstrcmpiW(pszClassName, cur->szClassName)) + if(!*cur->szAppName && !wcscmp(pszClassName, cur->szClassName)) return cur; } else { - if(!lstrcmpiW(pszAppName, cur->szAppName) && !lstrcmpiW(pszClassName, cur->szClassName)) + if(!wcscmp(pszAppName, cur->szAppName) && !wcscmp(pszClassName, cur->szClassName)) return cur; } cur = cur->next; @@ -978,7 +978,7 @@ static void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics) } if(MSSTYLES_ParseIniSectionName(lpName, dwLen, szAppName, szClassName, &iPartId, &iStateId)) { BOOL isGlobal = FALSE; - if(!lstrcmpiW(szClassName, L"globals")) { + if(!wcscmp(szClassName, L"GLOBALS")) { isGlobal = TRUE; } cls = MSSTYLES_AddClass(tf, szAppName, szClassName); @@ -997,7 +997,7 @@ static void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics) }
/* App/Class combos override values defined by the base class, map these overrides */ - globals = MSSTYLES_FindClass(tf, NULL, L"globals"); + globals = MSSTYLES_FindClass(tf, NULL, L"GLOBALS"); cls = tf->classes; while(cls) { if(*cls->szAppName) { @@ -1052,13 +1052,13 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U start = pszClassList; while((end = wcschr(start, ';'))) { len = end-start; - lstrcpynW(szClassName, start, min(len+1, ARRAY_SIZE(szClassName))); + strupperW(szClassName, start, min(len+1, ARRAY_SIZE(szClassName))); start = end+1; cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); if(cls) break; } if(!cls && *start) { - lstrcpynW(szClassName, start, ARRAY_SIZE(szClassName)); + strupperW(szClassName, start, ARRAY_SIZE(szClassName)); cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName); } if(cls) { @@ -1189,7 +1189,7 @@ HBITMAP MSSTYLES_LoadBitmap (PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha WCHAR szFile[MAX_PATH]; LPWSTR tmp; PTHEME_IMAGE img; - lstrcpynW(szFile, lpFilename, ARRAY_SIZE(szFile)); + strupperW(szFile, lpFilename, ARRAY_SIZE(szFile)); tmp = szFile; do { if(*tmp == '\') *tmp = '_'; @@ -1201,7 +1201,7 @@ HBITMAP MSSTYLES_LoadBitmap (PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha img = tc->tf->images; while (img) { - if (lstrcmpiW (szFile, img->name) == 0) + if (wcscmp(szFile, img->name) == 0) { TRACE ("found %p %s: %p\n", img, debugstr_w (img->name), img->image); *hasAlpha = img->hasAlpha; @@ -1270,7 +1270,7 @@ static BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LP end = cur; while(isSpace(*end)) end--;
- lstrcpynW(lpBuff, start, min(buffSize, end-start+1)); + strupperW(lpBuff, start, min(buffSize, end-start+1));
if(lpValEnd) *lpValEnd = cur; return TRUE; @@ -1344,10 +1344,10 @@ static HRESULT MSSTYLES_GetFont (LPCWSTR lpCur, LPCWSTR lpEnd, pFont->lfWeight = FW_REGULAR; pFont->lfCharSet = DEFAULT_CHARSET; while(MSSTYLES_GetNextToken(lpCur, lpEnd, &lpCur, attr, ARRAY_SIZE(attr))) { - if(!lstrcmpiW(L"bold", attr)) pFont->lfWeight = FW_BOLD; - else if(!lstrcmpiW(L"italic", attr)) pFont->lfItalic = TRUE; - else if(!lstrcmpiW(L"underline", attr)) pFont->lfUnderline = TRUE; - else if(!lstrcmpiW(L"strikeout", attr)) pFont->lfStrikeOut = TRUE; + if(!wcscmp(L"BOLD", attr)) pFont->lfWeight = FW_BOLD; + else if(!wcscmp(L"ITALIC", attr)) pFont->lfItalic = TRUE; + else if(!wcscmp(L"UNDERLINE", attr)) pFont->lfUnderline = TRUE; + else if(!wcscmp(L"STRIKEOUT", attr)) pFont->lfStrikeOut = TRUE; } *lpValEnd = lpCur; return S_OK; diff --git a/dlls/uxtheme/stylemap.c b/dlls/uxtheme/stylemap.c index 740f45d36d2..1fe28a2b2e8 100644 --- a/dlls/uxtheme/stylemap.c +++ b/dlls/uxtheme/stylemap.c @@ -1479,7 +1479,7 @@ static BOOL lookup_class_part(const struct class_desc *desc, const WCHAR *part_n { do { - if (item->state_id == 0 && !lstrcmpiW(item->part_name, part_name)) + if (item->state_id == 0 && !wcscmp(item->part_name, part_name)) { *part_id = item->part_id; break; @@ -1496,7 +1496,7 @@ static BOOL lookup_class_part(const struct class_desc *desc, const WCHAR *part_n { if (part_name) { - if (item->part_id == *part_id && !lstrcmpiW(item->part_name, state_name)) + if (item->part_id == *part_id && !wcscmp(item->part_name, state_name)) { *state_id = item->state_id; break; @@ -1504,7 +1504,7 @@ static BOOL lookup_class_part(const struct class_desc *desc, const WCHAR *part_n } else { - if (!lstrcmpiW(item->part_name, state_name)) + if (!wcscmp(item->part_name, state_name)) { *state_id = item->state_id; break; @@ -1528,7 +1528,7 @@ BOOL MSSTYLES_LookupPartState(const WCHAR *class_name, const WCHAR *part_name, c
while (*item->class_name) { - if (!lstrcmpiW(item->class_name, class_name)) + if (!wcscmp(item->class_name, class_name)) return lookup_class_part(item, part_name, state_name, part_id, state_id); item++; }