Bug 1521007 - Follow-up: fix variable name of UTF-8 indicator. r=me a=IanN DONTBUILD SEAMONKEY_2_49_ESR_RELBRANCH
authorJorg K <jorgk@jorgk.com>
Sat, 19 Jan 2019 08:11:36 +0100
branchSEAMONKEY_2_49_ESR_RELBRANCH
changeset 28325 fa3e7ed92bf35db83b093e7777340670d06fe8ff
parent 28324 6cd49b52996d490fd533ce433d88a5cdd907945d
child 28326 cfe276973c7f00c7f5853cd8097bbe5ce204aa5e
push id2136
push userfrgrahl@gmx.net
push dateMon, 15 Jul 2019 16:13:42 +0000
treeherdercomm-esr52@6b30146aa411 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, IanN
bugs1521007
Bug 1521007 - Follow-up: fix variable name of UTF-8 indicator. r=me a=IanN DONTBUILD SeaMonkey ESR52 release branch only.
mailnews/mapi/mapihook/src/msgMapiHook.cpp
mailnews/mapi/mapihook/src/msgMapiHook.h
--- a/mailnews/mapi/mapihook/src/msgMapiHook.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiHook.cpp
@@ -362,17 +362,17 @@ nsresult nsMapiHook::BlindSendMail (unsi
     PR_CExitMonitor(pSendListener);
     NS_ProcessPendingEvents(thread);
   }
 
   return rv ;
 }
 
 nsresult nsMapiHook::HandleAttachments (nsIMsgCompFields * aCompFields, int32_t aFileCount,
-                                        lpnsMapiFileDesc aFiles, bool bUTF8)
+                                        lpnsMapiFileDesc aFiles, bool aIsUTF8)
 {
     nsresult rv = NS_OK ;
     // Do nothing if there are no files to process.
     if (!aFiles || aFileCount <= 0)
         return NS_OK;
 
     nsAutoCString Attachments ;
     nsAutoCString TempFiles ;
@@ -411,17 +411,17 @@ nsresult nsMapiHook::HandleAttachments (
 
             nsAutoString leafName ;
             // convert to Unicode using Platform charset
             // leafName already contains a unicode leafName from lpszPathName. If we were given
             // a value for lpszFileName, use it. Otherwise stick with leafName
             if (aFiles[i].lpszFileName)
             {
                 nsAutoString wholeFileName;
-                if (!bUTF8)
+                if (!aIsUTF8)
                     NS_CopyNativeToUnicode(nsDependentCString(aFiles[i].lpszFileName),
                                            wholeFileName);
                 else
                     wholeFileName.Append(NS_ConvertUTF8toUTF16(aFiles[i].lpszFileName));
                 // need to find the last '\' and find the leafname from that.
                 int32_t lastSlash = wholeFileName.RFindChar(char16_t('\\'));
                 if (lastSlash != kNotFound)
                   leafName.Assign(Substring(wholeFileName, lastSlash + 1));
@@ -588,22 +588,22 @@ nsresult nsMapiHook::HandleAttachmentsW(
   return rv ;
 }
 
 // this is used to convert non Unicode data and then populate comp fields
 nsresult nsMapiHook::PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage,
                                     nsIMsgCompFields * aCompFields)
 {
   nsresult rv = NS_OK;
-  bool bUTF8 = aMessage->ulReserved == CP_UTF8;
+  bool isUTF8 = aMessage->ulReserved == CP_UTF8;
 
   if (aMessage->lpOriginator)
   {
     nsAutoString From;
-    if (!bUTF8)
+    if (!isUTF8)
         From.Append(NS_ConvertASCIItoUTF16(aMessage->lpOriginator->lpszAddress));
     else
         From.Append(NS_ConvertUTF8toUTF16(aMessage->lpOriginator->lpszAddress));
     aCompFields->SetFrom (From);
   }
 
   nsAutoString To;
   nsAutoString Cc;
@@ -620,35 +620,35 @@ nsresult nsMapiHook::PopulateCompFieldsW
         if (!PL_strncasecmp(addressWithoutType, "SMTP:", 5))
           addressWithoutType += 5;
 
         switch (aMessage->lpRecips[i].ulRecipClass)
         {
         case MAPI_TO :
           if (!To.IsEmpty())
             To += Comma ;
-          if (!bUTF8)
+          if (!isUTF8)
               To.Append(NS_ConvertASCIItoUTF16(addressWithoutType));
           else
               To.Append(NS_ConvertUTF8toUTF16(addressWithoutType));
           break ;
 
         case MAPI_CC :
           if (!Cc.IsEmpty())
             Cc += Comma ;
-          if (!bUTF8)
+          if (!isUTF8)
               Cc.Append(NS_ConvertASCIItoUTF16(addressWithoutType));
           else
               Cc.Append(NS_ConvertUTF8toUTF16(addressWithoutType));
           break ;
 
         case MAPI_BCC :
           if (!Bcc.IsEmpty())
               Bcc += Comma ;
-          if (!bUTF8)
+          if (!isUTF8)
               Bcc.Append(NS_ConvertASCIItoUTF16(addressWithoutType));
           else
               Bcc.Append(NS_ConvertUTF8toUTF16(addressWithoutType));
           break ;
         }
       }
     }
   }
