This commit is contained in:
ftang%netscape.com 1999-07-14 18:57:34 +00:00
Родитель 8edd850da4
Коммит 29d5937475
3 изменённых файлов: 16 добавлений и 1 удалений

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

@ -69,13 +69,15 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
nsresult res;
if (aFactory == NULL) return NS_ERROR_NULL_POINTER;
*aFactory = NULL;
//
// first check for the nsILocaleFactory interfaces
//
if (aClass.Equals(kLocaleFactoryCID))
{
nsLocaleFactory *factory = new nsLocaleFactory();
if(nsnull == factory)
return NS_ERROR_OUT_OF_MEMORY;
res = factory->QueryInterface(kILocaleFactoryIID, (void **) aFactory);
if (NS_FAILED(res))
@ -90,6 +92,8 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
if (aClass.Equals(kMacLocaleFactoryCID))
{
nsMacLocaleFactory *mac_factory = new nsMacLocaleFactory();
if(nsnull == mac_factory)
return NS_ERROR_OUT_OF_MEMORY;
res = mac_factory->QueryInterface(kIFactoryIID,(void**) aFactory);
if (NS_FAILED(res))

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

@ -212,8 +212,13 @@ nsresult nsCollationFactoryOS2::CreateCollation( nsILocale *aLocale,
if( !aLocale || !aInstance)
return NS_ERROR_NULL_POINTER;
*aInstance = nsnull;
nsCollationOS2 *coll = new nsCollationOS2;
if(nsnull == coll)
return NS_ERROR_OUT_OF_MEMORY;
nsresult rc = coll->Initialize( aLocale);
if( NS_SUCCEEDED(rc))

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

@ -44,7 +44,10 @@ nsresult nsLocaleFactoryOS2::NewLocale( nsString **aCatList,
if( !aCatList || !aValList || !aLocale)
return NS_ERROR_NULL_POINTER;
*aLocale = nsnull;
nsLocaleOS2 *aLoc = new nsLocaleOS2;
if(nsnull == aLoc)
return NS_ERROR_OUT_OF_MEMORY;
nsresult rc = aLoc->Init( aCatList, aValList, aCount);
@ -65,7 +68,10 @@ nsresult nsLocaleFactoryOS2::NewLocale( const nsString *aName,
if( !aName || !aLocale)
return NS_ERROR_NULL_POINTER;
*aLocale = nsnull;
nsLocaleOS2 *aLoc = new nsLocaleOS2;
if(nsnull == aLoc)
return NS_ERROR_OUT_OF_MEMORY;
nsresult rc = aLoc->Init( *aName);