bug 26237; move to newer nsICharsetConverterManager2 interface

git-svn-id: svn://10.0.0.236/trunk@68144 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
erik%netscape.com 2000-05-03 21:47:07 +00:00
parent 0bd7d1f370
commit c5e452e1ac
2 changed files with 6 additions and 5 deletions

View File

@ -25,6 +25,7 @@
#include "nsLanguageAtomService.h"
#include "nsIURI.h"
#include "nsNetUtil.h"
#include "nsICharsetConverterManager.h"
class nsLanguageAtom : public nsILanguageAtom
{
@ -207,10 +208,10 @@ nsLanguageAtomService::LookupCharSet(const PRUnichar* aCharSet,
mCharSets = do_GetService(NS_CHARSETCONVERTERMANAGER_PROGID);
NS_ENSURE_TRUE(mCharSets, NS_ERROR_FAILURE);
}
nsAutoString charset(aCharSet);
charset.ToLowerCase();
nsCOMPtr<nsIAtom> charset;
mCharSets->GetCharsetAtom(aCharSet, getter_AddRefs(charset));
nsCOMPtr<nsIAtom> langGroup;
mCharSets->GetCharsetLangGroup(&charset, getter_AddRefs(langGroup));
mCharSets->GetCharsetLangGroup(charset, getter_AddRefs(langGroup));
nsCOMPtr<nsILanguageAtom> lang;
PRUint32 n;
NS_ENSURE_SUCCESS(mLangs->Count(&n), NS_ERROR_FAILURE);

View File

@ -22,7 +22,7 @@
*/
#include "nsCOMPtr.h"
#include "nsICharsetConverterManager.h"
#include "nsICharsetConverterManager2.h"
#include "nsILanguageAtomService.h"
#include "nsIPersistentProperties.h"
#include "nsISupportsArray.h"
@ -42,7 +42,7 @@ public:
NS_IMETHOD InitLangGroupTable();
protected:
nsCOMPtr<nsICharsetConverterManager> mCharSets;
nsCOMPtr<nsICharsetConverterManager2> mCharSets;
nsCOMPtr<nsISupportsArray> mLangs;
nsCOMPtr<nsIPersistentProperties> mLangGroups;
};