@@ -659,34 +659,34 @@ nsresult nsMapiHook::PopulateCompFieldsW
   aCompFields->SetBcc (Bcc) ;
 
   MOZ_LOG(MAPI, mozilla::LogLevel::Debug, ("to: %s cc: %s bcc: %s \n", NS_ConvertUTF16toUTF8(To).get(), NS_ConvertUTF16toUTF8(Cc).get(), NS_ConvertUTF16toUTF8(Bcc).get()));
 
   // set subject
   if (aMessage->lpszSubject)
   {
     nsAutoString Subject ;
-    if (!bUTF8)
+    if (!isUTF8)
         rv = NS_CopyNativeToUnicode(nsDependentCString(aMessage->lpszSubject),
                                     Subject);
     else
         Subject.Append(NS_ConvertUTF8toUTF16(aMessage->lpszSubject));
     if (NS_FAILED(rv)) return rv;
     aCompFields->SetSubject(Subject);
   }
 
   // handle attachments as File URL
-  rv = HandleAttachments(aCompFields, aMessage->nFileCount, aMessage->lpFiles, bUTF8);
+  rv = HandleAttachments(aCompFields, aMessage->nFileCount, aMessage->lpFiles, isUTF8);
   if (NS_FAILED(rv)) return rv ;
 
   // set body
   if (aMessage->lpszNoteText)
   {
     nsAutoString Body ;
-    if (!bUTF8)
+    if (!isUTF8)
         rv = NS_CopyNativeToUnicode(nsDependentCString(aMessage->lpszNoteText),
                                     Body);
     else
         Body.Append(NS_ConvertUTF8toUTF16(aMessage->lpszNoteText));
     if (NS_FAILED(rv)) return rv ;
     if (Body.IsEmpty() || Body.Last() != '\n')
       Body.AppendLiteral(CRLF);
 
--- a/mailnews/mapi/mapihook/src/msgMapiHook.h
+++ b/mailnews/mapi/mapihook/src/msgMapiHook.h
@@ -19,17 +19,17 @@ class nsMapiHook
         static nsresult BlindSendMail (unsigned long aSession, nsIMsgCompFields * aCompFields) ;
         static nsresult ShowComposerWindow (unsigned long aSession, nsIMsgCompFields * aCompFields) ;
         static nsresult PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage, 
                                         nsIMsgCompFields * aCompFields) ;
         static nsresult PopulateCompFieldsW(lpnsMapiMessageW aMessage, nsIMsgCompFields *aCompFields);
         static nsresult PopulateCompFieldsForSendDocs(nsIMsgCompFields * aCompFields, 
                                         ULONG aFlags, LPTSTR aDelimChar, LPTSTR aFilePaths) ;
         static nsresult HandleAttachments(nsIMsgCompFields *aCompFields, int32_t aFileCount,
-                                          lpnsMapiFileDesc aFiles, bool bUTF8);
+                                          lpnsMapiFileDesc aFiles, bool aIsUTF8);
         static nsresult HandleAttachmentsW(nsIMsgCompFields *aCompFields, int32_t aFileCount,
                                            lpnsMapiFileDescW aFiles);
         static void CleanUp();
 
         static bool isMapiService;
 };
 
 #endif  // MSG_MAPI_HOOK_H_