Bug 1337734 - Port bug 1335983 to mailnews and calendar: Remove locale parameter from call to CreateCollation(). rs=bustage-fix CLOSED TREE
This commit is contained in:
Родитель
a2931447c7
Коммит
7cd8802c65
|
@ -740,7 +740,7 @@ var cal = {
|
|||
createLocaleCollator: function() {
|
||||
return Components.classes["@mozilla.org/intl/collation-factory;1"]
|
||||
.getService(Components.interfaces.nsICollationFactory)
|
||||
.CreateCollation(Services.locale.getApplicationLocale());
|
||||
.CreateCollation();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -796,17 +796,10 @@ nsresult nsAbView::GenerateCollationKeysForCard(const char16_t *colID, AbCard *a
|
|||
|
||||
if (!mCollationKeyGenerator)
|
||||
{
|
||||
nsCOMPtr<nsILocaleService> localeSvc = do_GetService(NS_LOCALESERVICE_CONTRACTID,&rv);
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsILocale> locale;
|
||||
rv = localeSvc->GetApplicationLocale(getter_AddRefs(locale));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = factory->CreateCollation(locale, getter_AddRefs(mCollationKeyGenerator));
|
||||
rv = factory->CreateCollation(getter_AddRefs(mCollationKeyGenerator));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
|
|
|
@ -2954,18 +2954,10 @@ nsMsgDBFolder::createCollationKeyGenerator()
|
|||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsILocaleService> localeSvc = do_GetService(NS_LOCALESERVICE_CONTRACTID,&rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsILocale> locale;
|
||||
rv = localeSvc->GetApplicationLocale(getter_AddRefs(locale));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = factory->CreateCollation(locale, &gCollationKeyGenerator);
|
||||
return NS_OK;
|
||||
return factory->CreateCollation(&gCollationKeyGenerator);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -3671,28 +3671,11 @@ nsresult nsMsgDatabase::GetCollationKeyGenerator()
|
|||
nsresult err = NS_OK;
|
||||
if (!m_collationKeyGenerator)
|
||||
{
|
||||
nsCOMPtr <nsILocale> locale;
|
||||
nsAutoString localeName;
|
||||
|
||||
// get a locale service
|
||||
nsCOMPtr <nsILocaleService> localeService = do_GetService(NS_LOCALESERVICE_CONTRACTID, &err);
|
||||
if (NS_SUCCEEDED(err))
|
||||
nsCOMPtr <nsICollationFactory> f = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &err);
|
||||
if (NS_SUCCEEDED(err) && f)
|
||||
{
|
||||
// do this for a new db if no UI to be provided for locale selection
|
||||
err = localeService->GetApplicationLocale(getter_AddRefs(locale));
|
||||
|
||||
if (locale)
|
||||
{
|
||||
// or generate a locale from a stored locale name ("en_US", "fr_FR")
|
||||
//err = localeFactory->NewLocale(&localeName, &locale);
|
||||
|
||||
nsCOMPtr <nsICollationFactory> f = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &err);
|
||||
if (NS_SUCCEEDED(err) && f)
|
||||
{
|
||||
// get a collation interface instance
|
||||
err = f->CreateCollation(locale, getter_AddRefs(m_collationKeyGenerator));
|
||||
}
|
||||
}
|
||||
// get a collation interface instance
|
||||
err = f->CreateCollation(getter_AddRefs(m_collationKeyGenerator));
|
||||
}
|
||||
}
|
||||
return err;
|
||||
|
|
Загрузка…
Ссылка в новой задаче