mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 698331 - get rid of *WithConversion (intl part). r=smontagu
This commit is contained in:
parent
545303ae64
commit
cb4a3f646f
@ -87,7 +87,7 @@ nsPlatformCharset::InitGetCharset(nsACString &oString)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale, nsACString& oResult)
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsACString& locale, nsACString& oResult)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -129,10 +129,8 @@ nsLanguageAtomService::GetLocaleLanguage(nsresult *aError)
|
||||
if (NS_FAILED(res))
|
||||
break;
|
||||
|
||||
nsAutoString category;
|
||||
category.AssignWithConversion(NSILOCALE_MESSAGE);
|
||||
nsAutoString loc;
|
||||
res = locale->GetCategory(category, loc);
|
||||
res = locale->GetCategory(NS_LITERAL_STRING(NSILOCALE_MESSAGE), loc);
|
||||
if (NS_FAILED(res))
|
||||
break;
|
||||
|
||||
|
@ -226,7 +226,7 @@ nsLocaleService::nsLocaleService(void)
|
||||
posix_locale_category[i],
|
||||
UNI_MBS_STRING_POINTER,
|
||||
(void **)&lc_temp);
|
||||
category.AssignWithConversion(LocaleList[i]);
|
||||
category.AssignASCII(LocaleList[i]);
|
||||
nsresult result;
|
||||
if (lc_temp != nsnull)
|
||||
result = os2Converter->GetXPLocale(lc_temp, xpLocale);
|
||||
@ -300,7 +300,7 @@ nsLocaleService::NewLocale(const nsAString &aLocale, nsILocale **_retval)
|
||||
if (!resultLocale) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
for (PRInt32 i = 0; i < LocaleListLength; i++) {
|
||||
nsString category; category.AssignWithConversion(LocaleList[i]);
|
||||
NS_ConvertASCIItoUTF16 category(LocaleList[i]);
|
||||
result = resultLocale->AddCategory(category, aLocale);
|
||||
if (NS_FAILED(result)) return result;
|
||||
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
|
@ -58,7 +58,7 @@ private:
|
||||
|
||||
nsresult MapToCharset(nsAString& inANSICodePage, nsACString& outCharset);
|
||||
nsresult InitGetCharset(nsACString& oString);
|
||||
nsresult ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale, nsACString& oResult);
|
||||
nsresult ConvertLocaleToCharsetUsingDeprecatedConfig(nsACString& locale, nsACString& oResult);
|
||||
nsresult VerifyCharset(nsCString &aCharset);
|
||||
};
|
||||
|
||||
|
@ -150,7 +150,7 @@ nsPlatformCharset::InitGetCharset(nsACString &oString)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale, nsACString& oResult)
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsACString& locale, nsACString& oResult)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale, nsACString& oResult)
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsACString& locale, nsACString& oResult)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ nsPlatformCharset::nsPlatformCharset()
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale, nsACString& oResult)
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsACString& locale, nsACString& oResult)
|
||||
{
|
||||
if (!(locale.IsEmpty())) {
|
||||
nsCAutoString platformLocaleKey;
|
||||
@ -84,7 +84,7 @@ nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale
|
||||
platformLocaleKey.AssignLiteral("locale.");
|
||||
platformLocaleKey.Append(OSTYPE);
|
||||
platformLocaleKey.AppendLiteral(".");
|
||||
platformLocaleKey.AppendWithConversion(locale);
|
||||
platformLocaleKey.Append(locale);
|
||||
|
||||
nsresult res = nsUConvPropertySearch::SearchPropertyValue(kUnixCharsets,
|
||||
ArrayLength(kUnixCharsets), platformLocaleKey, oResult);
|
||||
@ -93,7 +93,7 @@ nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale
|
||||
}
|
||||
nsCAutoString localeKey;
|
||||
localeKey.AssignLiteral("locale.all.");
|
||||
localeKey.AppendWithConversion(locale);
|
||||
localeKey.Append(locale);
|
||||
res = nsUConvPropertySearch::SearchPropertyValue(kUnixCharsets,
|
||||
ArrayLength(kUnixCharsets), localeKey, oResult);
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
@ -160,7 +160,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS
|
||||
// convert from locale to charset
|
||||
// using the deprecated locale to charset mapping
|
||||
//
|
||||
nsAutoString localeStr(localeName);
|
||||
NS_LossyConvertUTF16toASCII localeStr(localeName);
|
||||
nsresult res = ConvertLocaleToCharsetUsingDeprecatedConfig(localeStr, oResult);
|
||||
if (NS_SUCCEEDED(res))
|
||||
return res;
|
||||
@ -201,8 +201,8 @@ nsPlatformCharset::InitGetCharset(nsACString &oString)
|
||||
// try falling back on a deprecated (locale based) name
|
||||
//
|
||||
char* locale = setlocale(LC_CTYPE, nsnull);
|
||||
nsAutoString localeStr;
|
||||
localeStr.AssignWithConversion(locale);
|
||||
nsCAutoString localeStr;
|
||||
localeStr.Assign(locale);
|
||||
res = ConvertLocaleToCharsetUsingDeprecatedConfig(localeStr, oString);
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
return res; // succeeded
|
||||
|
@ -129,7 +129,7 @@ nsPlatformCharset::InitGetCharset(nsACString &oString)
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAString& locale, nsACString& oResult)
|
||||
nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsACString& locale, nsACString& oResult)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ nsresult testCharsetConverterManager()
|
||||
|
||||
#define CREATE_DECODER(_charset) \
|
||||
nsIUnicodeDecoder * dec; \
|
||||
nsAutoString str;str.AssignWithConversion(_charset); \
|
||||
nsAutoString str;str.AssignASCII(_charset); \
|
||||
nsresult res = ccMan->GetUnicodeDecoder(&str,&dec); \
|
||||
if (NS_FAILED(res)) { \
|
||||
printf("ERROR at GetUnicodeDecoder() code=0x%x.\n",res); \
|
||||
@ -116,7 +116,7 @@ nsresult testCharsetConverterManager()
|
||||
|
||||
#define CREATE_ENCODER(_charset) \
|
||||
nsIUnicodeEncoder * enc; \
|
||||
nsAutoString str; str.AssignWithConversion(_charset); \
|
||||
nsAutoString str; str.AssignASCII(_charset); \
|
||||
nsresult res = ccMan->GetUnicodeEncoder(&str,&enc); \
|
||||
if (NS_FAILED(res)) { \
|
||||
printf("ERROR at GetUnicodeEncoder() code=0x%x.\n",res); \
|
||||
|
Loading…
Reference in New Issue
Block a user