Bug 394545 - Remove intl.collationOption, r+moa=smontagu, a1.9=dsicore

This commit is contained in:
philringnalda@gmail.com 2007-09-05 06:47:22 -07:00
Родитель 513d40b485
Коммит 0dfc33afb6
8 изменённых файлов: 16 добавлений и 54 удалений

Просмотреть файл

@ -341,9 +341,6 @@ pref("network.cookie.enableForCurrentSessionOnly", false);
// l12n and i18n
pref("intl.accept_languages", "chrome://global/locale/intl.properties");
// collationOption is only set on linux for japanese. see bug 18338 and 62015
// we need to check if this pref is still useful.
pref("intl.collationOption", "chrome://global-platform/locale/intl.properties");
pref("intl.charsetmenu.browser.static", "chrome://global/locale/intl.properties");
pref("intl.charsetmenu.browser.more1", "chrome://global/locale/intl.properties");
pref("intl.charsetmenu.browser.more2", "chrome://global/locale/intl.properties");

Просмотреть файл

@ -72,7 +72,6 @@ inline void nsCollationUnix::DoRestoreLocale()
nsCollationUnix::nsCollationUnix()
{
mCollation = NULL;
mUseCodePointOrder = PR_FALSE;
}
nsCollationUnix::~nsCollationUnix()
@ -90,20 +89,6 @@ nsresult nsCollationUnix::Initialize(nsILocale* locale)
nsresult res;
nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
if (prefBranch) {
nsCOMPtr<nsIPrefLocalizedString> prefLocalString;
res = prefBranch->GetComplexValue("intl.collationOption",
NS_GET_IID(nsIPrefLocalizedString),
getter_AddRefs(prefLocalString));
if (NS_SUCCEEDED(res) && prefLocalString) {
nsXPIDLString prefValue;
prefLocalString->GetData(getter_Copies(prefValue));
mUseCodePointOrder =
prefValue.LowerCaseEqualsLiteral("usecodepointorder");
}
}
mCollation = new nsCollation;
if (mCollation == NULL) {
NS_ASSERTION(0, "mCollation creation failed");
@ -189,14 +174,9 @@ nsresult nsCollationUnix::CompareString(PRInt32 strength,
if (NS_SUCCEEDED(res) && str1 != NULL) {
res = mCollation->UnicodeToChar(stringNormalized2, &str2);
if (NS_SUCCEEDED(res) && str2 != NULL) {
if (mUseCodePointOrder) {
*result = strcmp(str1, str2);
}
else {
DoSetLocale();
*result = strcoll(str1, str2);
DoRestoreLocale();
}
DoSetLocale();
*result = strcoll(str1, str2);
DoRestoreLocale();
PR_Free(str2);
}
PR_Free(str1);
@ -225,26 +205,21 @@ nsresult nsCollationUnix::AllocateRawSortKey(PRInt32 strength,
res = mCollation->UnicodeToChar(stringNormalized, &str);
if (NS_SUCCEEDED(res) && str != NULL) {
if (mUseCodePointOrder) {
*key = (PRUint8 *)str;
*outLen = strlen(str) + 1;
DoSetLocale();
// call strxfrm to generate a key
size_t len = strxfrm(nsnull, str, 0) + 1;
void *buffer = PR_Malloc(len);
if (!buffer) {
res = NS_ERROR_OUT_OF_MEMORY;
} else if (strxfrm((char *)buffer, str, len) >= len) {
PR_Free(buffer);
res = NS_ERROR_FAILURE;
} else {
DoSetLocale();
// call strxfrm to generate a key
size_t len = strxfrm(nsnull, str, 0) + 1;
void *buffer = PR_Malloc(len);
if (!buffer) {
res = NS_ERROR_OUT_OF_MEMORY;
} else if (strxfrm((char *)buffer, str, len) >= len) {
PR_Free(buffer);
res = NS_ERROR_FAILURE;
} else {
*key = (PRUint8 *)buffer;
*outLen = len;
}
DoRestoreLocale();
PR_Free(str);
*key = (PRUint8 *)buffer;
*outLen = len;
}
DoRestoreLocale();
PR_Free(str);
}
return res;

Просмотреть файл

@ -785,7 +785,6 @@ pref("converter.html2txt.header_strategy", 1); // 0 = no indention; 1 = indenti
pref("intl.accept_languages", "chrome://navigator/locale/navigator.properties");
pref("intl.accept_charsets", "iso-8859-1,*,utf-8");
pref("intl.collationOption", "chrome://navigator-platform/locale/navigator.properties");
pref("intl.menuitems.alwaysappendaccesskeys","chrome://navigator/locale/navigator.properties");
pref("intl.menuitems.insertseparatorbeforeaccesskeys","chrome://navigator/locale/navigator.properties");
pref("intl.charsetmenu.browser.static", "chrome://navigator/locale/navigator.properties");

Просмотреть файл

@ -1,4 +1,2 @@
# moved from navigator/locale/navigator.properties
# valid collation options are: <empty string> or useCodePointOrder
intl.collationOption=
intl.charset.default=ISO-8859-1

Просмотреть файл

@ -1,4 +1,2 @@
# moved from navigator/locale/navigator.properties
# valid collation options are: <empty string> or useCodePointOrder
intl.collationOption=
intl.charset.default=ISO-8859-1

Просмотреть файл

@ -1,4 +1,2 @@
# moved from navigator/locale/navigator.properties
# valid collation options are: <empty string> or useCodePointOrder
intl.collationOption=
intl.charset.default=ISO-8859-1

Просмотреть файл

@ -26,8 +26,6 @@ intl.charsetmenu.browser.unicode=UTF-8, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE,
intl.charset.default=ISO-8859-1
intl.charset.detector=
intl.charsetmenu.mailedit=ISO-8859-1, ISO-8859-15, ISO-8859-6, armscii-8, geostd8, ISO-8859-13, ISO-8859-14, ISO-8859-2, GB2312, GB18030, Big5, KOI8-R, windows-1251, KOI8-U, ISO-8859-7, ISO-8859-8-I, windows-1255, ISO-2022-JP, EUC-KR, ISO-8859-10, ISO-8859-3, TIS-620, ISO-8859-9, UTF-8, VISCII
# valid collation options are: <empty string> or useCodePointOrder
intl.collationOption=
# valid intl.menuitems.appendedacceskeys are: true or false, <empty string> (missing or empty preference equals false)
intl.menuitems.alwaysappendaccesskeys=
# valid intl.menuitems.insertseparatorbeforeaccesskeys are: true or false, <empty string> (missing or empty preference equals false)

Просмотреть файл

@ -42,7 +42,6 @@
pref("general.useragent.locale", "@AB_CD@");
pref("font.language.group", "chrome://global/locale/intl.properties");
pref("intl.accept_languages", "chrome://global/locale/intl.properties");
pref("intl.collationOption", "chrome://global-platform/locale/intl.properties");
pref("intl.charsetmenu.browser.static", "chrome://global/locale/intl.properties");
pref("intl.charsetmenu.browser.more1", "chrome://global/locale/intl.properties");
pref("intl.charsetmenu.browser.more2", "chrome://global/locale/intl.properties");