diff --git a/mozilla/caps/src/nsScriptSecurityManager.cpp b/mozilla/caps/src/nsScriptSecurityManager.cpp index 23d05bf46f0..a1da7b6bcda 100644 --- a/mozilla/caps/src/nsScriptSecurityManager.cpp +++ b/mozilla/caps/src/nsScriptSecurityManager.cpp @@ -1159,9 +1159,8 @@ Localize(char *genericString, nsString &result) nsCRT::free(spec); return ret; } - nsILocale *locale = nsnull; nsIStringBundle *bundle = nsnull; - ret = pStringService->CreateBundle(spec, locale, &bundle); + ret = pStringService->CreateBundle(spec, &bundle); nsCRT::free(spec); nsServiceManager::ReleaseService(kStringBundleServiceCID, pStringService); if (NS_FAILED(ret)) { diff --git a/mozilla/content/html/document/src/nsImageDocument.cpp b/mozilla/content/html/document/src/nsImageDocument.cpp index d254a59f088..a6fe87a54eb 100644 --- a/mozilla/content/html/document/src/nsImageDocument.cpp +++ b/mozilla/content/html/document/src/nsImageDocument.cpp @@ -468,8 +468,7 @@ nsresult nsImageDocument::UpdateTitle( void ) // Create a bundle for the localization NS_WITH_SERVICE(nsIStringBundleService, stringService, kStringBundleServiceCID, &rv); if (NS_SUCCEEDED(rv) && stringService) { - nsCOMPtr locale = nsnull; - rv = stringService->CreateBundle(NSIMAGEDOCUMENT_PROPERTIES_URI, locale, getter_AddRefs(bundle)); + rv = stringService->CreateBundle(NSIMAGEDOCUMENT_PROPERTIES_URI, getter_AddRefs(bundle)); } if (NS_SUCCEEDED(rv) && bundle) { nsAutoString key; diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index ea452e90009..67073f6dbe4 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -68,7 +68,6 @@ #include "nsIProgressEventSink.h" #include "nsIWebProgress.h" #include "nsILayoutHistoryState.h" -#include "nsILocaleService.h" #include "nsITimer.h" #include "nsIFileStream.h" #include "nsISHistoryInternal.h" @@ -4723,20 +4722,12 @@ nsDocShell::GetPromptAndStringBundle(nsIPrompt ** aPrompt, NS_ENSURE_SUCCESS(GetInterface(NS_GET_IID(nsIPrompt), (void **) aPrompt), NS_ERROR_FAILURE); - nsCOMPtr - localeService(do_GetService(NS_LOCALESERVICE_CONTRACTID)); - NS_ENSURE_TRUE(localeService, NS_ERROR_FAILURE); - - nsCOMPtr locale; - localeService->GetSystemLocale(getter_AddRefs(locale)); - NS_ENSURE_TRUE(locale, NS_ERROR_FAILURE); - nsCOMPtr stringBundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID)); NS_ENSURE_TRUE(stringBundleService, NS_ERROR_FAILURE); NS_ENSURE_SUCCESS(stringBundleService-> - CreateBundle(DIALOG_STRING_URI, locale, + CreateBundle(DIALOG_STRING_URI, getter_AddRefs(aStringBundle)), NS_ERROR_FAILURE); diff --git a/mozilla/editor/base/nsEditorShell.cpp b/mozilla/editor/base/nsEditorShell.cpp index a9a18e8f180..f02e9204af8 100644 --- a/mozilla/editor/base/nsEditorShell.cpp +++ b/mozilla/editor/base/nsEditorShell.cpp @@ -296,8 +296,7 @@ nsEditorShell::Init() NS_WARNING("ERROR: Failed to get StringBundle Service instance.\n"); return res; } - nsILocale* aLocale = nsnull; - res = stringBundleService->CreateBundle(EDITOR_BUNDLE_URL, aLocale, getter_AddRefs(mStringBundle)); + res = stringBundleService->CreateBundle(EDITOR_BUNDLE_URL, getter_AddRefs(mStringBundle)); // XXX: why are we returning NS_OK here rather than res? // is it ok to fail to get a string bundle? if so, it should be documented. diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index a9a18e8f180..f02e9204af8 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -296,8 +296,7 @@ nsEditorShell::Init() NS_WARNING("ERROR: Failed to get StringBundle Service instance.\n"); return res; } - nsILocale* aLocale = nsnull; - res = stringBundleService->CreateBundle(EDITOR_BUNDLE_URL, aLocale, getter_AddRefs(mStringBundle)); + res = stringBundleService->CreateBundle(EDITOR_BUNDLE_URL, getter_AddRefs(mStringBundle)); // XXX: why are we returning NS_OK here rather than res? // is it ok to fail to get a string bundle? if so, it should be documented. diff --git a/mozilla/embedding/base/nsEmbedAPI.cpp b/mozilla/embedding/base/nsEmbedAPI.cpp index d63ca86a2ea..0c1e0f14bc5 100644 --- a/mozilla/embedding/base/nsEmbedAPI.cpp +++ b/mozilla/embedding/base/nsEmbedAPI.cpp @@ -141,8 +141,7 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory, { nsCOMPtr stringBundle; char* propertyURL = "chrome://necko/locale/necko.properties"; - nsILocale *locale = nsnull; - rv = sBundleService->CreateBundle(propertyURL, locale, + rv = sBundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle)); } #endif diff --git a/mozilla/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js b/mozilla/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js index 22628fab799..e280a729f6f 100644 --- a/mozilla/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js +++ b/mozilla/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js @@ -96,7 +96,7 @@ nsHelperAppDialog.prototype = { .createInstance( nsIFilePicker ); var bundle = Components.classes[ "@mozilla.org/intl/stringbundle;1" ] .getService( Components.interfaces.nsIStringBundleService ) - .CreateBundle( "chrome://global/locale/helperAppLauncher.properties", null ); + .createBundle( "chrome://global/locale/helperAppLauncher.properties"); var windowTitle = bundle.GetStringFromName( "saveDialogTitle" ); diff --git a/mozilla/embedding/components/windowwatcher/src/nsPrompt.cpp b/mozilla/embedding/components/windowwatcher/src/nsPrompt.cpp index 0e4a2c150df..ca5a1736b49 100644 --- a/mozilla/embedding/components/windowwatcher/src/nsPrompt.cpp +++ b/mozilla/embedding/components/windowwatcher/src/nsPrompt.cpp @@ -20,7 +20,6 @@ * Contributor(s): */ -#include "nsILocale.h" #include "nsIServiceManager.h" #include "nsIWalletService.h" #include "nsPrompt.h" diff --git a/mozilla/embedding/components/windowwatcher/src/nsPromptService.cpp b/mozilla/embedding/components/windowwatcher/src/nsPromptService.cpp index d522e6d30c4..60e3eafd75b 100644 --- a/mozilla/embedding/components/windowwatcher/src/nsPromptService.cpp +++ b/mozilla/embedding/components/windowwatcher/src/nsPromptService.cpp @@ -592,9 +592,8 @@ nsPromptService::GetLocaleString(const char *aKey, PRUnichar **aResult) nsCOMPtr stringService = do_GetService(kStringBundleServiceCID); nsCOMPtr stringBundle; - nsILocale *locale = nsnull; - rv = stringService->CreateBundle(kCommonDialogsProperties, locale, getter_AddRefs(stringBundle)); + rv = stringService->CreateBundle(kCommonDialogsProperties, getter_AddRefs(stringBundle)); if (NS_FAILED(rv)) return NS_ERROR_FAILURE; rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2(aKey).GetUnicode(), aResult); diff --git a/mozilla/extensions/cookie/nsUtils.cpp b/mozilla/extensions/cookie/nsUtils.cpp index c6cc137004e..c38c2c9e371 100644 --- a/mozilla/extensions/cookie/nsUtils.cpp +++ b/mozilla/extensions/cookie/nsUtils.cpp @@ -268,9 +268,8 @@ CKutil_Localize(const PRUnichar *genericString) { PRUnichar *ptrv = nsnull; NS_WITH_SERVICE(nsIStringBundleService, pStringService, kStringBundleServiceCID, &ret); if (NS_SUCCEEDED(ret) && (nsnull != pStringService)) { - nsCOMPtr locale; nsCOMPtr bundle; - ret = pStringService->CreateBundle(LOCALIZATION, locale, getter_AddRefs(bundle)); + ret = pStringService->CreateBundle(LOCALIZATION, getter_AddRefs(bundle)); if (NS_SUCCEEDED(ret) && bundle) { ret = bundle->GetStringFromName(genericString, &ptrv); if ( NS_SUCCEEDED(ret) && (ptrv) ) { diff --git a/mozilla/extensions/cookie/tests/TestCookie.cpp b/mozilla/extensions/cookie/tests/TestCookie.cpp index 82a62f17513..cd5cd5f26ab 100644 --- a/mozilla/extensions/cookie/tests/TestCookie.cpp +++ b/mozilla/extensions/cookie/tests/TestCookie.cpp @@ -90,9 +90,7 @@ int main(PRInt32 argc, char *argv[]) { nsCOMPtr stringBundle; char* propertyURL = "chrome://necko/locale/necko.properties"; - nsILocale *locale = nsnull; - rv = bundleService->CreateBundle(propertyURL, locale, - getter_AddRefs(stringBundle)); + rv = bundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle)); } NS_WITH_SERVICE(nsICookieService, cookieService, kCookieServiceCID, &rv); diff --git a/mozilla/extensions/p3p/src/nsP3PService.cpp b/mozilla/extensions/p3p/src/nsP3PService.cpp index da2cdc74c5c..4cd39fc97b3 100644 --- a/mozilla/extensions/p3p/src/nsP3PService.cpp +++ b/mozilla/extensions/p3p/src/nsP3PService.cpp @@ -346,7 +346,6 @@ nsP3PService::Init( ) { ("P3PService: Creating string bundle.\n") ); rv = pStringBundleService->CreateBundle((const char *)xcsSpec, - nsnull, getter_AddRefs( mStringBundle ) ); } } diff --git a/mozilla/extensions/psm-glue/src/nsFSDR.cpp b/mozilla/extensions/psm-glue/src/nsFSDR.cpp index abe816c4eb9..3ad65b2d84d 100644 --- a/mozilla/extensions/psm-glue/src/nsFSDR.cpp +++ b/mozilla/extensions/psm-glue/src/nsFSDR.cpp @@ -105,7 +105,6 @@ Wallet_Localize(char* genericString) { NS_RELEASE(url); return v.ToNewUnicode(); } - nsILocale* locale = nsnull; nsIStringBundle* bundle = nsnull; char* spec = nsnull; ret = url->GetSpec(&spec); @@ -116,7 +115,7 @@ Wallet_Localize(char* genericString) { nsCRT::free(spec); return v.ToNewUnicode(); } - ret = pStringService->CreateBundle(spec, locale, &bundle); + ret = pStringService->CreateBundle(spec, &bundle); nsCRT::free(spec); if (NS_FAILED(ret)) { printf("cannot create instance\n"); diff --git a/mozilla/extensions/psm-glue/src/nsSecureBrowserUIImpl.cpp b/mozilla/extensions/psm-glue/src/nsSecureBrowserUIImpl.cpp index f4d5f5be0c7..bf865b7c8ca 100644 --- a/mozilla/extensions/psm-glue/src/nsSecureBrowserUIImpl.cpp +++ b/mozilla/extensions/psm-glue/src/nsSecureBrowserUIImpl.cpp @@ -167,8 +167,7 @@ nsSecureBrowserUIImpl::Init(nsIDOMWindowInternal *window, nsIDOMElement *button) NS_WITH_SERVICE(nsIStringBundleService, service, kCStringBundleServiceCID, &rv); if (NS_FAILED(rv)) return rv; - nsILocale* locale = nsnull; - rv = service->CreateBundle(SECURITY_STRING_BUNDLE_URL, locale, getter_AddRefs(mStringBundle)); + rv = service->CreateBundle(SECURITY_STRING_BUNDLE_URL, getter_AddRefs(mStringBundle)); if (NS_FAILED(rv)) return rv; // hook up to the form post notifications: diff --git a/mozilla/extensions/wallet/src/wallet.cpp b/mozilla/extensions/wallet/src/wallet.cpp index e998ecb359d..7b5a05ce9e1 100644 --- a/mozilla/extensions/wallet/src/wallet.cpp +++ b/mozilla/extensions/wallet/src/wallet.cpp @@ -49,7 +49,6 @@ #include "nsAppDirectoryServiceDefs.h" #include "nsIStringBundle.h" -#include "nsILocale.h" #include "nsIFileSpec.h" #include "prmem.h" #include "prprf.h" @@ -463,9 +462,8 @@ Wallet_Localize(char* genericString) { #endif return v.ToNewUnicode(); } - nsCOMPtr locale; nsCOMPtr bundle; - ret = pStringService->CreateBundle(PROPERTIES_URL, locale, getter_AddRefs(bundle)); + ret = pStringService->CreateBundle(PROPERTIES_URL, getter_AddRefs(bundle)); if (NS_FAILED(ret)) { #ifdef DEBUG printf("cannot create instance\n"); diff --git a/mozilla/intl/strres/public/nsIStringBundle.idl b/mozilla/intl/strres/public/nsIStringBundle.idl index bc063d9ba71..2c5eeadad89 100644 --- a/mozilla/intl/strres/public/nsIStringBundle.idl +++ b/mozilla/intl/strres/public/nsIStringBundle.idl @@ -22,12 +22,9 @@ #include "nsISupports.idl" #include "nsIEnumerator.idl" -#include "nsILocale.idl" %{C++ -#include "nsILocale.h" - // Define Contractid and CID // {D85A17C1-AA7C-11d2-9B8C-00805F8A16D9} #define NS_STRINGBUNDLESERVICE_CID \ @@ -94,10 +91,8 @@ interface nsIStringBundle : nsISupports [scriptable, uuid(D85A17C0-AA7C-11d2-9B8C-00805F8A16D9)] interface nsIStringBundleService : nsISupports { - nsIStringBundle CreateBundle([const] in string aURLSpec, - in nsILocale aLocale); + nsIStringBundle CreateBundle([const] in string aURLSpec); nsIStringBundle CreateAsyncBundle([const] in string aURLSpec); - nsIStringBundle CreateExtensibleBundle([const] in string aRegistryKey); /** diff --git a/mozilla/intl/strres/src/nsAcceptLang.cpp b/mozilla/intl/strres/src/nsAcceptLang.cpp index 7040c85b402..4b573c67c6c 100644 --- a/mozilla/intl/strres/src/nsAcceptLang.cpp +++ b/mozilla/intl/strres/src/nsAcceptLang.cpp @@ -27,7 +27,6 @@ #include "nsIServiceManager.h" #include "nsID.h" #include "nsString.h" -#include "nsILocale.h" #include "nsIStringBundle.h" #include "nsAcceptLang.h" @@ -87,10 +86,10 @@ nsAcceptLang::GetAcceptLangFromLocale(const PRUnichar *aLocale, PRUnichar **_ret nsIStringBundle *bundle = nsnull; #if 1 res = sBundleService->CreateBundle("resource:/res/language.properties", - nsnull, &bundle); + &bundle); #else res = sBundleService->CreateBundle("chrome://global/locale/languageNames.properties", - nsnull, &bundle); + &bundle); #endif PRUnichar *ptrv = nsnull; nsString lc_tmp(aLocale); @@ -182,7 +181,7 @@ nsAcceptLang::GetLocaleFromAcceptLang(const PRUnichar *aName, PRUnichar **_retva nsIStringBundle *bundle = nsnull; /* shall we put the file in res/ instead ? */ res = sBundleService->CreateBundle("chrome://global/locale/accept2locale.properties", - nsnull, &bundle); + &bundle); PRUnichar *ptrv = nsnull; if (NS_OK == (res = bundle->GetStringFromName(acceptLang.GetUnicode(), &ptrv))) { diff --git a/mozilla/intl/strres/src/nsStringBundle.cpp b/mozilla/intl/strres/src/nsStringBundle.cpp index c59b3a9390f..49d7e9fb9d3 100644 --- a/mozilla/intl/strres/src/nsStringBundle.cpp +++ b/mozilla/intl/strres/src/nsStringBundle.cpp @@ -606,7 +606,7 @@ nsExtensibleStringBundle::Init(const char * aRegistryKey) res = registry->GetStringUTF8(key, "name", getter_Copies(name)); if (NS_FAILED(res)) return res; - res = sbServ->CreateBundle(name, nsnull, getter_AddRefs(bundle)); + res = sbServ->CreateBundle(name, getter_AddRefs(bundle)); if (NS_FAILED(res)) { res = components->Next(); if (NS_FAILED(res)) return res; @@ -956,8 +956,7 @@ nsStringBundleService::recycleEntry(bundleCacheEntry_t *aEntry) } NS_IMETHODIMP -nsStringBundleService::CreateBundle(const char* aURLSpec, nsILocale* aLocale, - nsIStringBundle** aResult) +nsStringBundleService::CreateBundle(const char* aURLSpec, nsIStringBundle** aResult) { #ifdef DEBUG_tao_ printf("\n++ nsStringBundleService::CreateBundle ++\n"); diff --git a/mozilla/intl/strres/tests/StringBundleTest.cpp b/mozilla/intl/strres/tests/StringBundleTest.cpp index e5063754989..05dc4757ed0 100644 --- a/mozilla/intl/strres/tests/StringBundleTest.cpp +++ b/mozilla/intl/strres/tests/StringBundleTest.cpp @@ -27,7 +27,6 @@ #include "nsIStringBundle.h" #include "nsIAcceptLang.h" #include "nsIEventQueueService.h" -#include "nsILocale.h" #include #include "nsIIOService.h" @@ -78,54 +77,9 @@ static NS_DEFINE_IID(kIAcceptLangIID, NS_IACCEPTLANG_IID); // //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -#include "nsILocale.h" #include "nsILocaleService.h" #include "nsLocaleCID.h" -// -// -// -nsILocale* -get_applocale(void) -{ - nsresult result; - nsILocale* locale; - nsString* category; - nsString* value; - PRUnichar *lc_name_unichar; - - // get a locale service - nsCOMPtr localeService = do_GetService(NS_LOCALESERVICE_CONTRACTID, &result); - NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: get locale service failed"); - - // - // test GetApplicationLocale - // - result = localeService->GetApplicationLocale(&locale); - NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed"); - NS_ASSERTION(locale!=NULL,"nsLocaleTest: factory_get_locale failed"); - - // - // test and make sure the locale is a valid Interface - // - locale->AddRef(); - - category = new nsString(); - category->AssignWithConversion("NSILOCALE_MESSAGES"); - value = new nsString(); - - result = locale->GetCategory(category->GetUnicode(),&lc_name_unichar); - value->Assign(lc_name_unichar); - NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed"); - NS_ASSERTION(value->Length()>0,"nsLocaleTest: factory_get_locale failed"); - - locale->Release(); - delete category; - delete value; - - return locale; -} - //////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -189,15 +143,9 @@ main(int argc, char *argv[]) } printf("\n ** created AcceptLang service\n"); - nsILocale* locale = get_applocale(); - nsIStringBundle* bundle = nsnull; - ret = service->CreateBundle(TEST_URL, locale, &bundle); - - /* free it - */ - locale->Release(); + ret = service->CreateBundle(TEST_URL, &bundle); if (NS_FAILED(ret)) { printf("cannot create instance\n"); diff --git a/mozilla/layout/forms/nsFormControlHelper.cpp b/mozilla/layout/forms/nsFormControlHelper.cpp index bdd7f724b26..9fe80bec0c5 100644 --- a/mozilla/layout/forms/nsFormControlHelper.cpp +++ b/mozilla/layout/forms/nsFormControlHelper.cpp @@ -895,8 +895,7 @@ nsFormControlHelper::GetLocalizedString(const char * aPropFileName, const char* nsXPIDLCString spec; rv = uri->GetSpec(getter_Copies(spec)); if (NS_SUCCEEDED(rv) && spec) { - nsCOMPtr locale = nsnull; - rv = stringService->CreateBundle(spec, locale, getter_AddRefs(bundle)); + rv = stringService->CreateBundle(spec, getter_AddRefs(bundle)); } } } diff --git a/mozilla/layout/html/forms/src/nsFormControlHelper.cpp b/mozilla/layout/html/forms/src/nsFormControlHelper.cpp index bdd7f724b26..9fe80bec0c5 100644 --- a/mozilla/layout/html/forms/src/nsFormControlHelper.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlHelper.cpp @@ -895,8 +895,7 @@ nsFormControlHelper::GetLocalizedString(const char * aPropFileName, const char* nsXPIDLCString spec; rv = uri->GetSpec(getter_Copies(spec)); if (NS_SUCCEEDED(rv) && spec) { - nsCOMPtr locale = nsnull; - rv = stringService->CreateBundle(spec, locale, getter_AddRefs(bundle)); + rv = stringService->CreateBundle(spec, getter_AddRefs(bundle)); } } } diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.cpp b/mozilla/layout/xul/base/src/nsMenuFrame.cpp index 983a9e0e16a..7435b88a556 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuFrame.cpp @@ -1280,7 +1280,6 @@ nsMenuFrame::BuildAcceleratorText(nsString& aAccelString) if (NS_SUCCEEDED(rv) && bundleService) { nsCOMPtr bundle; rv = bundleService->CreateBundle("chrome://global/locale/keys.properties", - nsnull, getter_AddRefs(bundle)); if (NS_SUCCEEDED(rv) && bundle) { diff --git a/mozilla/mailnews/absync/src/nsABSyncDriver.cpp b/mozilla/mailnews/absync/src/nsABSyncDriver.cpp index 8c41a8d0c32..b4bfe5496d8 100644 --- a/mozilla/mailnews/absync/src/nsABSyncDriver.cpp +++ b/mozilla/mailnews/absync/src/nsABSyncDriver.cpp @@ -232,8 +232,7 @@ nsAbSyncDriver::GetString(const PRUnichar *aStringName) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(mStringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle)); } } diff --git a/mozilla/mailnews/absync/src/nsAbSync.cpp b/mozilla/mailnews/absync/src/nsAbSync.cpp index da25136b492..2b1b6c09b14 100644 --- a/mozilla/mailnews/absync/src/nsAbSync.cpp +++ b/mozilla/mailnews/absync/src/nsAbSync.cpp @@ -2998,8 +2998,7 @@ nsAbSync::GetString(const PRUnichar *aStringName) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(mStringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle)); } } diff --git a/mozilla/mailnews/base/src/nsMessenger.cpp b/mozilla/mailnews/base/src/nsMessenger.cpp index 702a6665b09..2bcdd81ffcd 100644 --- a/mozilla/mailnews/base/src/nsMessenger.cpp +++ b/mozilla/mailnews/base/src/nsMessenger.cpp @@ -1737,8 +1737,7 @@ nsMessenger::InitStringBundle() kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - res = sBundleService->CreateBundle(propertyURL, locale, + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle)); } } diff --git a/mozilla/mailnews/base/src/nsMessengerMigrator.cpp b/mozilla/mailnews/base/src/nsMessengerMigrator.cpp index ca820f12935..d9dbb624c73 100644 --- a/mozilla/mailnews/base/src/nsMessengerMigrator.cpp +++ b/mozilla/mailnews/base/src/nsMessengerMigrator.cpp @@ -409,7 +409,6 @@ nsMessengerMigrator::initializeStrings() nsCOMPtr bundle; rv = bundleService->CreateBundle("chrome://messenger/locale/messenger.properties", - nsnull, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); diff --git a/mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp b/mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp index 2e7c35df4f2..a2c4ac3f35b 100644 --- a/mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp +++ b/mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp @@ -898,7 +898,6 @@ nsMsgAccountManagerDataSource::getStringBundle() if (NS_FAILED(rv)) return rv; rv = strBundleService->CreateBundle("chrome://messenger/locale/prefs.properties", - nsnull, // default locale getter_AddRefs(mStringBundle)); return rv; } diff --git a/mozilla/mailnews/base/src/nsMsgDBView.cpp b/mozilla/mailnews/base/src/nsMsgDBView.cpp index e78d736a9e7..63facbf973d 100644 --- a/mozilla/mailnews/base/src/nsMsgDBView.cpp +++ b/mozilla/mailnews/base/src/nsMsgDBView.cpp @@ -182,7 +182,7 @@ PRUnichar * nsMsgDBView::GetString(const PRUnichar *aStringName) char *propertyURL = MESSENGER_STRING_URL; nsCOMPtr sBundleService = do_GetService(kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && sBundleService) - res = sBundleService->CreateBundle(propertyURL, nsnull, getter_AddRefs(mMessengerStringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mMessengerStringBundle)); } if (mMessengerStringBundle) diff --git a/mozilla/mailnews/base/src/nsMsgFolderCompactor.cpp b/mozilla/mailnews/base/src/nsMsgFolderCompactor.cpp index 711112a4584..32a5dde41b3 100644 --- a/mozilla/mailnews/base/src/nsMsgFolderCompactor.cpp +++ b/mozilla/mailnews/base/src/nsMsgFolderCompactor.cpp @@ -227,8 +227,7 @@ nsresult nsFolderCompactState::GetStatusFromMsgName(const char *statusMsgName, P kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - res = sBundleService->CreateBundle(propertyURL, nsnull, - getter_AddRefs(stringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle)); } if (stringBundle) { diff --git a/mozilla/mailnews/base/src/nsMsgOfflineManager.cpp b/mozilla/mailnews/base/src/nsMsgOfflineManager.cpp index d7ccf79c049..36463ccdda5 100644 --- a/mozilla/mailnews/base/src/nsMsgOfflineManager.cpp +++ b/mozilla/mailnews/base/src/nsMsgOfflineManager.cpp @@ -265,8 +265,7 @@ nsresult nsMsgOfflineManager::ShowStatus(const char *statusMsgName) kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - res = sBundleService->CreateBundle(propertyURL, nsnull, - getter_AddRefs(mStringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle)); } } if (mStringBundle) diff --git a/mozilla/mailnews/base/src/nsMsgPrintEngine.cpp b/mozilla/mailnews/base/src/nsMsgPrintEngine.cpp index 01be4aae795..f742cad7d91 100644 --- a/mozilla/mailnews/base/src/nsMsgPrintEngine.cpp +++ b/mozilla/mailnews/base/src/nsMsgPrintEngine.cpp @@ -399,8 +399,7 @@ nsMsgPrintEngine::GetString(const PRUnichar *aStringName) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(mStringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle)); } } diff --git a/mozilla/mailnews/base/src/nsMsgStatusFeedback.cpp b/mozilla/mailnews/base/src/nsMsgStatusFeedback.cpp index 177609aed77..84674c7fb83 100644 --- a/mozilla/mailnews/base/src/nsMsgStatusFeedback.cpp +++ b/mozilla/mailnews/base/src/nsMsgStatusFeedback.cpp @@ -58,7 +58,6 @@ nsMsgStatusFeedback::nsMsgStatusFeedback() : if (NS_SUCCEEDED(rv)) bundleService->CreateBundle("chrome://messenger/locale/messenger.properties", - nsnull, getter_AddRefs(mBundle)); } } diff --git a/mozilla/mailnews/base/util/nsMsgFolder.cpp b/mozilla/mailnews/base/util/nsMsgFolder.cpp index edaafd30adb..90c2038073c 100644 --- a/mozilla/mailnews/base/util/nsMsgFolder.cpp +++ b/mozilla/mailnews/base/util/nsMsgFolder.cpp @@ -188,7 +188,6 @@ nsMsgFolder::initializeStrings() nsCOMPtr bundle; rv = bundleService->CreateBundle("chrome://messenger/locale/messenger.properties", - nsnull, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); diff --git a/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp b/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp index 16f960267f1..e6846f65609 100644 --- a/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp +++ b/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp @@ -1276,8 +1276,7 @@ NS_IMETHODIMP nsMsgIncomingServer::DisplayOfflineMsg(nsIMsgWindow *aMsgWindow) NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr bundle; - rv = bundleService->CreateBundle(BASE_MSGS_URL, nsnull, - getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(BASE_MSGS_URL, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); if (bundle) { diff --git a/mozilla/mailnews/compose/src/nsMsgComposeStringBundle.cpp b/mozilla/mailnews/compose/src/nsMsgComposeStringBundle.cpp index 3202757b6af..20df684a932 100644 --- a/mozilla/mailnews/compose/src/nsMsgComposeStringBundle.cpp +++ b/mozilla/mailnews/compose/src/nsMsgComposeStringBundle.cpp @@ -86,7 +86,7 @@ nsComposeStringService::InitializeStringBundle() nsCOMPtr stringService = do_GetService(kStringBundleServiceCID); NS_ENSURE_TRUE(stringService, NS_ERROR_FAILURE); - NS_ENSURE_SUCCESS(stringService->CreateBundle(COMPOSE_BE_URL, nsnull, getter_AddRefs(mComposeStringBundle)), + NS_ENSURE_SUCCESS(stringService->CreateBundle(COMPOSE_BE_URL, getter_AddRefs(mComposeStringBundle)), NS_ERROR_FAILURE); return NS_OK; } diff --git a/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp b/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp index c2dde696e41..f5893240e81 100644 --- a/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp @@ -1793,9 +1793,7 @@ nsresult nsImapIncomingServer::GetStringBundle() NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - - res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(m_stringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(m_stringBundle)); } } return (m_stringBundle) ? NS_OK : res; diff --git a/mozilla/mailnews/imap/src/nsImapStringBundle.cpp b/mozilla/mailnews/imap/src/nsImapStringBundle.cpp index 3d8fb2158b4..e044bfb0ede 100644 --- a/mozilla/mailnews/imap/src/nsImapStringBundle.cpp +++ b/mozilla/mailnews/imap/src/nsImapStringBundle.cpp @@ -46,10 +46,8 @@ IMAPGetStringByID(PRInt32 stringID) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - nsIStringBundle* sBundle = nsnull; - res = sBundleService->CreateBundle(propertyURL, locale, &sBundle); + res = sBundleService->CreateBundle(propertyURL, &sBundle); if (NS_SUCCEEDED(res)) { diff --git a/mozilla/mailnews/import/eudora/src/nsEudoraStringBundle.cpp b/mozilla/mailnews/import/eudora/src/nsEudoraStringBundle.cpp index 282f90f72f5..23554e8609f 100644 --- a/mozilla/mailnews/import/eudora/src/nsEudoraStringBundle.cpp +++ b/mozilla/mailnews/import/eudora/src/nsEudoraStringBundle.cpp @@ -45,8 +45,7 @@ nsIStringBundle *nsEudoraStringBundle::GetStringBundle( void) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv); if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) { - nsILocale * locale = nsnull; - rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle); + rv = sBundleService->CreateBundle(propertyURL, &sBundle); } m_pBundle = sBundle; diff --git a/mozilla/mailnews/import/oexpress/nsOEStringBundle.cpp b/mozilla/mailnews/import/oexpress/nsOEStringBundle.cpp index c878a4d8649..4d52c6e5d8e 100644 --- a/mozilla/mailnews/import/oexpress/nsOEStringBundle.cpp +++ b/mozilla/mailnews/import/oexpress/nsOEStringBundle.cpp @@ -48,8 +48,7 @@ nsIStringBundle *nsOEStringBundle::GetStringBundle( void) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv); if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) { - nsILocale * locale = nsnull; - rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle); + rv = sBundleService->CreateBundle(propertyURL, &sBundle); } m_pBundle = sBundle; diff --git a/mozilla/mailnews/import/outlook/src/nsOutlookStringBundle.cpp b/mozilla/mailnews/import/outlook/src/nsOutlookStringBundle.cpp index 39cab858110..ef4439aca07 100644 --- a/mozilla/mailnews/import/outlook/src/nsOutlookStringBundle.cpp +++ b/mozilla/mailnews/import/outlook/src/nsOutlookStringBundle.cpp @@ -48,8 +48,7 @@ nsIStringBundle *nsOutlookStringBundle::GetStringBundle( void) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv); if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) { - nsILocale * locale = nsnull; - rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle); + rv = sBundleService->CreateBundle(propertyURL, &sBundle); } m_pBundle = sBundle; diff --git a/mozilla/mailnews/import/src/nsImportStringBundle.cpp b/mozilla/mailnews/import/src/nsImportStringBundle.cpp index 9a7276283b2..fda810a0ad0 100644 --- a/mozilla/mailnews/import/src/nsImportStringBundle.cpp +++ b/mozilla/mailnews/import/src/nsImportStringBundle.cpp @@ -48,8 +48,7 @@ nsIStringBundle *nsImportStringBundle::GetStringBundle( void) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv); if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) { - nsILocale * locale = nsnull; - rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle); + rv = sBundleService->CreateBundle(propertyURL, &sBundle); } m_pBundle = sBundle; diff --git a/mozilla/mailnews/import/text/src/nsTextStringBundle.cpp b/mozilla/mailnews/import/text/src/nsTextStringBundle.cpp index 657c135fbba..e24f720872e 100644 --- a/mozilla/mailnews/import/text/src/nsTextStringBundle.cpp +++ b/mozilla/mailnews/import/text/src/nsTextStringBundle.cpp @@ -45,8 +45,7 @@ nsIStringBundle *nsTextStringBundle::GetStringBundle( void) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &rv); if (NS_SUCCEEDED(rv) && (nsnull != sBundleService)) { - nsILocale * locale = nsnull; - rv = sBundleService->CreateBundle(propertyURL, locale, &sBundle); + rv = sBundleService->CreateBundle(propertyURL, &sBundle); } m_pBundle = sBundle; diff --git a/mozilla/mailnews/local/src/nsLocalStringBundle.cpp b/mozilla/mailnews/local/src/nsLocalStringBundle.cpp index 019ad8ac141..04085bfeb03 100644 --- a/mozilla/mailnews/local/src/nsLocalStringBundle.cpp +++ b/mozilla/mailnews/local/src/nsLocalStringBundle.cpp @@ -85,7 +85,7 @@ nsLocalStringService::InitializeStringBundle() NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_TRUE(stringService, NS_ERROR_FAILURE); - rv = stringService->CreateBundle(LOCAL_MSGS_URL, nsnull, getter_AddRefs(mLocalStringBundle)); + rv = stringService->CreateBundle(LOCAL_MSGS_URL, getter_AddRefs(mLocalStringBundle)); return rv; } diff --git a/mozilla/mailnews/local/src/nsPop3IncomingServer.cpp b/mozilla/mailnews/local/src/nsPop3IncomingServer.cpp index 29321887173..d0e3af056b0 100644 --- a/mozilla/mailnews/local/src/nsPop3IncomingServer.cpp +++ b/mozilla/mailnews/local/src/nsPop3IncomingServer.cpp @@ -102,7 +102,6 @@ nsPop3IncomingServer::initializeStrings() nsCOMPtr bundle; rv = bundleService->CreateBundle("chrome://messenger/locale/messenger.properties", - nsnull, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); diff --git a/mozilla/mailnews/mime/cthandlers/signstub/nsSignedStub.cpp b/mozilla/mailnews/mime/cthandlers/signstub/nsSignedStub.cpp index baaabb18c0f..83cef928048 100644 --- a/mozilla/mailnews/mime/cthandlers/signstub/nsSignedStub.cpp +++ b/mozilla/mailnews/mime/cthandlers/signstub/nsSignedStub.cpp @@ -215,7 +215,7 @@ nsCOMPtr stringBundle = nsnull; NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - res = sBundleService->CreateBundle(propertyURL, nsnull, getter_AddRefs(stringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle)); } } diff --git a/mozilla/mailnews/mime/cthandlers/vcard/mimevcrd.cpp b/mozilla/mailnews/mime/cthandlers/vcard/mimevcrd.cpp index bdd69699492..50c2fe33f9d 100644 --- a/mozilla/mailnews/mime/cthandlers/vcard/mimevcrd.cpp +++ b/mozilla/mailnews/mime/cthandlers/vcard/mimevcrd.cpp @@ -1867,9 +1867,7 @@ nsCOMPtr stringBundle = nsnull; NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - - res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(stringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle)); } } diff --git a/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp b/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp index 7a9fec28a43..63d336ebd74 100644 --- a/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp +++ b/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp @@ -192,9 +192,7 @@ nsMimeBaseEmitter::MimeGetStringByName(const char *aHeaderName) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - - res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(m_stringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(m_stringBundle)); } } diff --git a/mozilla/mailnews/mime/src/mimemoz2.cpp b/mozilla/mailnews/mime/src/mimemoz2.cpp index 302e2701df8..5339b004952 100644 --- a/mozilla/mailnews/mime/src/mimemoz2.cpp +++ b/mozilla/mailnews/mime/src/mimemoz2.cpp @@ -1814,9 +1814,7 @@ MimeGetStringByID(PRInt32 stringID) NS_WITH_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, &res); if (NS_SUCCEEDED(res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - - res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(stringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(stringBundle)); } } diff --git a/mozilla/mailnews/news/src/nsNNTPNewsgroupList.cpp b/mozilla/mailnews/news/src/nsNNTPNewsgroupList.cpp index c3a35830eae..d1366b554f0 100644 --- a/mozilla/mailnews/news/src/nsNNTPNewsgroupList.cpp +++ b/mozilla/mailnews/news/src/nsNNTPNewsgroupList.cpp @@ -268,7 +268,7 @@ nsNNTPNewsgroupList::GetRangeOfArtsToDownload(nsIMsgWindow *aMsgWindow, NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr bundle; - rv = bundleService->CreateBundle(NEWS_MSGS_URL, nsnull, getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); rv = bundle->GetStringFromName(NS_LITERAL_STRING("noNewMessages").get(), getter_Copies(statusString)); @@ -704,7 +704,7 @@ nsNNTPNewsgroupList::ProcessXOVERLINE(const char *line, PRUint32 *status) NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr bundle; - rv = bundleService->CreateBundle(NEWS_MSGS_URL, nsnull, getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); const PRUnichar *formatStrings[2] = { numDownloadedStr.GetUnicode(), totalToDownloadStr.GetUnicode() }; @@ -798,7 +798,7 @@ nsNNTPNewsgroupList::FinishXOVERLINE(int status, int *newstatus) NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr bundle; - rv = bundleService->CreateBundle(NEWS_MSGS_URL, nsnull, getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); const PRUnichar *formatStrings[2] = { firstStr.GetUnicode(), lastStr.GetUnicode() }; diff --git a/mozilla/mailnews/news/src/nsNNTPProtocol.cpp b/mozilla/mailnews/news/src/nsNNTPProtocol.cpp index 78410bcf37a..a0c5c36a246 100644 --- a/mozilla/mailnews/news/src/nsNNTPProtocol.cpp +++ b/mozilla/mailnews/news/src/nsNNTPProtocol.cpp @@ -3163,8 +3163,7 @@ PRInt32 nsNNTPProtocol::ReadNewsList(nsIInputStream * inputStream, PRUint32 leng NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr bundle; - rv = bundleService->CreateBundle(NEWS_MSGS_URL, nsnull, - getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); nsAutoString bytesStr; @@ -3625,7 +3624,7 @@ nsresult nsNNTPProtocol::GetNewsStringByID(PRInt32 stringID, PRUnichar **aString nsCOMPtr bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); - rv = bundleService->CreateBundle(propertyURL, nsnull, getter_AddRefs(m_stringBundle)); + rv = bundleService->CreateBundle(propertyURL, getter_AddRefs(m_stringBundle)); NS_ENSURE_SUCCESS(rv, rv); } @@ -3661,7 +3660,7 @@ nsresult nsNNTPProtocol::GetNewsStringByName(const char *aName, PRUnichar **aStr nsCOMPtr bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); - rv = bundleService->CreateBundle(propertyURL, nsnull, getter_AddRefs(m_stringBundle)); + rv = bundleService->CreateBundle(propertyURL, getter_AddRefs(m_stringBundle)); } if (m_stringBundle) @@ -3858,7 +3857,7 @@ nsNNTPProtocol::SetCheckingForNewNewsStatus(PRInt32 current, PRInt32 total) NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr bundle; - rv = bundleService->CreateBundle(NEWS_MSGS_URL, nsnull, getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); nsAutoString thisGroupStr; thisGroupStr.AppendInt(current); diff --git a/mozilla/mailnews/news/src/nsNewsDownloader.cpp b/mozilla/mailnews/news/src/nsNewsDownloader.cpp index 0acc5e0a8c8..f4cd402886f 100644 --- a/mozilla/mailnews/news/src/nsNewsDownloader.cpp +++ b/mozilla/mailnews/news/src/nsNewsDownloader.cpp @@ -192,7 +192,7 @@ PRBool nsNewsDownloader::GetNextHdrToRetrieve() nsCOMPtr bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr bundle; - rv = bundleService->CreateBundle(NEWS_MSGS_URL, nsnull, getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); nsAutoString firstStr; diff --git a/mozilla/mailnews/news/src/nsNewsFolder.cpp b/mozilla/mailnews/news/src/nsNewsFolder.cpp index 1f1f5ff6807..bc3b00d86af 100644 --- a/mozilla/mailnews/news/src/nsNewsFolder.cpp +++ b/mozilla/mailnews/news/src/nsNewsFolder.cpp @@ -949,7 +949,7 @@ nsMsgNewsFolder::DeleteMessages(nsISupportsArray *messages, nsIMsgWindow *aMsgWi NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr bundle; - rv = bundleService->CreateBundle(NEWS_MSGS_URL, nsnull, getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(NEWS_MSGS_URL, getter_AddRefs(bundle)); NS_ENSURE_SUCCESS(rv, rv); nsXPIDLString alertText; diff --git a/mozilla/modules/libpref/src/nsPrefBranch.cpp b/mozilla/modules/libpref/src/nsPrefBranch.cpp index 965ffc66025..4d14775f348 100644 --- a/mozilla/modules/libpref/src/nsPrefBranch.cpp +++ b/mozilla/modules/libpref/src/nsPrefBranch.cpp @@ -623,7 +623,7 @@ nsresult nsPrefBranch::GetDefaultFromPropertiesFile(const char *aPrefName, PRUni return rv; nsCOMPtr bundle; - rv = bundleService->CreateBundle(propertyFileURL, nsnull, + rv = bundleService->CreateBundle(propertyFileURL, getter_AddRefs(bundle)); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index e25aa2bdda8..be03a39e43e 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -68,7 +68,6 @@ #include "nsIWindowWatcher.h" #include "nsHashtable.h" -#include "nsILocale.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptGlobalObjectOwner.h" #include "nsIPrincipal.h" @@ -215,7 +214,6 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) nsCOMPtr regionalBundle; nsCOMPtr uri; char *spec = nsnull; - nsILocale* locale = nsnull; PRBool displayDialogPrefValue = PR_FALSE, checkboxState = PR_FALSE; if (!prefs || !prompt || !io || !strings) { @@ -233,11 +231,11 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) // Taken from mozilla\extensions\wallet\src\wallet.cpp // WalletLocalize(). - rv = strings->CreateBundle(PLUGIN_PROPERTIES_URL, locale, getter_AddRefs(bundle)); + rv = strings->CreateBundle(PLUGIN_PROPERTIES_URL, getter_AddRefs(bundle)); if (NS_FAILED(rv)) { return; } - rv = strings->CreateBundle(PLUGIN_REGIONAL_URL, locale, + rv = strings->CreateBundle(PLUGIN_REGIONAL_URL, getter_AddRefs(regionalBundle)); if (NS_FAILED(rv)) { return; @@ -4478,7 +4476,6 @@ NS_IMETHODIMP nsPluginHostImpl::HandleBadPlugin(PRLibrary* aLibrary) nsCOMPtr bundle; nsCOMPtr uri; char *spec = nsnull; - nsILocale* locale = nsnull; PRInt32 buttonPressed; PRBool checkboxState = PR_FALSE; @@ -4494,7 +4491,7 @@ NS_IMETHODIMP nsPluginHostImpl::HandleBadPlugin(PRLibrary* aLibrary) return rv; } - rv = strings->CreateBundle(spec, locale, getter_AddRefs(bundle)); + rv = strings->CreateBundle(spec, getter_AddRefs(bundle)); nsCRT::free(spec); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp index e25aa2bdda8..be03a39e43e 100644 --- a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -68,7 +68,6 @@ #include "nsIWindowWatcher.h" #include "nsHashtable.h" -#include "nsILocale.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptGlobalObjectOwner.h" #include "nsIPrincipal.h" @@ -215,7 +214,6 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) nsCOMPtr regionalBundle; nsCOMPtr uri; char *spec = nsnull; - nsILocale* locale = nsnull; PRBool displayDialogPrefValue = PR_FALSE, checkboxState = PR_FALSE; if (!prefs || !prompt || !io || !strings) { @@ -233,11 +231,11 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) // Taken from mozilla\extensions\wallet\src\wallet.cpp // WalletLocalize(). - rv = strings->CreateBundle(PLUGIN_PROPERTIES_URL, locale, getter_AddRefs(bundle)); + rv = strings->CreateBundle(PLUGIN_PROPERTIES_URL, getter_AddRefs(bundle)); if (NS_FAILED(rv)) { return; } - rv = strings->CreateBundle(PLUGIN_REGIONAL_URL, locale, + rv = strings->CreateBundle(PLUGIN_REGIONAL_URL, getter_AddRefs(regionalBundle)); if (NS_FAILED(rv)) { return; @@ -4478,7 +4476,6 @@ NS_IMETHODIMP nsPluginHostImpl::HandleBadPlugin(PRLibrary* aLibrary) nsCOMPtr bundle; nsCOMPtr uri; char *spec = nsnull; - nsILocale* locale = nsnull; PRInt32 buttonPressed; PRBool checkboxState = PR_FALSE; @@ -4494,7 +4491,7 @@ NS_IMETHODIMP nsPluginHostImpl::HandleBadPlugin(PRLibrary* aLibrary) return rv; } - rv = strings->CreateBundle(spec, locale, getter_AddRefs(bundle)); + rv = strings->CreateBundle(spec, getter_AddRefs(bundle)); nsCRT::free(spec); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/netwerk/base/src/nsSocketTransportService.cpp b/mozilla/netwerk/base/src/nsSocketTransportService.cpp index 4e407c65e0d..dd30122ec1a 100644 --- a/mozilla/netwerk/base/src/nsSocketTransportService.cpp +++ b/mozilla/netwerk/base/src/nsSocketTransportService.cpp @@ -696,8 +696,7 @@ nsSocketTransportService::GetNeckoStringByName (const char *aName, PRUnichar **a NS_WITH_PROXIED_SERVICE(nsIStringBundleService, sBundleService, kStringBundleServiceCID, NS_UI_THREAD_EVENTQ, &res); if (NS_SUCCEEDED (res) && (nsnull != sBundleService)) { - nsILocale *locale = nsnull; - res = sBundleService->CreateBundle(propertyURL, locale, getter_AddRefs(m_stringBundle)); + res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(m_stringBundle)); } } diff --git a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp index d7809dfc99c..a6eac3bba0f 100644 --- a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp @@ -2056,7 +2056,7 @@ nsPrefMigration::DetermineOldPath(nsIFileSpec *profilePath, const char *oldPathN if (NS_FAILED(rv)) return rv; nsCOMPtr bundle; - rv = bundleService->CreateBundle(MIGRATION_PROPERTIES_URL, nsnull, getter_AddRefs(bundle)); + rv = bundleService->CreateBundle(MIGRATION_PROPERTIES_URL, getter_AddRefs(bundle)); if (NS_FAILED(rv)) return rv; nsXPIDLString localizedDirName; diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index 02c183b1705..e82dc39c9c8 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -1298,9 +1298,8 @@ GetTitleSuffix(void) NS_RELEASE(service); return suffix; } - nsILocale* locale = nsnull; nsIStringBundle* bundle = nsnull; - ret = service->CreateBundle(url, locale, &bundle); + ret = service->CreateBundle(url, &bundle); NS_RELEASE(url); if (NS_FAILED(ret)) { NS_RELEASE(service); diff --git a/mozilla/widget/src/xpwidgets/nsBaseFilePicker.cpp b/mozilla/widget/src/xpwidgets/nsBaseFilePicker.cpp index ea38fc331c7..7cb3d6e28a1 100644 --- a/mozilla/widget/src/xpwidgets/nsBaseFilePicker.cpp +++ b/mozilla/widget/src/xpwidgets/nsBaseFilePicker.cpp @@ -119,9 +119,8 @@ nsBaseFilePicker::AppendFilters(PRInt32 aFilterMask) nsresult rv; nsCOMPtr stringService = do_GetService(kStringBundleServiceCID); nsCOMPtr stringBundle; - nsILocale *locale = nsnull; - rv = stringService->CreateBundle(FILEPICKER_PROPERTIES, locale, getter_AddRefs(stringBundle)); + rv = stringService->CreateBundle(FILEPICKER_PROPERTIES, getter_AddRefs(stringBundle)); if (NS_FAILED(rv)) return NS_ERROR_FAILURE; diff --git a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp index d7a12056d89..e9184d2e413 100644 --- a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp +++ b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp @@ -1634,9 +1634,8 @@ nsBookmarksService::Init() char *spec = nsnull; if (NS_SUCCEEDED(rv = uri->GetSpec(&spec)) && (spec)) { - nsCOMPtr locale = nsnull; if (NS_SUCCEEDED(rv = stringService->CreateBundle(spec, - locale, getter_AddRefs(mBundle)))) + getter_AddRefs(mBundle)))) { } nsCRT::free(spec); diff --git a/mozilla/xpfe/components/filepicker/src/nsFilePicker.js b/mozilla/xpfe/components/filepicker/src/nsFilePicker.js index e4dd96b2eb2..9714189b964 100644 --- a/mozilla/xpfe/components/filepicker/src/nsFilePicker.js +++ b/mozilla/xpfe/components/filepicker/src/nsFilePicker.js @@ -41,7 +41,6 @@ const FILEPICKER_CONTRACTID = "@mozilla.org/filepicker;1"; const FILEPICKER_CID = Components.ID("{54ae32f8-1dd2-11b2-a209-df7c505370f8}"); const LOCAL_FILE_CONTRACTID = "@mozilla.org/file/local;1"; const APPSHELL_SERV_CONTRACTID = "@mozilla.org/appshell/appShellService;1"; -const LOCALE_SERV_CONTRACTID = "@mozilla.org/intl/nslocaleservice;1"; const STRBUNDLE_SERV_CONTRACTID = "@mozilla.org/intl/stringbundle;1"; const nsIAppShellService = Components.interfaces.nsIAppShellService; @@ -52,7 +51,6 @@ const nsIFactory = Components.interfaces.nsIFactory; const nsIFilePicker = Components.interfaces.nsIFilePicker; const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor const nsIDOMWindow = Components.interfaces.nsIDOMWindow; -const nsILocaleService = Components.interfaces.nsILocaleService; const nsIStringBundleService = Components.interfaces.nsIStringBundleService; var bundle = null; @@ -247,29 +245,8 @@ function NSGetModule(compMgr, fileSpec) { /* crap from strres.js that I want to use for string bundles since I can't include another .js file.... */ var strBundleService = null; -var localeService = null; -function srGetAppLocale() -{ - var applicationLocale = null; - - if (!localeService) { - try { - localeService = Components.classes[LOCALE_SERV_CONTRACTID].getService(nsILocaleService); - } catch (ex) { - dump("\n--** localeService failed: " + ex + "\n"); - return null; - } - } - - applicationLocale = localeService.GetApplicationLocale(); - if (!applicationLocale) { - dump("\n--** localeService.GetApplicationLocale failed **--\n"); - } - return applicationLocale; -} - -function srGetStrBundleWithLocale(path, locale) +function srGetStrBundle(path) { var strBundle = null; @@ -282,16 +259,10 @@ function srGetStrBundleWithLocale(path, locale) } } - strBundle = strBundleService.CreateBundle(path, locale); + strBundle = strBundleService.CreateBundle(path); if (!strBundle) { dump("\n--** strBundle createInstance failed **--\n"); } return strBundle; } -function srGetStrBundle(path) -{ - var appLocale = srGetAppLocale(); - return srGetStrBundleWithLocale(path, appLocale); -} - diff --git a/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in b/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in index e4dd96b2eb2..9714189b964 100644 --- a/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in +++ b/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in @@ -41,7 +41,6 @@ const FILEPICKER_CONTRACTID = "@mozilla.org/filepicker;1"; const FILEPICKER_CID = Components.ID("{54ae32f8-1dd2-11b2-a209-df7c505370f8}"); const LOCAL_FILE_CONTRACTID = "@mozilla.org/file/local;1"; const APPSHELL_SERV_CONTRACTID = "@mozilla.org/appshell/appShellService;1"; -const LOCALE_SERV_CONTRACTID = "@mozilla.org/intl/nslocaleservice;1"; const STRBUNDLE_SERV_CONTRACTID = "@mozilla.org/intl/stringbundle;1"; const nsIAppShellService = Components.interfaces.nsIAppShellService; @@ -52,7 +51,6 @@ const nsIFactory = Components.interfaces.nsIFactory; const nsIFilePicker = Components.interfaces.nsIFilePicker; const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor const nsIDOMWindow = Components.interfaces.nsIDOMWindow; -const nsILocaleService = Components.interfaces.nsILocaleService; const nsIStringBundleService = Components.interfaces.nsIStringBundleService; var bundle = null; @@ -247,29 +245,8 @@ function NSGetModule(compMgr, fileSpec) { /* crap from strres.js that I want to use for string bundles since I can't include another .js file.... */ var strBundleService = null; -var localeService = null; -function srGetAppLocale() -{ - var applicationLocale = null; - - if (!localeService) { - try { - localeService = Components.classes[LOCALE_SERV_CONTRACTID].getService(nsILocaleService); - } catch (ex) { - dump("\n--** localeService failed: " + ex + "\n"); - return null; - } - } - - applicationLocale = localeService.GetApplicationLocale(); - if (!applicationLocale) { - dump("\n--** localeService.GetApplicationLocale failed **--\n"); - } - return applicationLocale; -} - -function srGetStrBundleWithLocale(path, locale) +function srGetStrBundle(path) { var strBundle = null; @@ -282,16 +259,10 @@ function srGetStrBundleWithLocale(path, locale) } } - strBundle = strBundleService.CreateBundle(path, locale); + strBundle = strBundleService.CreateBundle(path); if (!strBundle) { dump("\n--** strBundle createInstance failed **--\n"); } return strBundle; } -function srGetStrBundle(path) -{ - var appLocale = srGetAppLocale(); - return srGetStrBundleWithLocale(path, appLocale); -} - diff --git a/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp b/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp index 11dac95a193..85d05737e86 100644 --- a/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp +++ b/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp @@ -2075,7 +2075,7 @@ nsGlobalHistory::Init() do_GetService(kStringBundleServiceCID, &rv); if (NS_SUCCEEDED(rv)) { - rv = bundleService->CreateBundle("chrome://communicator/locale/history/history.properties", nsnull, getter_AddRefs(mBundle)); + rv = bundleService->CreateBundle("chrome://communicator/locale/history/history.properties", getter_AddRefs(mBundle)); } // register to observe profile changes diff --git a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp index 4dc404d9bc5..c4156026590 100755 --- a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp @@ -1058,7 +1058,7 @@ InternetSearchDataSource::GetTarget(nsIRDFResource *source, if (NS_SUCCEEDED(rv) && stringService) { nsCOMPtr bundle; - rv = stringService->CreateBundle(SEARCH_PROPERTIES, nsnull, getter_AddRefs(bundle)); + rv = stringService->CreateBundle(SEARCH_PROPERTIES, getter_AddRefs(bundle)); if (NS_SUCCEEDED(rv) && bundle) { nsXPIDLString valUni; diff --git a/mozilla/xpfe/components/sidebar/src/nsSidebar.js b/mozilla/xpfe/components/sidebar/src/nsSidebar.js index 18003e2ef5a..03928355f96 100644 --- a/mozilla/xpfe/components/sidebar/src/nsSidebar.js +++ b/mozilla/xpfe/components/sidebar/src/nsSidebar.js @@ -425,13 +425,7 @@ function getStringBundle(aURL) { var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(); stringBundleService = stringBundleService.QueryInterface(Components.interfaces.nsIStringBundleService); - var appLocale; - var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"].getService(); - if (localeService) - localeService = localeService.QueryInterface(Components.interfaces.nsILocaleService); - if (localeService) - appLocale = localeService.GetApplicationLocale(); - var stringBundle = stringBundleService.CreateBundle(aURL, appLocale); + var stringBundle = stringBundleService.createBundle(aURL); if (stringBundle) return stringBundle.QueryInterface(Components.interfaces.nsIStringBundle); } diff --git a/mozilla/xpfe/components/ucth/src/nsUnknownContentTypeHandler.cpp b/mozilla/xpfe/components/ucth/src/nsUnknownContentTypeHandler.cpp index f1f3eb9852d..4a74dcd5b53 100644 --- a/mozilla/xpfe/components/ucth/src/nsUnknownContentTypeHandler.cpp +++ b/mozilla/xpfe/components/ucth/src/nsUnknownContentTypeHandler.cpp @@ -258,7 +258,7 @@ nsUnknownContentTypeHandler::PromptForSaveToFile(nsISupports * aWindowContext, c nsCOMPtr stringBundle; NS_ENSURE_TRUE(stringService, NS_ERROR_FAILURE); - NS_ENSURE_SUCCESS(stringService->CreateBundle(HELPERAPP_DIALOG_URL, nsnull, getter_AddRefs(stringBundle)), + NS_ENSURE_SUCCESS(stringService->CreateBundle(HELPERAPP_DIALOG_URL, getter_AddRefs(stringBundle)), NS_ERROR_FAILURE); nsXPIDLString windowTitle; diff --git a/mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp b/mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp index 43117c78272..34c13fb8b79 100644 --- a/mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp +++ b/mozilla/xpfe/components/winhooks/nsWindowsHooks.cpp @@ -279,10 +279,8 @@ nsWindowsHooks::CheckSettings( nsIDOMWindowInternal *aParent ) { if ( promptService && bundleService ) { // Next, get bundle that provides text for dialog. - nsILocale *locale = 0; nsIStringBundle *bundle; rv = bundleService->CreateBundle( "chrome://global/locale/nsWindowsHooks.properties", - locale, getter_AddRefs( &bundle ) ); if ( NS_SUCCEEDED( rv ) && bundle ) { // Get text for dialog and checkbox label. diff --git a/mozilla/xpfe/components/xfer/src/nsStreamTransfer.cpp b/mozilla/xpfe/components/xfer/src/nsStreamTransfer.cpp index bcba84a451e..f2e48ee9a18 100644 --- a/mozilla/xpfe/components/xfer/src/nsStreamTransfer.cpp +++ b/mozilla/xpfe/components/xfer/src/nsStreamTransfer.cpp @@ -239,11 +239,9 @@ nsStreamTransfer::SelectFile( nsIDOMWindowInternal *parent, nsILocalFile **aResu nsCID cid = NS_STRINGBUNDLESERVICE_CID; NS_WITH_SERVICE( nsIStringBundleService, bundleService, cid, &rv ); if ( NS_SUCCEEDED( rv ) ) { - nsILocale *locale = 0; nsIStringBundle *bundle; PRUnichar *pString; rv = bundleService->CreateBundle( "chrome://global/locale/downloadProgress.properties", - locale, getter_AddRefs( &bundle ) ); if ( NS_SUCCEEDED( rv ) ) { rv = bundle->GetStringFromName( NS_ConvertASCIItoUCS2( "FilePickerTitle" ).GetUnicode(), diff --git a/mozilla/xpfe/global/resources/content/strres.js b/mozilla/xpfe/global/resources/content/strres.js index 4e4d2243aef..60a14d068cc 100644 --- a/mozilla/xpfe/global/resources/content/strres.js +++ b/mozilla/xpfe/global/resources/content/strres.js @@ -1,29 +1,6 @@ var strBundleService = null; -var localeService = null; -function srGetAppLocale() -{ - var applicationLocale = null; - - if (!localeService) { - try { - localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"].getService(); - - localeService = localeService.QueryInterface(Components.interfaces.nsILocaleService); - } catch (ex) { - dump("\n--** localeService failed: " + ex + "\n"); - return null; - } - } - - applicationLocale = localeService.GetApplicationLocale(); - if (!applicationLocale) { - dump("\n--** localeService.GetApplicationLocale failed **--\n"); - } - return applicationLocale; -} - -function srGetStrBundleWithLocale(path, locale) +function srGetStrBundle(path) { var strBundle = null; @@ -39,19 +16,13 @@ function srGetStrBundleWithLocale(path, locale) } } - strBundle = strBundleService.CreateBundle(path, locale); + strBundle = strBundleService.createBundle(path); if (!strBundle) { dump("\n--** strBundle createInstance failed **--\n"); } return strBundle; } -function srGetStrBundle(path) -{ - var appLocale = srGetAppLocale(); - return srGetStrBundleWithLocale(path, appLocale); -} - function selectLocale(event) { try { diff --git a/mozilla/xpinstall/src/nsInstall.cpp b/mozilla/xpinstall/src/nsInstall.cpp index 53849295111..68c3923b4ad 100644 --- a/mozilla/xpinstall/src/nsInstall.cpp +++ b/mozilla/xpinstall/src/nsInstall.cpp @@ -181,8 +181,7 @@ nsInstall::nsInstall(nsIZipReader * theJARFile) if (NS_SUCCEEDED(rv) && service) { - nsILocale* locale = nsnull; - rv = service->CreateBundle( XPINSTALL_BUNDLE_URL, locale, + rv = service->CreateBundle( XPINSTALL_BUNDLE_URL, getter_AddRefs(mStringBundle) ); } } @@ -1167,7 +1166,6 @@ nsInstall::LoadResources(JSContext* cx, const nsString& aBaseName, jsval* aRetur nsCOMPtr resFile; nsCOMPtr resFileURL = nsnull; nsIURI *url = nsnull; - nsILocale* locale = nsnull; nsIStringBundleService* service = nsnull; nsIEventQueueService* pEventQueueService = nsnull; nsIStringBundle* bundle = nsnull; @@ -1231,11 +1229,11 @@ nsInstall::LoadResources(JSContext* cx, const nsString& aBaseName, jsval* aRetur nsCRT::free(spec); return ret; } - ret = service->CreateBundle(spec, locale, &bundle); + ret = service->CreateBundle(spec, &bundle); nsCRT::free(spec); } #else - ret = service->CreateBundle(url, locale, &bundle); + ret = service->CreateBundle(url, &bundle); #endif if (NS_FAILED(ret)) goto cleanup; @@ -2487,10 +2485,9 @@ PRUnichar *GetTranslatedString(const PRUnichar* aString) { nsCOMPtr stringService = do_GetService(kStringBundleServiceCID); nsCOMPtr stringBundle; - nsILocale* locale = nsnull; PRUnichar* translatedString; - nsresult rv = stringService->CreateBundle(kInstallLocaleProperties, locale, getter_AddRefs(stringBundle)); + nsresult rv = stringService->CreateBundle(kInstallLocaleProperties, getter_AddRefs(stringBundle)); if (NS_FAILED(rv)) return nsnull; rv = stringBundle->GetStringFromName(aString, &translatedString); diff --git a/mozilla/xpinstall/src/nsXPInstallManager.cpp b/mozilla/xpinstall/src/nsXPInstallManager.cpp index efb4c7fd958..803df344375 100644 --- a/mozilla/xpinstall/src/nsXPInstallManager.cpp +++ b/mozilla/xpinstall/src/nsXPInstallManager.cpp @@ -107,8 +107,7 @@ nsXPInstallManager::nsXPInstallManager() (nsISupports**) &service ); if (NS_SUCCEEDED(rv) && service) { - nsILocale* locale = nsnull; - rv = service->CreateBundle( XPINSTALL_BUNDLE_URL, locale, + rv = service->CreateBundle( XPINSTALL_BUNDLE_URL, getter_AddRefs(mStringBundle) ); nsServiceManager::ReleaseService( kStringBundleServiceCID, service ); } @@ -319,7 +318,7 @@ PRBool nsXPInstallManager::ConfirmChromeInstall(nsIScriptGlobalObject* aGlobalOb kStringBundleServiceCID, &rv ); if (NS_SUCCEEDED(rv) && bundleSvc) { - rv = bundleSvc->CreateBundle( XPINSTALL_BUNDLE_URL, nsnull, + rv = bundleSvc->CreateBundle( XPINSTALL_BUNDLE_URL, getter_AddRefs(xpiBundle) ); if (NS_SUCCEEDED(rv) && xpiBundle) {