From 0b90c4283af5938d394a919e4b69831b6c6e3bee Mon Sep 17 00:00:00 2001 From: "ducarroz%netscape.com" Date: Fri, 6 Apr 2001 14:34:34 +0000 Subject: [PATCH] Fix mail part of bug 74901. Don't need anymore to convert line feeds before inserting data into editor. R=jfrancis, SR=mscott --- mailnews/compose/src/nsMsgCompUtils.cpp | 48 ------------------------- mailnews/compose/src/nsMsgCompUtils.h | 4 --- mailnews/compose/src/nsMsgCompose.cpp | 18 ---------- 3 files changed, 70 deletions(-) diff --git a/mailnews/compose/src/nsMsgCompUtils.cpp b/mailnews/compose/src/nsMsgCompUtils.cpp index 805c5c9f6dbb..9ac429ec4eac 100644 --- a/mailnews/compose/src/nsMsgCompUtils.cpp +++ b/mailnews/compose/src/nsMsgCompUtils.cpp @@ -2023,54 +2023,6 @@ ConvertBufToPlainText(nsString &aConBuf, PRBool formatflowed /* = PR_FALSE */) return rv; } -// Need to take this input data and do the following conversions -// in place: -// -// First pass: Turn CRLF into LF -// Second pass: Turn CR into LF -// -void -DoLineEndingConJob(char *aBuf, PRUint32 aLen) -{ - PRUint32 i; - - if (aLen <= 0) - return; - - // First pass: Turn CRLF into LF - PRUint32 len = aLen; - for (i=0; i < (len-1); i++) - { - if ( (aBuf[i] == CR) && (aBuf[i+1] == LF) ) - { - nsCRT::memmove((void *)&(aBuf[i]), (void *)&(aBuf[i+1]), (len-i-1)); - len -= 1; - aBuf[len] = '\0'; - } - } - - // Second pass: Turn CR into LF - len = PL_strlen(aBuf); - for (i=0; iGetEditor(getter_AddRefs(editor)); - TranslateLineEndings(aPrefix); - TranslateLineEndings(aBuf); - TranslateLineEndings(aSignature); - if (editor) editor->EnableUndo(PR_FALSE); @@ -3139,7 +3122,6 @@ nsresult nsMsgCompose::SetSignature(nsIMsgIdentity *identity) //Then add the new one if needed nsAutoString aSignature; ProcessSignature(identity, &aSignature); - TranslateLineEndings(aSignature); if (!aSignature.IsEmpty()) {