зеркало из https://github.com/mozilla/pjs.git
Changed to use the service for nsIMimeConverter, bug 123699, sr=mscott.
This commit is contained in:
Родитель
0cb91068f3
Коммит
258f4e9f52
|
@ -405,13 +405,11 @@ char * nsMsgI18NEncodeMimePartIIStr(const char *header, const char *charset, PRB
|
||||||
}
|
}
|
||||||
|
|
||||||
char *encodedString = nsnull;
|
char *encodedString = nsnull;
|
||||||
nsIMimeConverter *converter;
|
nsresult res;
|
||||||
nsresult res = nsComponentManager::CreateInstance(kCMimeConverterCID, nsnull,
|
nsCOMPtr<nsIMimeConverter> converter = do_GetService(kCMimeConverterCID, &res);
|
||||||
NS_GET_IID(nsIMimeConverter), (void **)&converter);
|
if (NS_SUCCEEDED(res) && nsnull != converter)
|
||||||
if (NS_SUCCEEDED(res) && nsnull != converter) {
|
|
||||||
res = converter->EncodeMimePartIIStr_UTF8(header, charset, kMIME_ENCODED_WORD_SIZE, &encodedString);
|
res = converter->EncodeMimePartIIStr_UTF8(header, charset, kMIME_ENCODED_WORD_SIZE, &encodedString);
|
||||||
NS_RELEASE(converter);
|
|
||||||
}
|
|
||||||
return NS_SUCCEEDED(res) ? encodedString : nsnull;
|
return NS_SUCCEEDED(res) ? encodedString : nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче