зеркало из https://github.com/mozilla/pjs.git
changed locale argument from nsString to nsILocale
This commit is contained in:
Родитель
003d13ba2f
Коммит
989b53b147
|
@ -20,6 +20,7 @@
|
|||
#define nsIStringBundle_h___
|
||||
|
||||
#include "nsIFactory.h"
|
||||
#include "nsILocale.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsString.h"
|
||||
|
||||
|
@ -53,7 +54,7 @@ public:
|
|||
class nsIStringBundleFactory : public nsIFactory
|
||||
{
|
||||
public:
|
||||
NS_IMETHOD CreateBundle(nsIURL* aURL, const nsString& aLocale,
|
||||
NS_IMETHOD CreateBundle(nsIURL* aURL, nsILocale* aLocale,
|
||||
nsIStringBundle** aResult) = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "nsIProperties.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nscore.h"
|
||||
#include "nsILocale.h"
|
||||
#include "nsINetService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURL.h"
|
||||
|
@ -42,7 +43,7 @@ static NS_DEFINE_IID(kNetServiceCID, NS_NETSERVICE_CID);
|
|||
class nsStringBundle : public nsISupports
|
||||
{
|
||||
public:
|
||||
nsStringBundle(nsIURL* aURL, const nsString& aLocale, nsresult* aResult);
|
||||
nsStringBundle(nsIURL* aURL, nsILocale* aLocale, nsresult* aResult);
|
||||
~nsStringBundle();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -53,7 +54,7 @@ public:
|
|||
nsIProperties* mProps;
|
||||
};
|
||||
|
||||
nsStringBundle::nsStringBundle(nsIURL* aURL, const nsString& aLocale,
|
||||
nsStringBundle::nsStringBundle(nsIURL* aURL, nsILocale* aLocale,
|
||||
nsresult* aResult)
|
||||
{
|
||||
mProps = nsnull;
|
||||
|
@ -113,7 +114,7 @@ public:
|
|||
NS_IMETHOD CreateInstance(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
||||
NS_IMETHOD LockFactory(PRBool aLock);
|
||||
|
||||
NS_IMETHOD CreateBundle(nsIURL* aURL, const nsString& aLocale,
|
||||
NS_IMETHOD CreateBundle(nsIURL* aURL, nsILocale* aLocale,
|
||||
nsIStringBundle** aResult);
|
||||
};
|
||||
|
||||
|
@ -133,7 +134,7 @@ nsStringBundleFactory::LockFactory(PRBool aLock)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsStringBundleFactory::CreateBundle(nsIURL* aURL, const nsString& aLocale,
|
||||
nsStringBundleFactory::CreateBundle(nsIURL* aURL, nsILocale* aLocale,
|
||||
nsIStringBundle** aResult)
|
||||
{
|
||||
nsresult ret = NS_OK;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "nsIStringBundle.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsILocale.h"
|
||||
#include "nsINetService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsRepository.h"
|
||||
|
@ -79,7 +80,7 @@ main(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
nsAutoString locale("en-US");
|
||||
nsILocale* locale = nsnull;
|
||||
|
||||
nsIStringBundle* bundle = nsnull;
|
||||
ret = factory->CreateBundle(url, locale, &bundle);
|
||||
|
|
Загрузка…
Ссылка в новой задаче