[MLANG] Sync with Wine Staging 1.7.37. CORE-9246

svn path=/trunk/; revision=66985
This commit is contained in:
Amine Khaldi 2015-03-30 21:45:18 +00:00
parent cb350a41ed
commit ba90de7246
2 changed files with 45 additions and 14 deletions

View file

@ -68,6 +68,7 @@ typedef struct
const char *web_charset; const char *web_charset;
const char *header_charset; const char *header_charset;
const char *body_charset; const char *body_charset;
const WCHAR *alias;
} MIME_CP_INFO; } MIME_CP_INFO;
/* These data are based on the codepage info in libs/unicode/cpmap.pl */ /* These data are based on the codepage info in libs/unicode/cpmap.pl */
@ -125,7 +126,13 @@ static const MIME_CP_INFO chinese_simplified_cp[] =
MIMECONTF_IMPORT | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_IMPORT | MIMECONTF_SAVABLE_MAILNEWS |
MIMECONTF_SAVABLE_BROWSER | MIMECONTF_EXPORT | MIMECONTF_VALID_NLS | MIMECONTF_SAVABLE_BROWSER | MIMECONTF_EXPORT | MIMECONTF_VALID_NLS |
MIMECONTF_MIME_IE4 | MIMECONTF_MIME_LATEST, MIMECONTF_MIME_IE4 | MIMECONTF_MIME_LATEST,
"gb2312", "gb2312", "gb2312" } "gb2312", "gb2312", "gb2312" },
{ "Chinese Simplified (GBK)",
936, MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_MINIMAL |
MIMECONTF_IMPORT | MIMECONTF_SAVABLE_MAILNEWS |
MIMECONTF_SAVABLE_BROWSER | MIMECONTF_EXPORT | MIMECONTF_VALID_NLS |
MIMECONTF_MIME_IE4 | MIMECONTF_MIME_LATEST,
"gbk", "gbk", "gbk" }
}; };
static const MIME_CP_INFO chinese_traditional_cp[] = static const MIME_CP_INFO chinese_traditional_cp[] =
{ {
@ -360,6 +367,9 @@ static const MIME_CP_INFO vietnamese_cp[] =
MIMECONTF_MIME_LATEST, MIMECONTF_MIME_LATEST,
"windows-1258", "windows-1258", "windows-1258" } "windows-1258", "windows-1258", "windows-1258" }
}; };
static const WCHAR asciiW[] = {'a','s','c','i','i',0};
static const MIME_CP_INFO western_cp[] = static const MIME_CP_INFO western_cp[] =
{ {
{ "IBM EBCDIC (US-Canada)", { "IBM EBCDIC (US-Canada)",
@ -412,7 +422,7 @@ static const MIME_CP_INFO western_cp[] =
20127, MIMECONTF_MAILNEWS | MIMECONTF_IMPORT | MIMECONTF_EXPORT | 20127, MIMECONTF_MAILNEWS | MIMECONTF_IMPORT | MIMECONTF_EXPORT |
MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_VALID | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_VALID |
MIMECONTF_VALID_NLS | MIMECONTF_MIME_LATEST, MIMECONTF_VALID_NLS | MIMECONTF_MIME_LATEST,
"us-ascii", "us-ascii", "us-ascii" }, "us-ascii", "us-ascii", "us-ascii", asciiW },
{ "Western European (ISO)", { "Western European (ISO)",
28591, MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_IMPORT | 28591, MIMECONTF_MAILNEWS | MIMECONTF_BROWSER | MIMECONTF_IMPORT |
MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER | MIMECONTF_SAVABLE_MAILNEWS | MIMECONTF_SAVABLE_BROWSER |
@ -956,7 +966,7 @@ HRESULT WINAPI ConvertINetMultiByteToUnicode(
*pcDstSize = MultiByteToWideChar(dwEncoding, 0, pSrcStr, *pcSrcSize, NULL, 0); *pcDstSize = MultiByteToWideChar(dwEncoding, 0, pSrcStr, *pcSrcSize, NULL, 0);
break; break;
} }
if (!*pcDstSize) if (!*pcDstSize)
return E_FAIL; return E_FAIL;
@ -1347,7 +1357,7 @@ static HRESULT WINAPI MLANGCF_CreateInstance(IClassFactory *iface, IUnknown *pOu
IClassFactoryImpl *This = impl_from_IClassFactory(iface); IClassFactoryImpl *This = impl_from_IClassFactory(iface);
HRESULT hres; HRESULT hres;
LPUNKNOWN punk; LPUNKNOWN punk;
TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj); TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
*ppobj = NULL; *ppobj = NULL;
@ -2266,7 +2276,7 @@ static BOOL CALLBACK enum_locales_proc(LPWSTR locale)
info->wszLocaleName[0] = 0; info->wszLocaleName[0] = 0;
GetLocaleInfoW(info->lcid, LOCALE_SLANGUAGE, info->wszLocaleName, MAX_LOCALE_NAME); GetLocaleInfoW(info->lcid, LOCALE_SLANGUAGE, info->wszLocaleName, MAX_LOCALE_NAME);
TRACE("ISO639: %s SLANGUAGE: %s\n", wine_dbgstr_w(info->wszRfc1766), wine_dbgstr_w(info->wszLocaleName)); TRACE("ISO639: %s SLANGUAGE: %s\n", wine_dbgstr_w(info->wszRfc1766), wine_dbgstr_w(info->wszLocaleName));
data->total++; data->total++;
return TRUE; return TRUE;
@ -2597,6 +2607,13 @@ static HRESULT WINAPI fnIMultiLanguage3_GetCharsetInfo(
strcpyW(pCharsetInfo->wszCharset, csetW); strcpyW(pCharsetInfo->wszCharset, csetW);
return S_OK; return S_OK;
} }
if (mlang_data[i].mime_cp_info[n].alias && !lstrcmpiW(Charset, mlang_data[i].mime_cp_info[n].alias))
{
pCharsetInfo->uiCodePage = mlang_data[i].family_codepage;
pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp;
strcpyW(pCharsetInfo->wszCharset, mlang_data[i].mime_cp_info[n].alias);
return S_OK;
}
} }
} }
@ -2872,7 +2889,7 @@ static HRESULT WINAPI fnIMultiLanguage3_ConvertStringToUnicodeEx(
* *
* PARAMS * PARAMS
* see ConvertStringToUnicode * see ConvertStringToUnicode
* dwFlag * dwFlag
* lpFallBack if dwFlag contains MLCONVCHARF_USEDEFCHAR, lpFallBack string used * lpFallBack if dwFlag contains MLCONVCHARF_USEDEFCHAR, lpFallBack string used
* instead unconvertible characters. * instead unconvertible characters.
* *
@ -3050,10 +3067,17 @@ static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePage(
{ {
MLang_impl *This = impl_from_IMultiLanguage3( iface ); MLang_impl *This = impl_from_IMultiLanguage3( iface );
FIXME("(%p)->(%08x %s %u %p %u %p %p %p)\n", This, dwFlags, debugstr_w(lpWideCharStr), FIXME("(%p)->(%08x %s %p %u %p %p(%u) %s)\n", This, dwFlags, debugstr_w(lpWideCharStr),
cchWideChar, puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages, puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages,
pnDetectedCodePages, lpSpecialChar); pnDetectedCodePages, pnDetectedCodePages ? *pnDetectedCodePages : 0,
return E_NOTIMPL; debugstr_w(lpSpecialChar));
if (!puiDetectedCodePages || !pnDetectedCodePages || !*pnDetectedCodePages)
return E_INVALIDARG;
puiDetectedCodePages[0] = CP_UTF8;
*pnDetectedCodePages = 1;
return S_OK;
} }
static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePageInIStream( static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePageInIStream(
@ -3068,10 +3092,17 @@ static HRESULT WINAPI fnIMultiLanguage3_DetectOutboundCodePageInIStream(
{ {
MLang_impl *This = impl_from_IMultiLanguage3( iface ); MLang_impl *This = impl_from_IMultiLanguage3( iface );
FIXME("(%p)->(%08x %p %p %u %p %p %p)\n", This, dwFlags, pStrIn, FIXME("(%p)->(%08x %p %p %u %p %p(%u) %s)\n", This, dwFlags, pStrIn,
puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages, puiPreferredCodePages, nPreferredCodePages, puiDetectedCodePages,
pnDetectedCodePages, lpSpecialChar); pnDetectedCodePages, pnDetectedCodePages ? *pnDetectedCodePages : 0,
return E_NOTIMPL; debugstr_w(lpSpecialChar));
if (!puiDetectedCodePages || !pnDetectedCodePages || !*pnDetectedCodePages)
return E_INVALIDARG;
puiDetectedCodePages[0] = CP_UTF8;
*pnDetectedCodePages = 1;
return S_OK;
} }
static const IMultiLanguage3Vtbl IMultiLanguage3_vtbl = static const IMultiLanguage3Vtbl IMultiLanguage3_vtbl =

View file

@ -107,7 +107,7 @@ reactos/dll/win32/mciqtz32 # Synced to WineStaging-1.7.37
reactos/dll/win32/mciseq # Synced to WineStaging-1.7.37 reactos/dll/win32/mciseq # Synced to WineStaging-1.7.37
reactos/dll/win32/mciwave # Synced to WineStaging-1.7.37 reactos/dll/win32/mciwave # Synced to WineStaging-1.7.37
reactos/dll/win32/mgmtapi # Synced to Wine-1.7.27 reactos/dll/win32/mgmtapi # Synced to Wine-1.7.27
reactos/dll/win32/mlang # Synced to Wine-1.7.27 reactos/dll/win32/mlang # Synced to WineStaging-1.7.37
reactos/dll/win32/mmdevapi # Synced to Wine-1.7.27 reactos/dll/win32/mmdevapi # Synced to Wine-1.7.27
reactos/dll/win32/mpr # Synced to Wine-1.7.27 reactos/dll/win32/mpr # Synced to Wine-1.7.27
reactos/dll/win32/mprapi # Synced to Wine-1.7.27 reactos/dll/win32/mprapi # Synced to Wine-1.7.27