diff --git a/editor/base/nsAOLCiter.cpp b/editor/base/nsAOLCiter.cpp index 2abbb05685b..543b43d55a1 100644 --- a/editor/base/nsAOLCiter.cpp +++ b/editor/base/nsAOLCiter.cpp @@ -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); diff --git a/editor/base/nsInternetCiter.cpp b/editor/base/nsInternetCiter.cpp index 62200d401ec..ca95e81d3bd 100644 --- a/editor/base/nsInternetCiter.cpp +++ b/editor/base/nsInternetCiter.cpp @@ -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 "); return nsWrapUtils::Rewrap(inString, aWrapCol, aFirstLineOffset, aRespectNewlines, citeString, diff --git a/editor/base/nsWrapUtils.cpp b/editor/base/nsWrapUtils.cpp index 1f2353b4059..59a74b964dc 100644 --- a/editor/base/nsWrapUtils.cpp +++ b/editor/base/nsWrapUtils.cpp @@ -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 diff --git a/editor/libeditor/text/nsAOLCiter.cpp b/editor/libeditor/text/nsAOLCiter.cpp index 2abbb05685b..543b43d55a1 100644 --- a/editor/libeditor/text/nsAOLCiter.cpp +++ b/editor/libeditor/text/nsAOLCiter.cpp @@ -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); diff --git a/editor/libeditor/text/nsInternetCiter.cpp b/editor/libeditor/text/nsInternetCiter.cpp index 62200d401ec..ca95e81d3bd 100644 --- a/editor/libeditor/text/nsInternetCiter.cpp +++ b/editor/libeditor/text/nsInternetCiter.cpp @@ -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 "); return nsWrapUtils::Rewrap(inString, aWrapCol, aFirstLineOffset, aRespectNewlines, citeString, diff --git a/editor/libeditor/text/nsWrapUtils.cpp b/editor/libeditor/text/nsWrapUtils.cpp index 1f2353b4059..59a74b964dc 100644 --- a/editor/libeditor/text/nsWrapUtils.cpp +++ b/editor/libeditor/text/nsWrapUtils.cpp @@ -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