code cleanup. replace static cid with contract id.

This commit is contained in:
sspitzer%netscape.com 2002-10-02 07:46:46 +00:00
Родитель 7618325cbd
Коммит d73584dce2
6 изменённых файлов: 5 добавлений и 16 удалений

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

@ -138,10 +138,6 @@ static NS_DEFINE_CID(kMsgSendLaterCID, NS_MSGSENDLATER_CID);
static NS_DEFINE_CID(kMsgCopyServiceCID, NS_MSGCOPYSERVICE_CID);
static NS_DEFINE_CID(kMsgPrintEngineCID, NS_MSG_PRINTENGINE_CID);
/* This is the next generation string retrieval call */
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
#if defined(DEBUG_seth_) || defined(DEBUG_sspitzer_) || defined(DEBUG_jefft)
#define DEBUG_MESSENGER
#endif
@ -1893,7 +1889,7 @@ nsMessenger::InitStringBundle()
const char propertyURL[] = MESSENGER_STRING_URL;
nsCOMPtr<nsIStringBundleService> sBundleService =
do_GetService(kStringBundleServiceCID, &res);
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res);
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
{
res = sBundleService->CreateBundle(propertyURL,

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

@ -99,7 +99,6 @@ static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);
static NS_DEFINE_CID(kSmtpServiceCID, NS_SMTPSERVICE_CID);
static NS_DEFINE_CID(kAB4xUpgraderServiceCID, NS_AB4xUPGRADER_CID);
static NS_DEFINE_CID(kAddressBookCID, NS_ADDRESSBOOK_CID);
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
#define IMAP_SCHEMA "imap:/"
#define IMAP_SCHEMA_LENGTH 6
@ -447,7 +446,7 @@ nsMessengerMigrator::initializeStrings()
{
nsresult rv;
nsCOMPtr<nsIStringBundleService> bundleService =
do_GetService(kStringBundleServiceCID, &rv);
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIStringBundle> bundle;

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

@ -64,8 +64,6 @@
#include "nsIMsgCopyService.h"
#include "nsMsgBaseCID.h"
/* Implementation file */
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
static NS_DEFINE_CID(kDateTimeFormatCID, NS_DATETIMEFORMAT_CID);
nsrefcnt nsMsgDBView::gInstanceCount = 0;
@ -372,7 +370,7 @@ PRUnichar * nsMsgDBView::GetString(const PRUnichar *aStringName)
if (!mMessengerStringBundle)
{
static const char propertyURL[] = MESSENGER_STRING_URL;
nsCOMPtr<nsIStringBundleService> sBundleService = do_GetService(kStringBundleServiceCID, &res);
nsCOMPtr<nsIStringBundleService> sBundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res);
if (NS_SUCCEEDED(res) && sBundleService)
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mMessengerStringBundle));
}

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

@ -59,7 +59,6 @@
static NS_DEFINE_CID(kCMailDB, NS_MAILDB_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
//////////////////////////////////////////////////////////////////////////////
// nsFolderCompactState
//////////////////////////////////////////////////////////////////////////////

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

@ -58,7 +58,6 @@
static NS_DEFINE_CID(kCImapService, NS_IMAPSERVICE_CID);
static NS_DEFINE_CID(kMsgSendLaterCID, NS_MSGSENDLATER_CID);
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
NS_IMPL_THREADSAFE_ISUPPORTS5(nsMsgOfflineManager,
nsIMsgOfflineManager,
@ -281,7 +280,7 @@ nsresult nsMsgOfflineManager::ShowStatus(const char *statusMsgName)
static const char propertyURL[] = MESSENGER_STRING_URL;
nsCOMPtr<nsIStringBundleService> sBundleService =
do_GetService(kStringBundleServiceCID, &res);
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res);
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
{
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));

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

@ -59,8 +59,6 @@
// nsMsgPrintEngine implementation
/////////////////////////////////////////////////////////////////////////
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
nsMsgPrintEngine::nsMsgPrintEngine()
{
mCurrentlyPrintingURI = -1;
@ -520,7 +518,7 @@ nsMsgPrintEngine::GetString(const PRUnichar *aStringName)
static const char propertyURL[] = MESSENGER_STRING_URL;
nsCOMPtr<nsIStringBundleService> sBundleService =
do_GetService(kStringBundleServiceCID, &res);
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &res);
if (NS_SUCCEEDED(res) && (nsnull != sBundleService))
{
res = sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));