зеркало из https://github.com/mozilla/gecko-dev.git
replaced calls to deprecated string methods
This commit is contained in:
Родитель
0e8a2aaf7a
Коммит
7a722be971
|
@ -444,7 +444,7 @@ CreateUtf7ConvertedString(const char * aSourceString,
|
|||
// convert from 8 bit ascii string to modified utf7
|
||||
nsString unicodeStr(aSourceString);
|
||||
nsIUnicodeEncoder* encoder = nsnull;
|
||||
aCharset.SetString("x-imap4-modified-utf7");
|
||||
aCharset.Assign("x-imap4-modified-utf7");
|
||||
res = ccm->GetUnicodeEncoder(&aCharset, &encoder);
|
||||
if(NS_SUCCEEDED(res) && (nsnull != encoder))
|
||||
{
|
||||
|
@ -493,7 +493,7 @@ CreateUtf7ConvertedStringFromUnicode(const PRUnichar * aSourceString)
|
|||
// convert from 8 bit ascii string to modified utf7
|
||||
nsString unicodeStr(aSourceString);
|
||||
nsIUnicodeEncoder* encoder = nsnull;
|
||||
aCharset.SetString("x-imap4-modified-utf7");
|
||||
aCharset.Assign("x-imap4-modified-utf7");
|
||||
res = ccm->GetUnicodeEncoder(&aCharset, &encoder);
|
||||
if(NS_SUCCEEDED(res) && (nsnull != encoder))
|
||||
{
|
||||
|
|
|
@ -483,12 +483,12 @@ nsMimeXULEmitter::DumpAddBookIcon(char *fromLine)
|
|||
char *newNameValue = nsEscape(name, url_XAlphas);
|
||||
if (newNameValue)
|
||||
{
|
||||
newName.SetString(newNameValue);
|
||||
newName.Assign(newNameValue);
|
||||
PR_FREEIF(newNameValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
newName.SetString(name);
|
||||
newName.Assign(name);
|
||||
}
|
||||
|
||||
// Strip off extra quotes...
|
||||
|
|
|
@ -1243,13 +1243,13 @@ PRInt32 MimeCharsetConverterClass::Initialize(const char* from_charset, const ch
|
|||
|
||||
NS_ASSERTION(NULL == mEncoder, "No reinitialization allowed.");
|
||||
|
||||
mInputCharset.SetString(from_charset); // remember input charset for a hint
|
||||
mInputCharset.Assign(from_charset); // remember input charset for a hint
|
||||
if (mInputCharset.IsEmpty()) {
|
||||
mInputCharset.SetString("ISO-8859-1");
|
||||
mInputCharset.Assign("ISO-8859-1");
|
||||
}
|
||||
mOutputCharset.SetString(to_charset); // remember output charset
|
||||
mOutputCharset.Assign(to_charset); // remember output charset
|
||||
if (mOutputCharset.IsEmpty()) {
|
||||
mOutputCharset.SetString("UTF-8");
|
||||
mOutputCharset.Assign("UTF-8");
|
||||
}
|
||||
mAutoDetect = autoDetect;
|
||||
mMaxNumCharsDetect = maxNumCharsDetect;
|
||||
|
@ -1343,7 +1343,7 @@ PRInt32 MimeCharsetConverterClass::Convert(const char* inBuffer, const PRInt32 i
|
|||
nsDetectionConfident oConfident;
|
||||
res = mDetector->DoIt(inBuffer, inLength, &oCharset, oConfident);
|
||||
if (NS_SUCCEEDED(res) && (eBestAnswer == oConfident || eSureAnswer == oConfident)) {
|
||||
aCharsetDetected.SetString(oCharset);
|
||||
aCharsetDetected.Assign(oCharset);
|
||||
|
||||
// Check if need a conversion.
|
||||
if (!NeedCharsetConversion(aCharsetDetected, mOutputCharset)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче