mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 20:42:49 +00:00
Bug 337917 Make consumers stop using cids from other modules
r=smontagu sr=darin
This commit is contained in:
parent
2abbddfe0d
commit
a768026fc9
@ -187,9 +187,6 @@ static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kRDFContainerCID, NS_RDFCONTAINER_CID);
|
||||
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kPlatformCharsetCID, NS_PLATFORMCHARSET_CID);
|
||||
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
|
||||
|
||||
static const char kURINC_BookmarksTopRoot[] = "NC:BookmarksTopRoot";
|
||||
@ -672,7 +669,7 @@ BookmarkParser::Init(nsIFile *aFile, nsIRDFDataSource *aDataSource,
|
||||
|
||||
// determine default platform charset...
|
||||
nsCOMPtr<nsIPlatformCharset> platformCharset =
|
||||
do_GetService(kPlatformCharsetCID, &rv);
|
||||
do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (platformCharset))
|
||||
{
|
||||
nsCAutoString defaultCharset;
|
||||
@ -680,7 +677,7 @@ BookmarkParser::Init(nsIFile *aFile, nsIRDFDataSource *aDataSource,
|
||||
{
|
||||
// found the default platform charset, now try and get a decoder from it to Unicode
|
||||
nsCOMPtr<nsICharsetConverterManager> charsetConv =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (charsetConv))
|
||||
{
|
||||
rv = charsetConv->GetUnicodeDecoderRaw(defaultCharset.get(),
|
||||
@ -1134,7 +1131,7 @@ BookmarkParser::ParseMetaTag(const nsString &aLine, nsIUnicodeDecoder **decoder)
|
||||
|
||||
// found a charset, now try and get a decoder from it to Unicode
|
||||
nsICharsetConverterManager *charsetConv;
|
||||
rv = CallGetService(kCharsetConverterManagerCID, &charsetConv);
|
||||
rv = CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &charsetConv);
|
||||
if (NS_SUCCEEDED(rv) && (charsetConv))
|
||||
{
|
||||
rv = charsetConv->GetUnicodeDecoder(charset.get(), decoder);
|
||||
@ -1710,7 +1707,7 @@ nsBookmarksService::Init()
|
||||
getter_AddRefs(uri))))
|
||||
{
|
||||
/* create a bundle for the localization */
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCAutoString spec;
|
||||
|
@ -62,8 +62,6 @@
|
||||
|
||||
#define MIGRATION_BUNDLE "chrome://browser/locale/migration/migration.properties"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
void SetUnicharPref(const char* aPref, const nsAString& aValue,
|
||||
nsIPrefBranch* aPrefs)
|
||||
{
|
||||
@ -262,7 +260,7 @@ ImportBookmarksHTML(nsIFile* aBookmarksFile,
|
||||
|
||||
// Look for the localized name of the bookmarks toolbar
|
||||
nsCOMPtr<nsIStringBundleService> bundleService =
|
||||
do_GetService(kStringBundleServiceCID, &rv);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
|
@ -96,7 +96,6 @@
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsIWindowsRegKey.h"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
#define TRIDENTPROFILE_BUNDLE "chrome://browser/locale/migration/migration.properties"
|
||||
|
||||
const int sInitialCookieBufferSize = 1024; // but it can grow
|
||||
@ -1132,7 +1131,7 @@ nsIEProfileMigrator::CopyFavorites(PRBool aReplace) {
|
||||
nsCOMPtr<nsIRDFResource> folder;
|
||||
#endif
|
||||
if (!aReplace) {
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
@ -1216,7 +1215,7 @@ nsIEProfileMigrator::CopySmartKeywords(nsIRDFResource* aParentFolder)
|
||||
nsCOMPtr<nsIRDFResource> keywordsFolder, bookmark;
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
bundleService->CreateBundle(TRIDENTPROFILE_BUNDLE, getter_AddRefs(bundle));
|
||||
|
@ -52,8 +52,6 @@
|
||||
|
||||
#define MIGRATION_BUNDLE "chrome://browser/locale/migration/migration.properties"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// nsMacIEProfileMigrator
|
||||
|
||||
@ -191,7 +189,7 @@ nsMacIEProfileMigrator::CopyBookmarks(PRBool aReplace)
|
||||
|
||||
// Look for the localized name of the IE Favorites Bar
|
||||
nsCOMPtr<nsIStringBundleService> bundleService =
|
||||
do_GetService(kStringBundleServiceCID, &rv);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
|
@ -74,7 +74,6 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
#define MIGRATION_BUNDLE "chrome://browser/locale/migration/migration.properties"
|
||||
|
||||
#ifdef XP_WIN
|
||||
@ -1064,7 +1063,7 @@ nsOperaProfileMigrator::CopyBookmarks(PRBool aReplace)
|
||||
nsCOMPtr<nsIRDFResource> parentFolder;
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(kStringBundleServiceCID));
|
||||
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID));
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
bundleService->CreateBundle(MIGRATION_BUNDLE, getter_AddRefs(bundle));
|
||||
if (!aReplace) {
|
||||
|
@ -80,8 +80,6 @@
|
||||
#define SAFARI_DATE_OFFSET 978307200
|
||||
#define MIGRATION_BUNDLE "chrome://browser/locale/migration/migration.properties"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// nsSafariProfileMigrator
|
||||
|
||||
@ -912,7 +910,7 @@ nsSafariProfileMigrator::CopyBookmarks(PRBool aReplace)
|
||||
nsCOMPtr<nsIRDFResource> folder;
|
||||
#endif
|
||||
if (!aReplace) {
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
|
@ -333,16 +333,14 @@ nsNavHistory::Init()
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// collation
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
nsCOMPtr<nsICollationFactory> cfact = do_CreateInstance(
|
||||
kCollationFactoryCID, &rv);
|
||||
NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = cfact->CreateCollation(mLocale, getter_AddRefs(mCollation));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// date formatter
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
mDateFormatter = do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
mDateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// annotation service - just ignore errors
|
||||
|
@ -155,8 +155,6 @@ static NS_DEFINE_CID(kDOMEventGroupCID, NS_DOMEVENTGROUP_CID);
|
||||
static PRLogModuleInfo* gDocumentLeakPRLog;
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
void
|
||||
nsUint32ToContentHashEntry::Destroy()
|
||||
{
|
||||
|
@ -67,8 +67,6 @@
|
||||
#include "nsIXPConnect.h"
|
||||
#include "nsContentErrors.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
@ -867,7 +865,7 @@ nsScriptLoader::ConvertToUTF16(nsIChannel* aChannel, const PRUint8* aData,
|
||||
}
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> charsetConv =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
|
||||
nsCOMPtr<nsIUnicodeDecoder> unicodeDecoder;
|
||||
|
||||
|
@ -92,7 +92,6 @@ static const char* kLoadAsData = "loadAsData";
|
||||
|
||||
// CIDs
|
||||
static NS_DEFINE_CID(kIDOMDOMImplementationCID, NS_DOM_IMPLEMENTATION_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
// State
|
||||
#define XML_HTTP_REQUEST_UNINITIALIZED (1 << 0) // 0
|
||||
@ -1145,7 +1144,7 @@ nsXMLHttpRequest::GetStreamForWString(const PRUnichar* aStr,
|
||||
|
||||
// We want to encode the string as utf-8, so get the right encoder
|
||||
nsCOMPtr<nsICharsetConverterManager> charsetConv =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
|
||||
|
||||
rv = charsetConv->GetUnicodeEncoderRaw("UTF-8",
|
||||
|
@ -47,8 +47,6 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsLocaleCID.h"
|
||||
#include "prmem.h"
|
||||
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
#else
|
||||
#include "txStringUtils.h"
|
||||
#endif
|
||||
@ -96,7 +94,7 @@ nsresult txResultStringComparator::init(const nsAFlatString& aLanguage)
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsICollationFactory> colFactory =
|
||||
do_CreateInstance(kCollationFactoryCID, &rv);
|
||||
do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = colFactory->CreateCollation(locale, getter_AddRefs(mCollation));
|
||||
|
@ -91,10 +91,7 @@
|
||||
#include "nsILocale.h"
|
||||
#include "nsILocaleService.h"
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
@ -138,7 +135,7 @@ nsXULContentUtils::Init()
|
||||
#undef XUL_RESOURCE
|
||||
#undef XUL_LITERAL
|
||||
|
||||
rv = CallCreateInstance(kDateTimeFormatCID, &gFormat);
|
||||
rv = CallCreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &gFormat);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
@ -181,7 +178,7 @@ nsXULContentUtils::GetCollation()
|
||||
rv = localeService->GetApplicationLocale(getter_AddRefs(locale));
|
||||
if (NS_SUCCEEDED(rv) && locale) {
|
||||
nsCOMPtr<nsICollationFactory> colFactory =
|
||||
do_CreateInstance(kCollationFactoryCID);
|
||||
do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID);
|
||||
if (colFactory) {
|
||||
rv = colFactory->CreateCollation(locale, &gCollation);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),
|
||||
|
@ -176,7 +176,6 @@
|
||||
|
||||
static NS_DEFINE_IID(kDeviceContextCID, NS_DEVICE_CONTEXT_CID);
|
||||
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
||||
static NS_DEFINE_CID(kDocumentCharsetInfoCID, NS_DOCUMENTCHARSETINFO_CID);
|
||||
static NS_DEFINE_CID(kDOMScriptObjectFactoryCID,
|
||||
NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
|
||||
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
|
||||
@ -1352,7 +1351,7 @@ nsDocShell::GetDocumentCharsetInfo(nsIDocumentCharsetInfo **
|
||||
|
||||
// if the mDocumentCharsetInfo does not exist already, we create it now
|
||||
if (!mDocumentCharsetInfo) {
|
||||
mDocumentCharsetInfo = do_CreateInstance(kDocumentCharsetInfoCID);
|
||||
mDocumentCharsetInfo = do_CreateInstance(NS_DOCUMENTCHARSETINFO_CONTRACTID);
|
||||
if (!mDocumentCharsetInfo)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -95,8 +95,6 @@
|
||||
#include "jsgc.h" // for WAY_TOO_MUCH_GC, if defined for GC debugging
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
|
||||
#include "nsIStringBundle.h"
|
||||
|
||||
#ifdef MOZ_LOGGING
|
||||
@ -447,7 +445,7 @@ LocaleCompare(JSContext *cx, JSString *src1, JSString *src2, jsval *rval)
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsICollationFactory> colFactory =
|
||||
do_CreateInstance(kCollationFactoryCID, &rv);
|
||||
do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = colFactory->CreateCollation(locale, &gCollation);
|
||||
|
@ -99,8 +99,6 @@ static NS_DEFINE_IID(kPrinterEnumeratorCID, NS_PRINTER_ENUMERATOR_CID);
|
||||
// This is for extending the dialog
|
||||
#include <dlgs.h>
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
// For PrintDlgEx
|
||||
// needed because there are unicode/ansi versions of this routine
|
||||
// and we need to make sure we get the correct one.
|
||||
@ -371,7 +369,7 @@ GetLocalizedBundle(const char * aPropFileName, nsIStringBundle** aStrBundle)
|
||||
|
||||
// Create bundle
|
||||
nsCOMPtr<nsIStringBundleService> stringService =
|
||||
do_GetService(kStringBundleServiceCID, &rv);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && stringService) {
|
||||
rv = stringService->CreateBundle(aPropFileName, aStrBundle);
|
||||
}
|
||||
|
@ -53,8 +53,6 @@ static const char kQuestionIconClass[] = "question-icon";
|
||||
static const char kAlertIconClass[] = "alert-icon";
|
||||
static const char kWarningIconClass[] = "message-icon";
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
#define kCommonDialogsProperties "chrome://global/locale/commonDialogs.properties"
|
||||
|
||||
|
||||
@ -666,7 +664,7 @@ nsPromptService::GetLocaleString(const char *aKey, PRUnichar **aResult)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID);
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
||||
nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
|
||||
rv = stringService->CreateBundle(kCommonDialogsProperties, getter_AddRefs(stringBundle));
|
||||
|
@ -89,8 +89,6 @@ static NS_DEFINE_IID(kPrinterEnumeratorCID, NS_PRINTER_ENUMERATOR_CID);
|
||||
// This is for extending the dialog
|
||||
#include <dlgs.h>
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
// For PrintDlgEx
|
||||
// needed because there are unicode/ansi versions of this routine
|
||||
// and we need to make sure we get the correct one.
|
||||
@ -358,7 +356,7 @@ GetLocalizedBundle(const char * aPropFileName, nsIStringBundle** aStrBundle)
|
||||
|
||||
// Create bundle
|
||||
nsCOMPtr<nsIStringBundleService> stringService =
|
||||
do_GetService(kStringBundleServiceCID, &rv);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && stringService) {
|
||||
rv = stringService->CreateBundle(aPropFileName, aStrBundle);
|
||||
}
|
||||
|
@ -12,9 +12,6 @@
|
||||
#include "nsUnicharUtilCIID.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
|
||||
|
||||
#ifdef __SUNPRO_CC // for SunONE Studio compiler
|
||||
using namespace std;
|
||||
#endif
|
||||
@ -197,7 +194,7 @@ struct cs_info * get_current_cs(const char * es) {
|
||||
nsCOMPtr<nsICaseConversion> caseConv;
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return nsnull;
|
||||
|
||||
@ -208,7 +205,7 @@ struct cs_info * get_current_cs(const char * es) {
|
||||
return nsnull;
|
||||
rv = ccm->GetUnicodeDecoder(es, getter_AddRefs(decoder));
|
||||
|
||||
caseConv = do_GetService(kUnicharUtilCID, &rv);
|
||||
caseConv = do_GetService(NS_UNICHARUTIL_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return nsnull;
|
||||
|
||||
|
@ -71,8 +71,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
const PRInt32 kFirstDirSize=8;
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(mozMySpell, mozISpellCheckingEngine)
|
||||
|
||||
@ -145,7 +143,7 @@ NS_IMETHODIMP mozMySpell::SetDictionary(const PRUnichar *aDictionary)
|
||||
if (!mMySpell)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = ccm->GetUnicodeDecoder(mMySpell->get_dic_encoding(), getter_AddRefs(mDecoder));
|
||||
|
@ -43,8 +43,6 @@
|
||||
#include "nsCRT.h"
|
||||
#include "cattable.h"
|
||||
|
||||
static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(mozEnglishWordUtils, mozISpellI18NUtil)
|
||||
|
||||
mozEnglishWordUtils::mozEnglishWordUtils()
|
||||
@ -81,7 +79,7 @@ NS_IMETHODIMP mozEnglishWordUtils::GetRootForm(const PRUnichar *aWord, PRUint32
|
||||
*count = 0;
|
||||
|
||||
if (!mCaseConv) {
|
||||
mCaseConv = do_GetService(kUnicharUtilCID);
|
||||
mCaseConv = do_GetService(NS_UNICHARUTIL_CONTRACTID);
|
||||
if (!mCaseConv)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -52,7 +52,6 @@
|
||||
#include "nsStringEnumerator.h"
|
||||
|
||||
#define MOZ_PERSONAL_DICT_NAME "persdict.dat"
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
const int kMaxWordLen=256;
|
||||
|
||||
|
@ -47,7 +47,6 @@
|
||||
#include "nsITreeColumns.h"
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
PRInt32 mozSqlResult::gRefCnt = 0;
|
||||
nsIRDFService* mozSqlResult::gRDFService;
|
||||
@ -80,7 +79,7 @@ mozSqlResult::Init()
|
||||
rv = CallGetService(kRDFServiceCID, &gRDFService);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = CallCreateInstance(kDateTimeFormatCID, &gFormat);
|
||||
rv = CallCreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &gFormat);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = gRDFService->GetResource(NS_LITERAL_CSTRING("SQL:ResultRoot"),
|
||||
|
@ -128,7 +128,6 @@ NS_IMPL_ADDREF(nsTypeAheadFind)
|
||||
NS_IMPL_RELEASE(nsTypeAheadFind)
|
||||
|
||||
static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
|
||||
static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
|
||||
@ -284,7 +283,7 @@ nsTypeAheadFind::PrefsReset()
|
||||
|
||||
// Initialize string bundle
|
||||
nsCOMPtr<nsIStringBundleService> stringBundleService =
|
||||
do_GetService(kStringBundleServiceCID);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
||||
|
||||
if (stringBundleService)
|
||||
stringBundleService->CreateBundle(TYPEAHEADFIND_BUNDLE_URL,
|
||||
|
@ -90,8 +90,6 @@ static FT_Error nsFreeType2__DummyFunc();
|
||||
|
||||
static nsHashtable* gFreeTypeFaces = nsnull;
|
||||
|
||||
static NS_DEFINE_CID(kCharSetManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
//
|
||||
// Define the FreeType2 functions we resolve at run time.
|
||||
// see the comment near nsFreeType2::DoneFace() for more info
|
||||
@ -786,7 +784,7 @@ nsFreeType2::GetCharSetManager()
|
||||
//
|
||||
// get the sCharSetManager
|
||||
//
|
||||
CallGetService(kCharSetManagerCID, &sCharSetManager);
|
||||
CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &sCharSetManager);
|
||||
NS_ASSERTION(sCharSetManager,"failed to create the charset manager");
|
||||
}
|
||||
return sCharSetManager;
|
||||
|
@ -153,9 +153,7 @@ struct nsFontPropertyName
|
||||
int mValue;
|
||||
};
|
||||
|
||||
static NS_DEFINE_CID(kCharSetManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kSaveAsCharsetCID, NS_SAVEASCHARSET_CID);
|
||||
static void SetCharsetLangGroup(nsFontCharSetInfo* aCharSetInfo);
|
||||
|
||||
static int gFontMetricsGTKCount = 0;
|
||||
@ -1090,7 +1088,7 @@ InitGlobals(nsIDeviceContext *aDevice)
|
||||
|
||||
aDevice->GetCanonicalPixelScale(gDevScale);
|
||||
|
||||
CallGetService(kCharSetManagerCID, &gCharSetManager);
|
||||
CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &gCharSetManager);
|
||||
if (!gCharSetManager) {
|
||||
FreeGlobals();
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -3001,7 +2999,7 @@ nsFontGTKSubstitute::Convert(const PRUnichar* aSrc, PRUint32 aSrcLen,
|
||||
{
|
||||
nsresult res;
|
||||
if (!gFontSubConverter) {
|
||||
CallCreateInstance(kSaveAsCharsetCID, &gFontSubConverter);
|
||||
CallCreateInstance(NS_SAVEASCHARSET_CONTRACTID, &gFontSubConverter);
|
||||
if (gFontSubConverter) {
|
||||
res = gFontSubConverter->Init("ISO-8859-1",
|
||||
nsISaveAsCharset::attr_FallbackQuestionMark +
|
||||
|
@ -84,8 +84,6 @@ NS_IMETHODIMP nsFontCleanupObserver::Observe(nsISupports *aSubject, const char *
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
static nsIPersistentProperties* gFontEncodingProperties = nsnull;
|
||||
static nsICharsetConverterManager* gCharsetManager = nsnull;
|
||||
static nsObjectHashtable* gFontMaps = nsnull;
|
||||
@ -529,7 +527,7 @@ GetConverter(const nsCString& aFontName, nsIUnicodeEncoder** aConverter)
|
||||
|
||||
if (!gCharsetManager)
|
||||
{
|
||||
rv = CallGetService(kCharsetConverterManagerCID, &gCharsetManager);
|
||||
rv = CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &gCharsetManager);
|
||||
if(NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,6 @@
|
||||
|
||||
#define STACK_TRESHOLD 1000
|
||||
|
||||
static NS_DEFINE_CID(kSaveAsCharsetCID, NS_SAVEASCHARSET_CID);
|
||||
|
||||
//#define DISABLE_TEC_FALLBACK
|
||||
//#define DISABLE_PRECOMPOSEHANGUL_FALLBACK
|
||||
//#define DISABLE_LATINL_FALLBACK
|
||||
@ -681,7 +679,7 @@ PRBool nsUnicodeRenderingToolkit :: LoadTransliterator()
|
||||
return PR_TRUE;
|
||||
|
||||
nsresult res;
|
||||
mTrans = do_CreateInstance(kSaveAsCharsetCID, &res);
|
||||
mTrans = do_CreateInstance(NS_SAVEASCHARSET_CONTRACTID, &res);
|
||||
if ( NS_SUCCEEDED(res) )
|
||||
{
|
||||
res = mTrans->Init("x-mac-roman",
|
||||
|
@ -68,9 +68,7 @@
|
||||
|
||||
#define NS_REPLACEMENT_CHAR PRUnichar(0x003F) // question mark
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kLocaleServiceCID, NS_LOCALESERVICE_CID);
|
||||
|
||||
#define NS_MAX_FONT_WEIGHT 900
|
||||
#define NS_MIN_FONT_WEIGHT 100
|
||||
|
@ -75,13 +75,11 @@ ConverterInfo gConverterInfo[eCONVERTER_COUNT] =
|
||||
{ 1361, "x-johab", nsnull, nsnull }
|
||||
};
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
nsISupports*
|
||||
OS2Uni::GetUconvObject(int aCodePage, ConverterRequest aReq)
|
||||
{
|
||||
if (gCharsetManager == nsnull) {
|
||||
CallGetService(kCharsetConverterManagerCID, &gCharsetManager);
|
||||
CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &gCharsetManager);
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
|
@ -110,7 +110,6 @@ class fpCString : public nsCAutoString {
|
||||
#define NS_IS_BOLD(x) (((x) >= 401) ? 1 : 0)
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
/*
|
||||
* global
|
||||
@ -2858,7 +2857,7 @@ static void PrefEnumCallback(const char *aName, void *aClosure)
|
||||
if (psnativecode) {
|
||||
nsAutoString str;
|
||||
nsCOMPtr<nsICharsetConverterManager> ccMain =
|
||||
do_GetService(kCharsetConverterManagerCID, &res);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
|
||||
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
res = ccMain->GetUnicodeEncoder(psnativecode.get(), &linfo->mEncoder);
|
||||
|
@ -135,7 +135,6 @@ static PRUint16* GenerateMultiByte(nsCharsetInfo* aSelf);
|
||||
static PRBool LookupWinFontName(const nsAFlatString& aName,
|
||||
nsAString& aWinName);
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
nsVoidArray* nsFontMetricsWin::gGlobalFonts = nsnull;
|
||||
@ -356,7 +355,7 @@ private:
|
||||
static nsresult
|
||||
InitGlobals(void)
|
||||
{
|
||||
CallGetService(kCharsetConverterManagerCID, &gCharsetManager);
|
||||
CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &gCharsetManager);
|
||||
if (!gCharsetManager) {
|
||||
FreeGlobals();
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
#define NS_DATETIMEFORMAT_CONTRACTID "@mozilla.org/intl/datetimeformat;1"
|
||||
|
||||
// {0704E7C0-A758-11d2-9119-006008A6EDF6}
|
||||
#define NS_DATETIMEFORMAT_CID \
|
||||
|
@ -69,7 +69,6 @@
|
||||
#include "nsISupportsArray.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
// done I10N
|
||||
|
||||
|
||||
|
@ -80,8 +80,6 @@
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
nsIFrame*
|
||||
NS_NewIsIndexFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
@ -472,7 +470,7 @@ NS_IMETHODIMP nsIsIndexFrame::GetEncoder(nsIUnicodeEncoder** encoder)
|
||||
|
||||
// Get Charset, get the encoder.
|
||||
nsICharsetConverterManager * ccm = nsnull;
|
||||
rv = CallGetService(kCharsetConverterManagerCID, &ccm);
|
||||
rv = CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &ccm);
|
||||
if(NS_SUCCEEDED(rv) && (nsnull != ccm)) {
|
||||
rv = ccm->GetUnicodeEncoderRaw(charset.get(), encoder);
|
||||
NS_RELEASE(ccm);
|
||||
|
@ -55,7 +55,6 @@
|
||||
|
||||
// DateTime Includes
|
||||
#include "nsDateTimeFormatCID.h"
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
#define OFFSET_NOT_SET -1
|
||||
|
||||
@ -366,7 +365,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
// Create current Date/Time String
|
||||
if (!mDateFormatter)
|
||||
mDateFormatter = do_CreateInstance(kDateTimeFormatCID);
|
||||
mDateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID);
|
||||
#ifndef WINCE
|
||||
NS_ENSURE_TRUE(mDateFormatter, NS_ERROR_FAILURE);
|
||||
|
||||
|
@ -121,8 +121,6 @@ nsAutoTextBuffer::GrowTo(PRInt32 aNewSize, PRBool aCopyToHead)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
|
||||
|
||||
static nsICaseConversion* gCaseConv = nsnull;
|
||||
|
||||
nsresult
|
||||
@ -149,7 +147,7 @@ static nsresult EnsureCaseConv()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
if (!gCaseConv) {
|
||||
res = CallGetService(kUnicharUtilCID, &gCaseConv);
|
||||
res = CallGetService(NS_UNICHARUTIL_CONTRACTID, &gCaseConv);
|
||||
NS_ASSERTION( NS_SUCCEEDED(res), "cannot get UnicharUtil");
|
||||
NS_ASSERTION( gCaseConv != NULL, "cannot get UnicharUtil");
|
||||
}
|
||||
|
@ -66,9 +66,6 @@
|
||||
#include "nsFileSpec.h"
|
||||
#include "nsFileStream.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
#define MIGRATION_PROPERTIES_URL "chrome://messenger/locale/migration/migration.properties"
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
@ -1852,7 +1849,7 @@ nsresult nsDogbertProfileMigrator::DetermineOldPath(nsIFileSpec *profilePath, co
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
/* get the string bundle, and get the appropriate localized string out of it */
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
@ -2193,7 +2190,7 @@ static nsresult ConvertStringToUTF8(const char* aCharset, const char* inString,
|
||||
|
||||
nsresult rv;
|
||||
// convert result to unicode
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
|
||||
if(NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr <nsIUnicodeDecoder> decoder; // this may be cached
|
||||
|
@ -59,8 +59,6 @@
|
||||
#include "prprf.h"
|
||||
#include "nsVoidArray.h"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
#define MIGRATION_BUNDLE "chrome://messenger/locale/migration/migration.properties"
|
||||
|
||||
#define FILE_NAME_PREFS_5X NS_LITERAL_STRING("prefs.js")
|
||||
@ -69,7 +67,7 @@ static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
// nsNetscapeProfileMigratorBase
|
||||
nsNetscapeProfileMigratorBase::nsNetscapeProfileMigratorBase()
|
||||
{
|
||||
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(kStringBundleServiceCID));
|
||||
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID));
|
||||
bundleService->CreateBundle(MIGRATION_BUNDLE, getter_AddRefs(mBundle));
|
||||
|
||||
// create the array we'll be using to keep track of the asynchronous file copy routines
|
||||
|
@ -73,8 +73,6 @@
|
||||
// also, our default primary sort
|
||||
#define GENERATED_NAME_COLUMN_ID "GeneratedName"
|
||||
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS4(nsAbView, nsIAbView, nsITreeView, nsIAbListener, nsIObserver)
|
||||
|
||||
nsAbView::nsAbView()
|
||||
@ -783,7 +781,7 @@ nsresult nsAbView::GenerateCollationKeysForCard(const PRUnichar *colID, AbCard *
|
||||
rv = localeSvc->GetApplicationLocale(getter_AddRefs(locale));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(kCollationFactoryCID, &rv);
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = factory->CreateCollation(locale, getter_AddRefs(mCollationKeyGenerator));
|
||||
|
@ -61,8 +61,6 @@
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
|
||||
#define NC_RDF_DIRNAME "http://home.netscape.com/NC-rdf#DirName"
|
||||
#define NC_RDF_DIRURI "http://home.netscape.com/NC-rdf#DirUri"
|
||||
#define NC_RDF_ISMAILLIST "http://home.netscape.com/NC-rdf#IsMailList"
|
||||
@ -732,7 +730,7 @@ nsresult nsAbDirectoryDataSource::CreateCollationKey(const nsString &aSource, P
|
||||
rv = localeSvc->GetApplicationLocale(getter_AddRefs(locale));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(kCollationFactoryCID, &rv);
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = factory->CreateCollation(locale, getter_AddRefs(mCollationKeyGenerator));
|
||||
|
@ -68,8 +68,6 @@
|
||||
#include "nsITreeColumns.h"
|
||||
#include "nsTextFormatter.h"
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
nsrefcnt nsMsgDBView::gInstanceCount = 0;
|
||||
|
||||
#ifdef SUPPORT_PRIORITY_COLORS
|
||||
@ -600,7 +598,7 @@ nsresult nsMsgDBView::FetchDate(nsIMsgDBHdr * aHdr, PRUnichar ** aDateString)
|
||||
nsAutoString formattedDateString;
|
||||
|
||||
if (!mDateFormater)
|
||||
mDateFormater = do_CreateInstance(kDateTimeFormatCID);
|
||||
mDateFormater = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID);
|
||||
|
||||
NS_ENSURE_TRUE(mDateFormater, NS_ERROR_FAILURE);
|
||||
nsresult rv = aHdr->GetDate(&dateOfMsg);
|
||||
|
@ -98,7 +98,6 @@ static PRTime gtimeOfLastPurgeCheck; //variable to know when to check for pur
|
||||
#define PREF_MAIL_WARN_FILTER_CHANGED "mail.warn_filter_changed"
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
static NS_DEFINE_CID(kCMailDB, NS_MAILDB_CID);
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
|
||||
@ -2168,7 +2167,7 @@ nsMsgDBFolder::createCollationKeyGenerator()
|
||||
rv = localeSvc->GetApplicationLocale(getter_AddRefs(locale));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(kCollationFactoryCID, &rv);
|
||||
nsCOMPtr <nsICollationFactory> factory = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = factory->CreateCollation(locale, &gCollationKeyGenerator);
|
||||
|
@ -64,9 +64,6 @@
|
||||
#include "nsFileSpec.h"
|
||||
#include "plstr.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kEntityConverterCID, NS_ENTITYCONVERTER_CID);
|
||||
|
||||
//
|
||||
// International functions necessary for composition
|
||||
//
|
||||
@ -264,7 +261,7 @@ PRBool nsMsgI18Nstateful_charset(const char *charset)
|
||||
PRBool nsMsgI18Nmultibyte_charset(const char *charset)
|
||||
{
|
||||
nsresult res;
|
||||
nsCOMPtr <nsICharsetConverterManager> ccm = do_GetService(kCharsetConverterManagerCID, &res);
|
||||
nsCOMPtr <nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
|
||||
PRBool result = PR_FALSE;
|
||||
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
@ -287,7 +284,7 @@ PRBool nsMsgI18Ncheck_data_in_charset_range(const char *charset, const PRUnichar
|
||||
nsresult res;
|
||||
PRBool result = PR_TRUE;
|
||||
|
||||
nsCOMPtr <nsICharsetConverterManager> ccm = do_GetService(kCharsetConverterManagerCID, &res);
|
||||
nsCOMPtr <nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
|
||||
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
nsCOMPtr <nsIUnicodeEncoder> encoder;
|
||||
@ -401,7 +398,7 @@ nsresult nsMsgI18NConvertToEntity(const nsString& inString, nsString* outString)
|
||||
nsresult res;
|
||||
|
||||
outString->Truncate();
|
||||
nsCOMPtr <nsIEntityConverter> entityConv = do_CreateInstance(kEntityConverterCID, &res);
|
||||
nsCOMPtr <nsIEntityConverter> entityConv = do_CreateInstance(NS_ENTITYCONVERTER_CONTRACTID, &res);
|
||||
if(NS_SUCCEEDED(res)) {
|
||||
PRUnichar *entities = NULL;
|
||||
res = entityConv->ConvertToEntities(inString.get(), nsIEntityConverter::html40Latin1, &entities);
|
||||
|
@ -126,9 +126,6 @@
|
||||
#include "nsIMsgProgress.h"
|
||||
#include "nsMsgFolderFlags.h"
|
||||
|
||||
// Defines....
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
static void GetReplyHeaderInfo(PRInt32* reply_header_type,
|
||||
nsString& reply_header_locale,
|
||||
nsXPIDLString& reply_header_authorwrote,
|
||||
@ -2045,7 +2042,7 @@ QuotingOutputStreamListener::QuotingOutputStreamListener(const char * originalMs
|
||||
{
|
||||
if (headerDate)
|
||||
{
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter = do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
|
@ -91,8 +91,6 @@ static NS_DEFINE_CID(kCMorkFactory, NS_MORK_CID);
|
||||
#define DEBUG_MSGKEYSET 1
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
|
||||
#define MSG_HASH_SIZE 512
|
||||
|
||||
const PRInt32 kMaxHdrsInCache = 512; // this will be used on discovery, since we don't know total
|
||||
@ -3217,7 +3215,7 @@ nsresult nsMsgDatabase::GetCollationKeyGenerator()
|
||||
// or generate a locale from a stored locale name ("en_US", "fr_FR")
|
||||
//err = localeFactory->NewLocale(&localeName, &locale);
|
||||
|
||||
nsCOMPtr <nsICollationFactory> f = do_CreateInstance(kCollationFactoryCID, &err);
|
||||
nsCOMPtr <nsICollationFactory> f = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &err);
|
||||
if (NS_SUCCEEDED(err) && f)
|
||||
{
|
||||
// get a collation interface instance
|
||||
|
@ -112,7 +112,6 @@ PRLogModuleInfo *IMAP;
|
||||
#define ONE_SECOND ((PRUint32)1000) // one second
|
||||
|
||||
static NS_DEFINE_CID(kSocketTransportServiceCID, NS_SOCKETTRANSPORTSERVICE_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kStreamListenerTeeCID, NS_STREAMLISTENERTEE_CID);
|
||||
|
||||
#define OUTPUT_BUFFER_SIZE (4096*2) // mscott - i should be able to remove this if I can use nsMsgLineBuffer???
|
||||
|
@ -64,7 +64,6 @@
|
||||
#include "nsMsgMimeCID.h"
|
||||
#include "nsDateTimeFormatCID.h"
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
#define VIEW_ALL_HEADERS 2
|
||||
|
||||
/*
|
||||
@ -274,7 +273,7 @@ nsresult nsMimeHtmlDisplayEmitter::GenerateDateString(const char * dateString, n
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (!mDateFormater) {
|
||||
mDateFormater = do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
mDateFormater = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
|
@ -101,8 +101,6 @@ extern "C" int XP_JAVA_GENERAL_FAILURE;
|
||||
extern "C" int XP_JAVA_STARTUP_FAILED;
|
||||
extern "C" int XP_JAVA_DEBUGGER_FAILED;
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
static NS_DEFINE_CID(kJVMManagerCID, NS_JVMMANAGER_CID);
|
||||
|
||||
static NS_DEFINE_CID(kPluginManagerCID, NS_PLUGINMANAGER_CID);
|
||||
@ -191,7 +189,7 @@ nsJVMManager::ShowJavaConsole(void)
|
||||
|
||||
if (!fStartupMessagePosted) {
|
||||
PRUnichar *messageUni;
|
||||
nsCOMPtr<nsIStringBundleService> strings(do_GetService(kStringBundleServiceCID));
|
||||
nsCOMPtr<nsIStringBundleService> strings(do_GetService(NS_STRINGBUNDLE_CONTRACTID));
|
||||
nsCOMPtr<nsIStringBundle> regionalBundle;
|
||||
|
||||
rv = this->GetChrome(getter_AddRefs(chrome));
|
||||
|
@ -69,8 +69,6 @@ static PRLogModuleInfo* gLog;
|
||||
#include "nsCRT.h"
|
||||
#include "nsNativeCharsetUtils.h"
|
||||
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
|
||||
// NOTE: This runs on the _file transport_ thread.
|
||||
// The problem is that now that we're actually doing something with the data,
|
||||
// we want to do stuff like i18n sorting. However, none of the collation stuff
|
||||
@ -176,7 +174,7 @@ nsDirectoryIndexStream::Init(nsIFile* aDir)
|
||||
rv = ls->GetApplicationLocale(getter_AddRefs(locale));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsICollationFactory> cf = do_CreateInstance(kCollationFactoryCID,
|
||||
nsCOMPtr<nsICollationFactory> cf = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID,
|
||||
&rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
@ -57,8 +57,6 @@ NS_IMPL_THREADSAFE_ISUPPORTS4(nsIndexedToHTML,
|
||||
nsIRequestObserver,
|
||||
nsIStreamListener)
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
static void ConvertNonAsciiToNCR(const nsAString& in, nsAFlatString& out)
|
||||
{
|
||||
nsAString::const_iterator start, end;
|
||||
@ -101,7 +99,7 @@ nsIndexedToHTML::Init(nsIStreamListener* aListener) {
|
||||
|
||||
mListener = aListener;
|
||||
|
||||
mDateTime = do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
mDateTime = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> sbs =
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
|
@ -41,8 +41,6 @@
|
||||
#include "nsParserMsgUtils.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
// This code is derived from nsFormControlHelper::GetLocalizedString()
|
||||
|
||||
static nsresult GetBundle(const char * aPropFileName, nsIStringBundle **aBundle)
|
||||
@ -54,7 +52,7 @@ static nsresult GetBundle(const char * aPropFileName, nsIStringBundle **aBundle)
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> stringService =
|
||||
do_GetService(kStringBundleServiceCID, &rv);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = stringService->CreateBundle(aPropFileName, aBundle);
|
||||
|
||||
|
@ -69,8 +69,6 @@ nsReadEndCondition::nsReadEndCondition(const PRUnichar* aTerminateChars) :
|
||||
}
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
#ifdef __INCREMENTAL
|
||||
const int kBufsize=1;
|
||||
#else
|
||||
@ -217,7 +215,7 @@ nsresult nsScanner::SetDocumentCharset(const nsACString& aCharset , PRInt32 aSou
|
||||
mCharsetSource = aSource;
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm =
|
||||
do_GetService(kCharsetConverterManagerCID, &res);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
|
||||
if(NS_SUCCEEDED(res) && (nsnull != ccm))
|
||||
{
|
||||
nsIUnicodeDecoder * decoder = nsnull;
|
||||
|
@ -243,9 +243,6 @@ typedef struct
|
||||
*-----------------------------------------------------------------*/
|
||||
static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
nsPrefMigration* nsPrefMigration::mInstance = nsnull;
|
||||
|
||||
nsPrefMigration *
|
||||
@ -447,7 +444,7 @@ NS_IMETHODIMP
|
||||
nsPrefMigration::ShowSpaceDialog(PRInt32 *choice)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
@ -2214,7 +2211,7 @@ nsPrefMigration::DetermineOldPath(nsIFileSpec *profilePath, const char *oldPathN
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
/* get the string bundle, and get the appropriate localized string out of it */
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
@ -2304,7 +2301,7 @@ ConvertStringToUTF8(const char* aCharset, const char* inString, char** outString
|
||||
nsresult rv;
|
||||
// convert result to unicode
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
|
||||
if(NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr <nsIUnicodeDecoder> decoder; // this may be cached
|
||||
|
@ -69,7 +69,6 @@
|
||||
#define PIPSTRING_BUNDLE_URL "chrome://pippki/locale/pippki.properties"
|
||||
|
||||
static NS_DEFINE_CID(kCStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
/* ==== */
|
||||
static NS_DEFINE_CID(kPKIParamBlockCID, NS_PKIPARAMBLOCK_CID);
|
||||
@ -315,7 +314,7 @@ nsNSSDialogs::ConfirmCertExpired(nsIInterfaceRequestor *socketInfo,
|
||||
rv = cert->GetCommonName(commonName);
|
||||
|
||||
nsIDateTimeFormat *aDateTimeFormat;
|
||||
rv = CallCreateInstance(kDateTimeFormatCID, &aDateTimeFormat);
|
||||
rv = CallCreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &aDateTimeFormat);
|
||||
|
||||
aDateTimeFormat->FormatPRTime(nsnull, kDateFormatShort,
|
||||
kTimeFormatNoSeconds, timeToUse,
|
||||
|
@ -57,8 +57,6 @@ extern "C" {
|
||||
#include "secder.h"
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsCRLInfo, nsICRLInfo)
|
||||
|
||||
nsCRLInfo::nsCRLInfo()
|
||||
@ -96,7 +94,7 @@ nsCRLInfo::nsCRLInfo(CERTSignedCrl *signedCrl)
|
||||
PORT_Free(ou);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter = do_CreateInstance(kDateTimeFormatCID);
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID);
|
||||
|
||||
// Last Update time
|
||||
if (crl->lastUpdate.len) {
|
||||
|
@ -68,7 +68,6 @@ extern "C" {
|
||||
#include "ocsp.h"
|
||||
#include "plbase64.h"
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsCRLManager, nsICRLManager)
|
||||
@ -488,7 +487,7 @@ nsCRLManager::ComputeNextAutoUpdateTime(nsICRLInfo *info,
|
||||
|
||||
nsAutoString nextAutoUpdateDate;
|
||||
PRExplodedTime explodedTime;
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter = do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
PR_ExplodeTime(tempTime, PR_GMTParameters, &explodedTime);
|
||||
|
@ -53,7 +53,6 @@
|
||||
#include "nsIDateTimeFormat.h"
|
||||
#include "nsDateTimeFormatCID.h"
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
|
||||
|
||||
#ifndef INET6_ADDRSTRLEN
|
||||
@ -1718,7 +1717,7 @@ ProcessTime(PRTime dispTime, const PRUnichar *displayName,
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter =
|
||||
do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
|
@ -45,8 +45,6 @@
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsNSSShutDown.h"
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
/* Implementation file */
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsX509CertValidity, nsIX509CertValidity)
|
||||
|
||||
@ -91,7 +89,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotBeforeLocalTime(nsAString &aNotBeforeLoc
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter =
|
||||
do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoString date;
|
||||
@ -110,7 +108,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotBeforeLocalDay(nsAString &aNotBeforeLoca
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter =
|
||||
do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoString date;
|
||||
@ -130,7 +128,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotBeforeGMT(nsAString &aNotBeforeGMT)
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter =
|
||||
do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoString date;
|
||||
@ -162,7 +160,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotAfterLocalTime(nsAString &aNotAfterLocal
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter =
|
||||
do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoString date;
|
||||
@ -181,7 +179,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotAfterLocalDay(nsAString &aNotAfterLocalD
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter =
|
||||
do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoString date;
|
||||
@ -200,7 +198,7 @@ NS_IMETHODIMP nsX509CertValidity::GetNotAfterGMT(nsAString &aNotAfterGMT)
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDateTimeFormat> dateFormatter =
|
||||
do_CreateInstance(kDateTimeFormatCID, &rv);
|
||||
do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsAutoString date;
|
||||
|
@ -75,7 +75,6 @@
|
||||
*/
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static PRBool gStoppingDownloads = PR_FALSE;
|
||||
|
||||
#define DOWNLOAD_MANAGER_FE_URL "chrome://mozapps/content/downloads/downloads.xul"
|
||||
@ -229,7 +228,7 @@ nsDownloadManager::Init()
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = bundleService->CreateBundle(DOWNLOAD_MANAGER_BUNDLE, getter_AddRefs(mBundle));
|
||||
@ -1374,7 +1373,7 @@ nsDownloadManager::ConfirmCancelDownloads(PRInt32 aCount, nsISupportsPRBool* aCa
|
||||
{
|
||||
nsXPIDLString title, message, quitButton, dontQuitButton;
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
if (bundleService)
|
||||
bundleService->CreateBundle(DOWNLOAD_MANAGER_BUNDLE, getter_AddRefs(bundle));
|
||||
@ -2103,7 +2102,7 @@ nsDownload::OnStatusChange(nsIWebProgress *aWebProgress,
|
||||
// Get title for alert.
|
||||
nsXPIDLString title;
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
nsCOMPtr<nsIStringBundle> bundle;
|
||||
if (bundleService)
|
||||
rv = bundleService->CreateBundle(DOWNLOAD_MANAGER_BUNDLE, getter_AddRefs(bundle));
|
||||
|
@ -136,7 +136,6 @@ nsIPrefBranch* nsGlobalHistory::gPrefBranch = nsnull;
|
||||
// CIDs
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
// closure structures for RemoveMatchingRows
|
||||
struct matchExpiration_t {
|
||||
@ -2642,7 +2641,7 @@ nsGlobalHistory::Init()
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService =
|
||||
do_GetService(kStringBundleServiceCID, &rv);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = bundleService->CreateBundle("chrome://global/locale/history/history.properties", getter_AddRefs(mBundle));
|
||||
|
@ -62,7 +62,6 @@
|
||||
#include "nsITransport.h"
|
||||
#include "nsISocketTransport.h"
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kThisImplCID, NS_THIS_DOCLOADER_IMPL_CID);
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
@ -1064,7 +1063,7 @@ NS_IMETHODIMP nsDocLoader::OnStatus(nsIRequest* aRequest, nsISupports* ctxt,
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> sbs = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> sbs = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsXPIDLString msg;
|
||||
rv = sbs->FormatStatusMessage(aStatus, aStatusArg, getter_Copies(msg));
|
||||
|
@ -56,8 +56,6 @@
|
||||
#include <View.h>
|
||||
#include <Button.h>
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsFilePicker, nsIFilePicker)
|
||||
|
||||
#ifdef FILEPICKER_SAVE_LAST_DIR
|
||||
|
@ -51,8 +51,6 @@
|
||||
|
||||
#include "nsWindow.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
#ifdef USE_XIM
|
||||
|
||||
nsIMEStatus *nsIMEGtkIC::gStatus = 0;
|
||||
@ -136,7 +134,7 @@ void nsGtkIMEHelper::SetupUnicodeDecoder()
|
||||
charset.AssignLiteral("ISO-8859-1"); // default
|
||||
}
|
||||
nsICharsetConverterManager* manager = nsnull;
|
||||
nsresult res = CallGetService(kCharsetConverterManagerCID, &manager);
|
||||
nsresult res = CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &manager);
|
||||
if (manager && NS_SUCCEEDED(res)) {
|
||||
manager->GetUnicodeDecoderRaw(charset.get(), &mDecoder);
|
||||
NS_RELEASE(manager);
|
||||
|
@ -71,8 +71,6 @@ void DumpControlState(ControlHandle inControl, const char* message)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
// TODO: leaks, need to release when unloading the dll
|
||||
nsIUnicodeEncoder * nsMacControl::mUnicodeEncoder = nsnull;
|
||||
nsIUnicodeDecoder * nsMacControl::mUnicodeDecoder = nsnull;
|
||||
@ -478,7 +476,7 @@ void nsMacControl::StringToStr255(const nsAString& aText, Str255& aStr255)
|
||||
GetFileSystemCharset(fileSystemCharset);
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = ccm->GetUnicodeEncoderRaw(fileSystemCharset.get(), &mUnicodeEncoder);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
@ -520,7 +518,7 @@ void nsMacControl::Str255ToString(const Str255& aStr255, nsString& aText)
|
||||
GetFileSystemCharset(fileSystemCharset);
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = ccm->GetUnicodeDecoderRaw(fileSystemCharset.get(), &mUnicodeDecoder);
|
||||
}
|
||||
|
@ -66,8 +66,6 @@ typedef struct _MyData
|
||||
ULONG ulNumFilters;
|
||||
}MYDATA, *PMYDATA;
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFilePicker)
|
||||
|
||||
char nsFilePicker::mLastUsedDirectory[MAX_PATH+1] = { 0 };
|
||||
@ -548,7 +546,7 @@ char * nsFilePicker::ConvertToFileSystemCharset(const nsAString& inString)
|
||||
GetFileSystemCharset(fileSystemCharset);
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = ccm->GetUnicodeEncoderRaw(fileSystemCharset.get(), &mUnicodeEncoder);
|
||||
}
|
||||
@ -591,7 +589,7 @@ PRUnichar * nsFilePicker::ConvertFromFileSystemCharset(const char *inString)
|
||||
GetFileSystemCharset(fileSystemCharset);
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = ccm->GetUnicodeDecoderRaw(fileSystemCharset.get(), &mUnicodeDecoder);
|
||||
}
|
||||
|
@ -52,9 +52,6 @@
|
||||
#include "nsEnumeratorUtils.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFilePicker)
|
||||
|
||||
char nsFilePicker::mLastUsedDirectory[PATH_MAX+1] = { 0 };
|
||||
|
@ -604,14 +604,13 @@ CreateFilenameFromTextW(nsString & aText, const wchar_t * aExtension,
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
#define PAGEINFO_PROPERTIES "chrome://navigator/locale/pageInfo.properties"
|
||||
|
||||
static PRBool
|
||||
GetLocalizedString(const PRUnichar * aName, nsXPIDLString & aString)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return PR_FALSE;
|
||||
|
||||
|
@ -65,8 +65,6 @@
|
||||
#include "nsString.h"
|
||||
#include "nsToolkit.h"
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFilePicker)
|
||||
|
||||
PRUnichar *nsFilePicker::mLastUsedUnicodeDirectory;
|
||||
|
@ -59,11 +59,8 @@
|
||||
|
||||
#include "nsBaseFilePicker.h"
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
#define FILEPICKER_PROPERTIES "chrome://global/locale/filepicker.properties"
|
||||
|
||||
|
||||
nsBaseFilePicker::nsBaseFilePicker()
|
||||
{
|
||||
|
||||
@ -127,7 +124,7 @@ NS_IMETHODIMP
|
||||
nsBaseFilePicker::AppendFilters(PRInt32 aFilterMask)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID);
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
||||
nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
|
||||
rv = stringService->CreateBundle(FILEPICKER_PROPERTIES, getter_AddRefs(stringBundle));
|
||||
|
@ -163,11 +163,7 @@ static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kRDFContainerCID, NS_RDFCONTAINER_CID);
|
||||
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kPlatformCharsetCID, NS_PLATFORMCHARSET_CID);
|
||||
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
|
||||
#define URINC_BOOKMARKS_TOPROOT_STRING "NC:BookmarksTopRoot"
|
||||
#define URINC_BOOKMARKS_ROOT_STRING "NC:BookmarksRoot"
|
||||
@ -221,7 +217,7 @@ bm_AddRefGlobals()
|
||||
nsCOMPtr<nsILocale> locale;
|
||||
ls->GetApplicationLocale(getter_AddRefs(locale));
|
||||
if (locale) {
|
||||
nsCOMPtr<nsICollationFactory> factory = do_CreateInstance(kCollationFactoryCID);
|
||||
nsCOMPtr<nsICollationFactory> factory = do_CreateInstance(NS_COLLATIONFACTORY_CONTRACTID);
|
||||
if (factory) {
|
||||
factory->CreateCollation(locale, &gCollation);
|
||||
}
|
||||
@ -554,7 +550,7 @@ BookmarkParser::Init(nsIFile *aFile, nsIRDFDataSource *aDataSource,
|
||||
|
||||
// determine default platform charset...
|
||||
nsCOMPtr<nsIPlatformCharset> platformCharset =
|
||||
do_GetService(kPlatformCharsetCID, &rv);
|
||||
do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (platformCharset))
|
||||
{
|
||||
nsCAutoString defaultCharset;
|
||||
@ -562,7 +558,7 @@ BookmarkParser::Init(nsIFile *aFile, nsIRDFDataSource *aDataSource,
|
||||
{
|
||||
// found the default platform charset, now try and get a decoder from it to Unicode
|
||||
nsCOMPtr<nsICharsetConverterManager> charsetConv =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && (charsetConv))
|
||||
{
|
||||
rv = charsetConv->GetUnicodeDecoderRaw(defaultCharset.get(),
|
||||
@ -1000,7 +996,7 @@ BookmarkParser::ParseMetaTag(const nsString &aLine, nsIUnicodeDecoder **decoder)
|
||||
|
||||
// found a charset, now try and get a decoder from it to Unicode
|
||||
nsICharsetConverterManager *charsetConv;
|
||||
rv = CallGetService(kCharsetConverterManagerCID, &charsetConv);
|
||||
rv = CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &charsetConv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = charsetConv->GetUnicodeDecoderRaw(charset.get(), decoder);
|
||||
@ -1652,7 +1648,7 @@ nsBookmarksService::Init()
|
||||
{
|
||||
/* create a bundle for the localization */
|
||||
nsCOMPtr<nsIStringBundleService> stringService =
|
||||
do_GetService(kStringBundleServiceCID);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
||||
if (stringService)
|
||||
{
|
||||
nsCAutoString spec;
|
||||
|
@ -213,8 +213,6 @@ nsFileComplete::StopSearch()
|
||||
#define NS_FILEVIEW_CID { 0xa5570462, 0x1dd1, 0x11b2, \
|
||||
{ 0x9d, 0x19, 0xdf, 0x30, 0xa2, 0x7f, 0xbd, 0xc4 } }
|
||||
|
||||
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
|
||||
|
||||
class nsFileView : public nsIFileView,
|
||||
public nsITreeView
|
||||
{
|
||||
@ -294,7 +292,7 @@ nsFileView::Init()
|
||||
NS_NewISupportsArray(getter_AddRefs(mFileList));
|
||||
NS_NewISupportsArray(getter_AddRefs(mDirList));
|
||||
NS_NewISupportsArray(getter_AddRefs(mFilteredFiles));
|
||||
mDateFormatter = do_CreateInstance(kDateTimeFormatCID);
|
||||
mDateFormatter = do_CreateInstance(NS_DATETIMEFORMAT_CONTRACTID);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -130,7 +130,6 @@ static const PRInt64 MSECS_PER_DAY = LL_INIT(20, 500654080); // (1000000LL * 60
|
||||
// CIDs
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
// closure structures for RemoveMatchingRows
|
||||
struct matchExpiration_t {
|
||||
@ -2544,7 +2543,7 @@ nsGlobalHistory::Init()
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService =
|
||||
do_GetService(kStringBundleServiceCID, &rv);
|
||||
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = bundleService->CreateBundle("chrome://communicator/locale/history/history.properties", getter_AddRefs(mBundle));
|
||||
|
@ -71,12 +71,9 @@
|
||||
// Global functions and data [declaration]
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kRDFInMemoryDataSourceCID, NS_RDFINMEMORYDATASOURCE_CID);
|
||||
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
|
||||
static NS_DEFINE_CID(kRDFContainerCID, NS_RDFCONTAINER_CID);
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
static NS_DEFINE_CID(kLocaleServiceCID, NS_LOCALESERVICE_CID);
|
||||
|
||||
static const char kURINC_BrowserAutodetMenuRoot[] = "NC:BrowserAutodetMenuRoot";
|
||||
static const char kURINC_BrowserCharsetMenuRoot[] = "NC:BrowserCharsetMenuRoot";
|
||||
@ -506,7 +503,7 @@ nsCharsetMenu::nsCharsetMenu()
|
||||
nsresult res = NS_OK;
|
||||
|
||||
//get charset manager
|
||||
mCCManager = do_GetService(kCharsetConverterManagerCID, &res);
|
||||
mCCManager = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &res);
|
||||
|
||||
//initialize skeleton RDF source
|
||||
mRDFService = do_GetService(kRDFServiceCID, &res);
|
||||
@ -1808,13 +1805,13 @@ nsresult nsCharsetMenu::GetCollation(nsICollation ** aCollation)
|
||||
nsICollationFactory * collationFactory = nsnull;
|
||||
|
||||
nsCOMPtr<nsILocaleService> localeServ =
|
||||
do_GetService(kLocaleServiceCID, &res);
|
||||
do_GetService(NS_LOCALESERVICE_CONTRACTID, &res);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = localeServ->GetApplicationLocale(getter_AddRefs(locale));
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = CallCreateInstance(kCollationFactoryCID, &collationFactory);
|
||||
res = CallCreateInstance(NS_COLLATIONFACTORY_CONTRACTID, &collationFactory);
|
||||
if (NS_FAILED(res)) return res;
|
||||
|
||||
res = collationFactory->CreateCollation(locale, aCollation);
|
||||
|
@ -73,7 +73,6 @@
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kRDFInMemoryDataSourceCID, NS_RDFINMEMORYDATASOURCE_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
static const char kURINC_RelatedLinksRoot[] = "NC:RelatedLinks";
|
||||
@ -215,7 +214,7 @@ RelatedLinksStreamListener::Init()
|
||||
}
|
||||
|
||||
nsICharsetConverterManager *charsetConv;
|
||||
rv = CallGetService(kCharsetConverterManagerCID, &charsetConv);
|
||||
rv = CallGetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &charsetConv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
rv = charsetConv->GetUnicodeDecoderRaw("UTF-8",
|
||||
|
@ -117,8 +117,6 @@
|
||||
#include <os2.h>
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
#define kInstallLocaleProperties "chrome://global/locale/commonDialogs.properties"
|
||||
|
||||
/**
|
||||
@ -272,7 +270,7 @@ nsInstall::nsInstall(nsIZipReader * theJARFile)
|
||||
mStringBundle = nsnull;
|
||||
NS_WITH_PROXIED_SERVICE( nsIStringBundleService,
|
||||
service,
|
||||
kStringBundleServiceCID,
|
||||
NS_STRINGBUNDLE_CONTRACTID,
|
||||
thread,
|
||||
&rv );
|
||||
|
||||
@ -1237,7 +1235,7 @@ nsInstall::LoadResources(JSContext* cx, const nsString& aBaseName, jsval* aRetur
|
||||
}
|
||||
|
||||
// initialize string bundle and related services
|
||||
ret = CallGetService(kStringBundleServiceCID, &service);
|
||||
ret = CallGetService(NS_STRINGBUNDLE_CONTRACTID, &service);
|
||||
if (NS_FAILED(ret))
|
||||
goto cleanup;
|
||||
|
||||
@ -2564,7 +2562,7 @@ void nsInstall::SetInstallURL(const nsString& url) { mInstallURL = url; }
|
||||
//-----------------------------------------------------------------------------
|
||||
PRUnichar *GetTranslatedString(const PRUnichar* aString)
|
||||
{
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(kStringBundleServiceCID);
|
||||
nsCOMPtr<nsIStringBundleService> stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID);
|
||||
nsCOMPtr<nsIStringBundle> stringBundle;
|
||||
PRUnichar* translatedString;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user