making string conversions explicit

This commit is contained in:
scc%netscape.com 2000-04-21 09:33:45 +00:00
Родитель b83e22e2ea
Коммит 2f7dd57dba
6 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -91,7 +91,7 @@ nsAOLCiter::StripCites(const nsString& aInString, nsString& aOutString)
PRInt32 i = 3;
while (nsCRT::IsAsciiSpace(aInString[i]))
++i;
aOutString.Append(aInString, i);
aOutString.Append(aInString.GetUnicode(), i);
}
else
aOutString = aInString;
@ -108,7 +108,7 @@ nsAOLCiter::Rewrap(const nsString& aInString,
PRBool aRespectNewlines,
nsString& aOutString)
{
nsString citeString ("");
nsString citeString;
return nsWrapUtils::Rewrap(aInString, aWrapCol, aFirstLineOffset,
aRespectNewlines, citeString,
aOutString);

Просмотреть файл

@ -128,9 +128,9 @@ nsInternetCiter::StripCitesAndLinebreaks(const nsString& aInString,
while (i < nextNewline)
aOutString.Append(aInString[i++]);
if (aLinebreaksToo)
aOutString.Append(' ');
aOutString.AppendWithConversion(' ');
else
aOutString.Append('\n'); // DOM linebreaks, not NS_LINEBREAK
aOutString.AppendWithConversion('\n'); // DOM linebreaks, not NS_LINEBREAK
// Skip over any more consecutive linebreak-like characters:
while (aOutString[i] == '\r' || aOutString[i] == '\n')
++i;
@ -169,7 +169,7 @@ nsInternetCiter::Rewrap(const nsString& aInString,
nsAutoString citeString;
for (i=0; i<citeLevel; ++i)
citeString += "> ";
citeString.AppendWithConversion("> ");
return nsWrapUtils::Rewrap(inString, aWrapCol, aFirstLineOffset,
aRespectNewlines, citeString,

Просмотреть файл

@ -52,7 +52,7 @@ nsWrapUtils::Rewrap(const nsString& aInString,
(nsISupports **)&lf);
if (NS_SUCCEEDED(rv))
{
nsAutoString lbarg("");
nsAutoString lbarg;
rv = lf->GetBreaker(lbarg, getter_AddRefs(lineBreaker));
nsServiceManager::ReleaseService(kLWBrkCID, lf);
}
@ -75,7 +75,7 @@ nsWrapUtils::Rewrap(const nsString& aInString,
if (eol > length)
{
aOutString.Append(unicodeStr + i, length - i);
aOutString.Append('\n'); // DOM line breaks, not NS_LINEBREAK
aOutString.AppendWithConversion('\n'); // DOM line breaks, not NS_LINEBREAK
break;
}
if (i > 0) aFirstLineOffset = 0;
@ -108,7 +108,7 @@ nsWrapUtils::Rewrap(const nsString& aInString,
else breakPt += i;
nsAutoString appending(unicodeStr + i, breakPt - i);
aOutString.Append(unicodeStr + i, breakPt - i);
aOutString.Append('\n'); // DOM line breaks, not NS_LINEBREAK
aOutString.AppendWithConversion('\n'); // DOM line breaks, not NS_LINEBREAK
i = breakPt;
} // continue looping over lines

Просмотреть файл

@ -91,7 +91,7 @@ nsAOLCiter::StripCites(const nsString& aInString, nsString& aOutString)
PRInt32 i = 3;
while (nsCRT::IsAsciiSpace(aInString[i]))
++i;
aOutString.Append(aInString, i);
aOutString.Append(aInString.GetUnicode(), i);
}
else
aOutString = aInString;
@ -108,7 +108,7 @@ nsAOLCiter::Rewrap(const nsString& aInString,
PRBool aRespectNewlines,
nsString& aOutString)
{
nsString citeString ("");
nsString citeString;
return nsWrapUtils::Rewrap(aInString, aWrapCol, aFirstLineOffset,
aRespectNewlines, citeString,
aOutString);

Просмотреть файл

@ -128,9 +128,9 @@ nsInternetCiter::StripCitesAndLinebreaks(const nsString& aInString,
while (i < nextNewline)
aOutString.Append(aInString[i++]);
if (aLinebreaksToo)
aOutString.Append(' ');
aOutString.AppendWithConversion(' ');
else
aOutString.Append('\n'); // DOM linebreaks, not NS_LINEBREAK
aOutString.AppendWithConversion('\n'); // DOM linebreaks, not NS_LINEBREAK
// Skip over any more consecutive linebreak-like characters:
while (aOutString[i] == '\r' || aOutString[i] == '\n')
++i;
@ -169,7 +169,7 @@ nsInternetCiter::Rewrap(const nsString& aInString,
nsAutoString citeString;
for (i=0; i<citeLevel; ++i)
citeString += "> ";
citeString.AppendWithConversion("> ");
return nsWrapUtils::Rewrap(inString, aWrapCol, aFirstLineOffset,
aRespectNewlines, citeString,

Просмотреть файл

@ -52,7 +52,7 @@ nsWrapUtils::Rewrap(const nsString& aInString,
(nsISupports **)&lf);
if (NS_SUCCEEDED(rv))
{
nsAutoString lbarg("");
nsAutoString lbarg;
rv = lf->GetBreaker(lbarg, getter_AddRefs(lineBreaker));
nsServiceManager::ReleaseService(kLWBrkCID, lf);
}
@ -75,7 +75,7 @@ nsWrapUtils::Rewrap(const nsString& aInString,
if (eol > length)
{
aOutString.Append(unicodeStr + i, length - i);
aOutString.Append('\n'); // DOM line breaks, not NS_LINEBREAK
aOutString.AppendWithConversion('\n'); // DOM line breaks, not NS_LINEBREAK
break;
}
if (i > 0) aFirstLineOffset = 0;
@ -108,7 +108,7 @@ nsWrapUtils::Rewrap(const nsString& aInString,
else breakPt += i;
nsAutoString appending(unicodeStr + i, breakPt - i);
aOutString.Append(unicodeStr + i, breakPt - i);
aOutString.Append('\n'); // DOM line breaks, not NS_LINEBREAK
aOutString.AppendWithConversion('\n'); // DOM line breaks, not NS_LINEBREAK
i = breakPt;
} // continue looping over lines