зеркало из https://github.com/mozilla/gecko-dev.git
bug 26237; added language atom service
This commit is contained in:
Родитель
f650dade81
Коммит
ab4f9b21e7
|
@ -30,6 +30,7 @@
|
|||
#include "nsDateTimeFormatCID.h"
|
||||
#include "nsDateTimeFormatUnix.h"
|
||||
#include "nsLocaleFactoryUnix.h"
|
||||
#include "nsLanguageAtomService.h"
|
||||
|
||||
|
||||
NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
|
@ -38,6 +39,7 @@ NS_DEFINE_IID(kICollationFactoryIID, NS_ICOLLATIONFACTORY_IID);
|
|||
NS_DEFINE_IID(kICollationIID, NS_ICOLLATION_IID);
|
||||
NS_DEFINE_IID(kIDateTimeFormatIID, NS_IDATETIMEFORMAT_IID);
|
||||
NS_DEFINE_CID(kScriptableDateFormatCID, NS_SCRIPTABLEDATEFORMAT_CID);
|
||||
NS_DEFINE_CID(kLanguageAtomServiceCID, NS_LANGUAGEATOMSERVICE_CID);
|
||||
|
||||
nsLocaleUnixFactory::nsLocaleUnixFactory(const nsCID &aClass)
|
||||
{
|
||||
|
@ -78,6 +80,9 @@ nsresult nsLocaleUnixFactory::CreateInstance(nsISupports *aOuter,
|
|||
else if (mClassID.Equals(kScriptableDateFormatCID)) {
|
||||
inst = NEW_SCRIPTABLE_DATEFORMAT();
|
||||
}
|
||||
else if (mClassID.Equals(kLanguageAtomServiceCID)) {
|
||||
NS_NEWXPCOM(inst, nsLanguageAtomService);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NS_NOINTERFACE;
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "nsLocaleSO.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsLanguageAtomService.h"
|
||||
|
||||
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
||||
|
||||
|
@ -54,6 +55,11 @@ NS_DEFINE_IID(kILocaleFactoryIID,NS_ILOCALEFACTORY_IID);
|
|||
NS_DEFINE_CID(kPosixLocaleFactoryCID, NS_POSIXLOCALEFACTORY_CID);
|
||||
NS_DEFINE_CID(kLocaleServiceCID, NS_LOCALESERVICE_CID);
|
||||
|
||||
//
|
||||
// for language atoms
|
||||
//
|
||||
NS_DEFINE_CID(kLanguageAtomServiceCID, NS_LANGUAGEATOMSERVICE_CID);
|
||||
|
||||
//
|
||||
// for the collation and formatting interfaces
|
||||
//
|
||||
|
@ -228,6 +234,8 @@ static Components gComponents[] = {
|
|||
NULL, },
|
||||
{ "Scriptable Date Format", &kScriptableDateFormatCID,
|
||||
NS_SCRIPTABLEDATEFORMAT_PROGID, },
|
||||
{ "Language Atom Service", &kLanguageAtomServiceCID,
|
||||
NS_LANGUAGEATOMSERVICE_PROGID, },
|
||||
};
|
||||
#define NUM_COMPONENTS (sizeof(gComponents) / sizeof(gComponents[0]))
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче