зеркало из https://github.com/mozilla/gecko-dev.git
Remove unused interface nsILocaleDefinition. Bug 374447, r=jshin, sr=biesi
This commit is contained in:
Родитель
093b1f6231
Коммит
2182273df2
|
@ -38,18 +38,12 @@
|
|||
#include "nsISupports.idl"
|
||||
#include "nsILocale.idl"
|
||||
|
||||
[scriptable, uuid(7c094410-4558-11d3-91cd-00105aa3f7dc)]
|
||||
interface nsILocaleDefinition : nsISupports {
|
||||
void setLocaleCategory(in AString category, in AString value);
|
||||
};
|
||||
|
||||
// The Locale service interface. This is a singleton object, and should be
|
||||
// obtained from the <tt>nsServiceManager</tt>.
|
||||
[scriptable, uuid(48ab1fa0-4550-11d3-91cd-00105aa3f7dc)]
|
||||
[scriptable, uuid(c2edc848-4219-4440-abbf-98119882c83f)]
|
||||
interface nsILocaleService : nsISupports {
|
||||
|
||||
nsILocale newLocale(in AString aLocale);
|
||||
nsILocale newLocaleObject(in nsILocaleDefinition localeDefinition);
|
||||
nsILocale getSystemLocale();
|
||||
nsILocale getApplicationLocale();
|
||||
nsILocale getLocaleFromAcceptLanguage(in string acceptLanguage);
|
||||
|
@ -65,8 +59,6 @@ interface nsILocaleService : nsISupports {
|
|||
extern nsresult
|
||||
NS_NewLocaleService(nsILocaleService** result);
|
||||
|
||||
extern nsresult
|
||||
NS_NewLocaleDefinition(nsILocaleDefinition** result);
|
||||
%}
|
||||
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
class nsStringArray;
|
||||
|
||||
class nsLocale : public nsILocale {
|
||||
friend class nsLocaleDefinition;
|
||||
friend class nsLocaleService;
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
|
|
@ -126,35 +126,6 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
//
|
||||
// nsILocaleDefinition implementation
|
||||
//
|
||||
class nsLocaleDefinition: public nsILocaleDefinition {
|
||||
friend class nsLocaleService;
|
||||
|
||||
public:
|
||||
|
||||
//
|
||||
// nsISupports
|
||||
//
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
//
|
||||
// nsILocaleDefintion
|
||||
//
|
||||
NS_IMETHOD SetLocaleCategory(const nsAString &category, const nsAString &value);
|
||||
|
||||
protected:
|
||||
|
||||
nsLocaleDefinition();
|
||||
virtual ~nsLocaleDefinition();
|
||||
|
||||
nsLocale* mLocaleDefinition;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// nsLocaleService methods
|
||||
//
|
||||
|
@ -346,18 +317,6 @@ nsLocaleService::NewLocale(const nsAString &aLocale, nsILocale **_retval)
|
|||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLocaleService::NewLocaleObject(nsILocaleDefinition *localeDefinition, nsILocale **_retval)
|
||||
{
|
||||
if (!localeDefinition || !_retval) return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsLocale* new_locale = new nsLocale(NS_STATIC_CAST(nsLocaleDefinition*,localeDefinition)->mLocaleDefinition);
|
||||
if (!new_locale) return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return new_locale->QueryInterface(NS_GET_IID(nsILocale),(void**)_retval);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLocaleService::GetSystemLocale(nsILocale **_retval)
|
||||
{
|
||||
|
@ -517,32 +476,3 @@ NS_NewLocaleService(nsILocaleService** result)
|
|||
NS_ADDREF(*result);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// nsLocaleDefinition methods
|
||||
//
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsLocaleDefinition,nsILocaleDefinition)
|
||||
|
||||
nsLocaleDefinition::nsLocaleDefinition(void)
|
||||
{
|
||||
mLocaleDefinition = new nsLocale;
|
||||
if (mLocaleDefinition)
|
||||
mLocaleDefinition->AddRef();
|
||||
}
|
||||
|
||||
nsLocaleDefinition::~nsLocaleDefinition(void)
|
||||
{
|
||||
if (mLocaleDefinition)
|
||||
mLocaleDefinition->Release();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsLocaleDefinition::SetLocaleCategory(const nsAString &category, const nsAString &value)
|
||||
{
|
||||
if (mLocaleDefinition)
|
||||
return mLocaleDefinition->AddCategory(category,value);
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче