Bug 1399756 - remove trailing spaces in mailnews/base. rs=white-space-only
authorJorg K <jorgk@jorgk.com>
Thu, 21 Sep 2017 16:43:22 +0200
changeset 29765 c1507b4ecc4440a3df0107ac75f18b18377ebda1
parent 29764 b0580e39dcb50170b8ef04f7d4cc3b0d2de72d82
child 29766 153b971fbc2120fe61da0fe75181a69ba51dabc7
push id378
push userclokep@gmail.com
push dateMon, 13 Nov 2017 18:45:35 +0000
reviewerswhite-space-only
bugs1399756
Bug 1399756 - remove trailing spaces in mailnews/base. rs=white-space-only
mailnews/base/public/msgCore.h
mailnews/base/public/nsMsgBaseCID.h
mailnews/base/public/nsMsgGroupnameFlags.h
mailnews/base/search/public/nsMsgSearchScopeTerm.h
mailnews/base/src/nsCopyMessageStreamListener.cpp
mailnews/base/src/nsMailDirProvider.cpp
mailnews/base/src/nsMailDirServiceDefs.h
mailnews/base/src/nsMessenger.cpp
mailnews/base/src/nsMessenger.h
mailnews/base/src/nsMessengerBootstrap.cpp
mailnews/base/src/nsMessengerBootstrap.h
mailnews/base/src/nsMessengerContentHandler.cpp
mailnews/base/src/nsMessengerContentHandler.h
mailnews/base/src/nsMessengerWinIntegration.h
mailnews/base/src/nsMsgAccountManager.h
mailnews/base/src/nsMsgAccountManagerDS.cpp
mailnews/base/src/nsMsgAccountManagerDS.h
mailnews/base/src/nsMsgBiffManager.cpp
mailnews/base/src/nsMsgBiffManager.h
mailnews/base/src/nsMsgContentPolicy.h
mailnews/base/src/nsMsgCopyService.cpp
mailnews/base/src/nsMsgCopyService.h
mailnews/base/src/nsMsgDBView.h
mailnews/base/src/nsMsgFolderCompactor.cpp
mailnews/base/src/nsMsgFolderCompactor.h
mailnews/base/src/nsMsgFolderDataSource.h
mailnews/base/src/nsMsgFolderNotificationService.cpp
mailnews/base/src/nsMsgGroupThread.h
mailnews/base/src/nsMsgGroupView.h
mailnews/base/src/nsMsgMailSession.cpp
mailnews/base/src/nsMsgMailSession.h
mailnews/base/src/nsMsgOfflineManager.cpp
mailnews/base/src/nsMsgOfflineManager.h
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/src/nsMsgPrintEngine.h
mailnews/base/src/nsMsgProgress.h
mailnews/base/src/nsMsgPurgeService.h
mailnews/base/src/nsMsgQuickSearchDBView.cpp
mailnews/base/src/nsMsgQuickSearchDBView.h
mailnews/base/src/nsMsgRDFDataSource.h
mailnews/base/src/nsMsgRDFUtils.cpp
mailnews/base/src/nsMsgRDFUtils.h
mailnews/base/src/nsMsgSearchDBView.h
mailnews/base/src/nsMsgServiceProvider.cpp
mailnews/base/src/nsMsgServiceProvider.h
mailnews/base/src/nsMsgSpecialViews.cpp
mailnews/base/src/nsMsgStatusFeedback.cpp
mailnews/base/src/nsMsgTagService.cpp
mailnews/base/src/nsMsgThreadedDBView.cpp
mailnews/base/src/nsMsgThreadedDBView.h
mailnews/base/src/nsMsgWindow.h
mailnews/base/src/nsMsgXFViewThread.cpp
mailnews/base/src/nsMsgXFViewThread.h
mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp
mailnews/base/src/nsMsgXFVirtualFolderDBView.h
mailnews/base/src/nsSpamSettings.cpp
mailnews/base/src/nsSpamSettings.h
mailnews/base/src/nsStatusBarBiffManager.cpp
mailnews/base/src/nsStatusBarBiffManager.h
mailnews/base/src/nsSubscribableServer.cpp
mailnews/base/src/nsSubscribableServer.h
mailnews/base/src/nsSubscribeDataSource.cpp
mailnews/base/src/nsSubscribeDataSource.h
mailnews/base/test/TestMsgStripRE.cpp
--- a/mailnews/base/public/msgCore.h
+++ b/mailnews/base/public/msgCore.h
@@ -45,17 +45,17 @@ class nsIMsgFolder;
 /*
  * NS_ERROR macros - use these macros to generate error constants
  * to be used by XPCOM interfaces and possibly other useful things
  * do not use these macros in your code - declare error macros for
  * each specific error you need.
  *
  * for example:
  * #define NS_MSG_ERROR_NO_SUCH_FOLDER NS_MSG_GENERATE_FAILURE(4)
- * 
+ *
  */
 
 /* use these routines to generate error values */
 #define NS_MSG_GENERATE_RESULT(severity, value) \
 NS_ERROR_GENERATE(severity, NS_ERROR_MODULE_MAILNEWS, value)
 
 #define NS_MSG_GENERATE_SUCCESS(value) \
 NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_MAILNEWS, value)
@@ -136,21 +136,21 @@ NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODUL
 #define NS_MSG_SERVER_USERNAME_MISSING NS_MSG_GENERATE_FAILURE(23)
 
 #define NS_MSG_INVALID_DBVIEW_INDEX NS_MSG_GENERATE_FAILURE(24)
 
 #define NS_MSG_NEWS_ARTICLE_NOT_FOUND NS_MSG_GENERATE_FAILURE(25)
 
 #define NS_MSG_ERROR_COPY_FOLDER_ABORTED NS_MSG_GENERATE_FAILURE(26)
 // this error means a url was queued but never run because one of the urls
-// it was queued after failed. We send an OnStopRunningUrl with this error code 
+// it was queued after failed. We send an OnStopRunningUrl with this error code
 // so the listeners can know that we didn't run the url.
 #define NS_MSG_ERROR_URL_ABORTED NS_MSG_GENERATE_FAILURE(27)
 #define NS_MSG_CUSTOM_HEADERS_OVERFLOW NS_MSG_GENERATE_FAILURE(28) //when num of custom headers exceeds 50
-#define NS_MSG_INVALID_CUSTOM_HEADER NS_MSG_GENERATE_FAILURE(29) //when custom header has invalid characters (as per rfc 2822) 
+#define NS_MSG_INVALID_CUSTOM_HEADER NS_MSG_GENERATE_FAILURE(29) //when custom header has invalid characters (as per rfc 2822)
 
 #define NS_MSG_USER_NOT_AUTHENTICATED NS_MSG_GENERATE_FAILURE(30) // when local caches are password protect and user isn't auth
 
 #define NS_MSG_ERROR_COPYING_FROM_TMP_DOWNLOAD NS_MSG_GENERATE_FAILURE(31) // pop3 downloaded to tmp file, and failed.
 
 // The code tried to stream a message using the aLocalOnly argument, but
 // the message was not cached locally.
 #define NS_MSG_ERROR_MSG_NOT_OFFLINE NS_MSG_GENERATE_FAILURE(32)
--- a/mailnews/base/public/nsMsgBaseCID.h
+++ b/mailnews/base/public/nsMsgBaseCID.h
@@ -54,17 +54,17 @@
   0x64921b82, \
   0x24bb, \
   0x4473, \
   {0xad, 0xa9, 0xdc, 0x89, 0x42, 0x61, 0x29, 0xa6} \
 }
 
 //
 // nsMsgAccountManager
-// 
+//
 #define NS_MSGACCOUNTMANAGER_CONTRACTID \
   "@mozilla.org/messenger/account-manager;1"
 
 #define NS_MSGACCOUNTMANAGER_CID									\
 { /* D2876E50-E62C-11d2-B7FC-00805F05FFA5 */			\
  0xd2876e50, 0xe62c, 0x11d2,											\
  {0xb7, 0xfc, 0x0, 0x80, 0x5f, 0x5, 0xff, 0xa5 }}
 
@@ -283,17 +283,17 @@
     0x91fd6b19, 0xe0bc, 0x11d3,			\
   { 0x8f, 0x97, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
 
 //
 // nsMsgServiceProviderService
 //
 #define NS_MSGSERVICEPROVIDERSERVICE_CONTRACTID \
   NS_RDF_DATASOURCE_CONTRACTID_PREFIX "ispdefaults"
-  
+
 /* 10998cef-d7f2-4772-b7db-bd097454984c */
 #define NS_MSGSERVICEPROVIDERSERVICE_CID \
 { 0x10998cef, 0xd7f2, 0x4772, \
   { 0xb7, 0xdb, 0xbd, 0x09, 0x74, 0x54, 0x98, 0x4c}}
 
 #define NS_MSGLOGONREDIRECTORSERVICE_CONTRACTID \
 	"@mozilla.org/messenger/msglogonredirector;1"
 
@@ -315,17 +315,17 @@
 // nsSubscribeDataSource
 //
 #define NS_SUBSCRIBEDATASOURCE_CONTRACTID \
   NS_RDF_DATASOURCE_CONTRACTID_PREFIX "subscribe"
 
 /* 00e89c82-1dd2-11b2-9a1c-e75995d7d595 */
 #define NS_SUBSCRIBEDATASOURCE_CID \
 { 0x00e89c82, 0x1dd2, 0x11b2, \
-  { 0x9a, 0x1c, 0xe7, 0x59, 0x95, 0xd7, 0xd5, 0x95}} 
+  { 0x9a, 0x1c, 0xe7, 0x59, 0x95, 0xd7, 0xd5, 0x95}}
 
 #define NS_MSGLOCALFOLDERCOMPACTOR_CONTRACTID \
   "@mozilla.org/messenger/localfoldercompactor;1"
 
 /* 7d1d315c-e5c6-11d4-a5b7-0060b0fc04b7 */
 #define NS_MSGLOCALFOLDERCOMPACTOR_CID \
   {0x7d1d315c, 0xe5c6, 0x11d4, \
     {0xa5, 0xb7, 0x00,0x60, 0xb0, 0xfc, 0x04, 0xb7 }}
@@ -396,40 +396,40 @@
     {0x83, 0x87, 0x86, 0xb0, 0xae, 0xb1, 0x86, 0x3c}}
 
 /* e4603d6c-0a74-47c5-b69e-2f8876990304 */
 #define NS_MSG_GROUPDBVIEW_CID \
   {0xe4603d6c, 0x0a74, 0x47c5, \
     {0xb6, 0x9e, 0x2f, 0x88, 0x76, 0x99, 0x03, 0x04}}
 //
 // nsMsgAccountManager
-// 
+//
 #define NS_MSGOFFLINEMANAGER_CONTRACTID \
   "@mozilla.org/messenger/offline-manager;1"
 
 #define NS_MSGOFFLINEMANAGER_CID									\
 { /* ac6c518a-09b2-11d5-a5bf-0060b0fc04b7 */			\
  0xac6c518a, 0x09b2, 0x11d5,											\
  {0xa5, 0xbf, 0x0, 0x60, 0xb0, 0xfc, 0x04, 0xb7 }}
 
 
 //
 // nsMsgProgress
-// 
+//
 #define NS_MSGPROGRESS_CONTRACTID \
   "@mozilla.org/messenger/progress;1"
 
 #define NS_MSGPROGRESS_CID									      \
 { /* 9f4dd201-3b1f-11d5-9daa-c345c9453d3c */			\
  0x9f4dd201, 0x3b1f, 0x11d5,											\
  {0x9d, 0xaa, 0xc3, 0x45, 0xc9, 0x45, 0x3d, 0x3c }}
 
 //
 // nsSpamSettings
-// 
+//
 #define NS_SPAMSETTINGS_CONTRACTID \
   "@mozilla.org/messenger/spamsettings;1"
 
 #define NS_SPAMSETTINGS_CID									      \
 { /* ce6038ae-e5e0-4372-9cff-2a6633333b2b */			\
  0xce6038ae, 0xe5e0, 0x4372,											\
  {0x9c, 0xff, 0x2a, 0x66, 0x33, 0x33, 0x3b, 0x2b }}
 
@@ -450,36 +450,36 @@
 #define NS_MSGNOTIFICATIONSERVICE_CONTRACTID \
 "@mozilla.org/messenger/msgnotificationservice;1"
 
 #define NS_MSGNOTIFICATIONSERVICE_CID \
 { /* F1F7CBCD-D5E3-45A0-AA2D-CECF1A95AB03 */ \
   0xf1f7cbcd, 0xd5e3, 0x45a0, \
   {0xaa, 0x2d, 0xce, 0xcf, 0x1a, 0x95, 0xab, 0x03}}
 
-// 
-// nsMessengerOSIntegration 
+//
+// nsMessengerOSIntegration
 //
 #define NS_MESSENGEROSINTEGRATION_CONTRACTID \
   "@mozilla.org/messenger/osintegration;1"
 
 //
 // cid protocol handler
 //
 #define NS_CIDPROTOCOLHANDLER_CONTRACTID \
  NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "cid"
 
 #define NS_CIDPROTOCOL_CID \
 { /* b3db9392-1b15-48ba-a136-0cc3db13d87b */ \
  0xb3db9392, 0x1b15, 0x48ba,      \
  {0xa1, 0x36, 0x0c, 0xc3, 0xdb, 0x13, 0xd8, 0x7b }}
 
-// 
+//
 // Mail Directory Provider
-// 
+//
 #define NS_MAILDIRPROVIDER_CONTRACTID \
   "@mozilla.org/mail/dir-provider;1"
 
 #define MAILDIRPROVIDER_CID \
 { 0x3f9bb53, 0xa680, 0x4349, \
   { 0x8d, 0xe9, 0xd2, 0x68, 0x64, 0xd9, 0xff, 0xd9 } }
 
 //
--- a/mailnews/base/public/nsMsgGroupnameFlags.h
+++ b/mailnews/base/public/nsMsgGroupnameFlags.h
@@ -25,17 +25,17 @@
 												   newsgroup. */
 #define MSG_GROUPNAME_FLAG_NEW_GROUP	0x0080  /* A newsgroup which has just
 												   been added by the `Check
 												   New Groups' command. */
 #define MSG_GROUPNAME_FLAG_HASCHILDREN	0x40000 /* Whether there are children
 												  of this group.  Whether those
 												  chilren are visible in this
 												  list is determined by the
-												  above "ELIDED" flag. 
+												  above "ELIDED" flag.
 												  Setting this to the same value
 												  as an nsMsgFolderFlags IMAP server,
 												  since an IMAP _server_ will never
 												  appear in the subscribe pane.  */
 #define MSG_GROUPNAME_FLAG_IMAP_PERSONAL	0x80000		/* folder is an IMAP personal folder */
 
 #define MSG_GROUPNAME_FLAG_IMAP_PUBLIC		0x100000		/* folder is an IMAP public folder */
 
--- a/mailnews/base/search/public/nsMsgSearchScopeTerm.h
+++ b/mailnews/base/search/public/nsMsgSearchScopeTerm.h
@@ -16,25 +16,25 @@
 #include "nsIWeakReference.h"
 #include "nsIWeakReferenceUtils.h"
 
 class nsMsgSearchScopeTerm : public nsIMsgSearchScopeTerm
 {
 public:
   nsMsgSearchScopeTerm (nsIMsgSearchSession *, nsMsgSearchScopeValue, nsIMsgFolder *);
   nsMsgSearchScopeTerm ();
-  
+
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGSEARCHSCOPETERM
-    
+
   nsresult TimeSlice (bool *aDone);
   nsresult InitializeAdapter (nsIArray *termList);
-  
+
   char *GetStatusBarName ();
-  
+
   nsMsgSearchScopeValue m_attribute;
   char *m_name;
   nsCOMPtr <nsIMsgFolder> m_folder;
   nsCOMPtr <nsIMsgSearchAdapter> m_adapter;
   nsCOMPtr <nsIInputStream> m_inputStream; // for message bodies
   nsWeakPtr m_searchSession;
   bool m_searchServer;
 
--- a/mailnews/base/src/nsCopyMessageStreamListener.cpp
+++ b/mailnews/base/src/nsCopyMessageStreamListener.cpp
@@ -34,21 +34,21 @@ static nsresult GetMessage(nsIURI *aURL,
   if (NS_FAILED(rv) || uri.IsEmpty()) {
     rv = uriURL->GetUri(getter_Copies(uri));
     NS_ENSURE_SUCCESS(rv,rv);
   }
 
   nsCOMPtr <nsIMsgMessageService> msgMessageService;
   rv = GetMessageServiceFromURI(uri, getter_AddRefs(msgMessageService));
   NS_ENSURE_SUCCESS(rv,rv);
-  if (!msgMessageService) 
+  if (!msgMessageService)
     return NS_ERROR_FAILURE;
 
   rv = msgMessageService->MessageURIToMsgHdr(uri.get(), message);
-  return rv; 
+  return rv;
 }
 
 nsCopyMessageStreamListener::nsCopyMessageStreamListener()
 {
 }
 
 nsCopyMessageStreamListener::~nsCopyMessageStreamListener()
 {
--- a/mailnews/base/src/nsMailDirProvider.cpp
+++ b/mailnews/base/src/nsMailDirProvider.cpp
@@ -92,18 +92,18 @@ nsMailDirProvider::GetFile(const char *a
 NS_IMETHODIMP
 nsMailDirProvider::GetFiles(const char *aKey,
                             nsISimpleEnumerator **aResult)
 {
   if (strcmp(aKey, ISP_DIRECTORY_LIST) != 0)
     return NS_ERROR_FAILURE;
 
   // The list of isp directories includes the isp directory
-  // in the current process dir (i.e. <path to thunderbird.exe>\isp and 
-  // <path to thunderbird.exe>\isp\locale 
+  // in the current process dir (i.e. <path to thunderbird.exe>\isp and
+  // <path to thunderbird.exe>\isp\locale
   // and isp and isp\locale for each active extension
 
   nsCOMPtr<nsIProperties> dirSvc =
     do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID);
   if (!dirSvc)
     return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIFile> currentProcessDir;
@@ -178,17 +178,17 @@ nsMailDirProvider::AppendingEnumerator::
     {
       if (!mLocale.IsEmpty())
       {
         mNext->Clone(getter_AddRefs(mNextWithLocale));
         mNextWithLocale->AppendNative(mLocale);
         rv = mNextWithLocale->Exists(&exists);
         if (NS_FAILED(rv) || !exists)
           mNextWithLocale = nullptr; // clear out mNextWithLocale, so we don't try to iterate over it
-      } 
+      }
       break;
     }
 
     mNext = nullptr;
   }
 
   return NS_OK;
 }
--- a/mailnews/base/src/nsMailDirServiceDefs.h
+++ b/mailnews/base/src/nsMailDirServiceDefs.h
@@ -22,10 +22,10 @@
 
 #define NS_APP_MAIL_50_DIR                      "MailD"
 #define NS_APP_IMAP_MAIL_50_DIR                 "IMapMD"
 #define NS_APP_NEWS_50_DIR                      "NewsD"
 
 #define NS_APP_MESSENGER_FOLDER_CACHE_50_FILE   "MFCaF"
 
 #define ISP_DIRECTORY_LIST                 "ISPDL"
-      
+
 #endif
--- a/mailnews/base/src/nsMessenger.cpp
+++ b/mailnews/base/src/nsMessenger.cpp
@@ -664,17 +664,17 @@ nsresult nsMessenger::SaveAttachment(nsI
 {
   nsCOMPtr<nsIMsgMessageService> messageService;
   nsSaveAllAttachmentsState *saveState= (nsSaveAllAttachmentsState*) closure;
   nsCOMPtr<nsIMsgMessageFetchPartService> fetchService;
   nsAutoCString urlString;
   nsCOMPtr<nsIURI> URL;
   nsAutoCString fullMessageUri(aMessageUri);
 
-  // This instance will be held onto by the listeners, and will be released once 
+  // This instance will be held onto by the listeners, and will be released once
   // the transfer has been completed.
   RefPtr<nsSaveMsgListener> saveListener(new nsSaveMsgListener(aFile, this, aListener));
 
   saveListener->m_contentType = aContentType;
   if (saveState)
   {
     saveListener->m_saveAllAttachmentsState = saveState;
     if (saveState->m_detachingAttachments)
@@ -889,17 +889,17 @@ nsMessenger::SaveOneAttachment(const cha
   NS_ENSURE_SUCCESS(rv, rv);
 
   SetLastSaveDirectory(localFile);
 
   nsCString dirName;
   rv = localFile->GetNativePath(dirName);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsSaveAllAttachmentsState *saveState = 
+  nsSaveAllAttachmentsState *saveState =
     new nsSaveAllAttachmentsState(1,
                                   &aContentType,
                                   &aURL,
                                   &aDisplayName,
                                   &aMessageUri,
                                   dirName.get(),
                                   detaching);
 
@@ -1058,17 +1058,17 @@ nsMessenger::SaveAs(const nsACString& aU
       // A null saveAsFile means that the user canceled the save as
       if (NS_FAILED(rv) || !saveAsFile)
         goto done;
     }
     else {
       saveAsFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
       rv = saveAsFile->InitWithPath(aMsgFilename);
       if (NS_FAILED(rv))
-        goto done;      
+        goto done;
       if (StringEndsWith(aMsgFilename, NS_LITERAL_STRING(TEXT_FILE_EXTENSION),
                          nsCaseInsensitiveStringComparator()))
         saveAsFileType = TEXT_FILE_TYPE;
       else if ((StringEndsWith(aMsgFilename,
                                NS_LITERAL_STRING(HTML_FILE_EXTENSION),
                                nsCaseInsensitiveStringComparator())) ||
                (StringEndsWith(aMsgFilename,
                                NS_LITERAL_STRING(HTML_FILE_EXTENSION2),
@@ -1171,17 +1171,17 @@ nsMessenger::SaveAs(const nsACString& aU
     // ** save as Template
     nsCOMPtr <nsIFile> tmpFile;
     nsresult rv = GetSpecialDirectoryWithFileName(NS_OS_TEMP_DIR,
                                                   "nsmail.tmp",
                                                   getter_AddRefs(tmpFile));
 
     NS_ENSURE_SUCCESS(rv, rv);
 
-    // For temp file, we should use restrictive 00600 instead of ATTACHMENT_PERMISSION 
+    // For temp file, we should use restrictive 00600 instead of ATTACHMENT_PERMISSION
     rv = tmpFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 00600);
     if (NS_FAILED(rv)) goto done;
 
     // The saveListener is owned by whoever we ultimately register the
     // listener with, generally a URL.
     saveListener = new nsSaveMsgListener(tmpFile, this, nullptr);
 
     if (aIdentity)
@@ -1640,17 +1640,17 @@ nsMessenger::GetLastDisplayedMessageUri(
 
 nsSaveMsgListener::nsSaveMsgListener(nsIFile* aFile, nsMessenger *aMessenger, nsIUrlListener *aListener)
 {
   m_file = do_QueryInterface(aFile);
   m_messenger = aMessenger;
   mListener = aListener;
   mUrlHasStopped = false;
   mRequestHasStopped = false;
-  
+
     // rhp: for charset handling
   m_doCharsetConversion = false;
   m_saveAllAttachmentsState = nullptr;
   mProgress = 0;
   mMaxProgress = -1;
   mCanceled = false;
   m_outputFormat = eUnknown;
   mInitialized = false;
@@ -1690,17 +1690,17 @@ nsSaveMsgListener::OnStartRunningUrl(nsI
 
 NS_IMETHODIMP
 nsSaveMsgListener::OnStopRunningUrl(nsIURI *url, nsresult exitCode)
 {
   nsresult rv = exitCode;
   mUrlHasStopped = true;
 
   // ** save as template goes here
-  if (!m_templateUri.IsEmpty()) 
+  if (!m_templateUri.IsEmpty())
   {
     nsCOMPtr<nsIRDFService> rdf(do_GetService(kRDFServiceCID, &rv));
     if (NS_FAILED(rv)) goto done;
     nsCOMPtr<nsIRDFResource> res;
     rv = rdf->GetResource(m_templateUri, getter_AddRefs(res));
     if (NS_FAILED(rv)) goto done;
     nsCOMPtr<nsIMsgFolder> templateFolder;
     templateFolder = do_QueryInterface(res, &rv);
@@ -1727,22 +1727,22 @@ nsSaveMsgListener::OnStopRunningUrl(nsIU
 done:
   if (NS_FAILED(rv))
   {
     if (m_file)
       m_file->Remove(false);
     if (m_messenger)
         m_messenger->Alert("saveMessageFailed");
   }
-  
+
   if (mRequestHasStopped && mListener)
     mListener->OnStopRunningUrl(url, exitCode);
   else
     mListenerUri = url;
-  
+
   return rv;
 }
 
 NS_IMETHODIMP
 nsSaveMsgListener::OnStartCopy(void)
 {
   return NS_OK;
 }
@@ -1773,40 +1773,40 @@ nsSaveMsgListener::OnStopCopy(nsresult a
   return aStatus;
 }
 
 // initializes the progress window if we are going to show one
 // and for OSX, sets creator flags on the output file
 nsresult nsSaveMsgListener::InitializeDownload(nsIRequest * aRequest)
 {
   nsresult rv = NS_OK;
-  
+
   mInitialized = true;
   nsCOMPtr<nsIChannel> channel (do_QueryInterface(aRequest));
-  
+
   if (!channel)
     return rv;
-  
+
   // Get the max progress from the URL if we haven't already got it.
   if (mMaxProgress == -1)
   {
     nsCOMPtr<nsIURI> uri;
     channel->GetURI(getter_AddRefs(uri));
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl(do_QueryInterface(uri));
     if (mailnewsUrl)
       mailnewsUrl->GetMaxProgress(&mMaxProgress);
   }
-  
+
   if (!m_contentType.IsEmpty())
   {
     nsCOMPtr<nsIMIMEService> mimeService (do_GetService(NS_MIMESERVICE_CONTRACTID));
     nsCOMPtr<nsIMIMEInfo> mimeinfo;
-    
+
     mimeService->GetFromTypeAndExtension(m_contentType, EmptyCString(), getter_AddRefs(mimeinfo));
-    
+
     // create a download progress window
 
     // Set saveToDisk explicitly to avoid launching the saved file.
     // See https://hg.mozilla.org/mozilla-central/file/814a6f071472/toolkit/components/jsdownloads/src/DownloadLegacy.js#l164
     mimeinfo->SetPreferredAction(nsIHandlerInfo::saveToDisk);
 
     // When we don't allow warnings, also don't show progress, as this
     //  is an environment (typically filters) where we don't want
@@ -1815,25 +1815,25 @@ nsresult nsSaveMsgListener::InitializeDo
     if (m_saveAllAttachmentsState)
       allowProgress = !m_saveAllAttachmentsState->m_withoutWarning;
     if (allowProgress)
     {
       nsCOMPtr<nsITransfer> tr = do_CreateInstance(NS_TRANSFER_CONTRACTID, &rv);
       if (tr && m_file)
       {
         PRTime timeDownloadStarted = PR_Now();
-        
+
         nsCOMPtr<nsIURI> outputURI;
         NS_NewFileURI(getter_AddRefs(outputURI), m_file);
-        
+
         nsCOMPtr<nsIURI> url;
         channel->GetURI(getter_AddRefs(url));
         rv = tr->Init(url, outputURI, EmptyString(), mimeinfo,
                       timeDownloadStarted, nullptr, this, false);
-        
+
           // now store the web progresslistener
         mTransfer = tr;
       }
     }
   }
   return rv;
 }
 
@@ -1852,17 +1852,17 @@ nsSaveMsgListener::OnStartRequest(nsIReq
 }
 
 NS_IMETHODIMP
 nsSaveMsgListener::OnStopRequest(nsIRequest* request, nsISupports* aSupport,
                                  nsresult status)
 {
   nsresult rv = NS_OK;
   mRequestHasStopped = true;
-  
+
   // rhp: If we are doing the charset conversion magic, this is different
   // processing, otherwise, its just business as usual.
   // If we need text/plain, then we need to convert the HTML and then convert
   // to the systems charset.
   if (m_doCharsetConversion && m_outputStream)
   {
     // For HTML, code is emitted immediately in OnDataAvailable.
     MOZ_ASSERT(m_outputFormat == ePlainText,
@@ -1881,37 +1881,37 @@ nsSaveMsgListener::OnStopRequest(nsIRequ
     if (NS_SUCCEEDED(rv))
     {
       uint32_t writeCount;
       rv = m_outputStream->Write(outCString.get(), outCString.Length(), &writeCount);
       if (outCString.Length() != writeCount)
         rv = NS_ERROR_FAILURE;
     }
   }
- 
+
   if (m_outputStream)
   {
     m_outputStream->Close();
     m_outputStream = nullptr;
   }
-  
+
   if (m_saveAllAttachmentsState)
   {
     m_saveAllAttachmentsState->m_curIndex++;
     if (!mCanceled && m_saveAllAttachmentsState->m_curIndex < m_saveAllAttachmentsState->m_count)
     {
       nsSaveAllAttachmentsState *state = m_saveAllAttachmentsState;
       uint32_t i = state->m_curIndex;
       nsString unescapedName;
       nsCOMPtr<nsIFile> localFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
       if (NS_FAILED(rv)) goto done;
       rv = localFile->InitWithNativePath(nsDependentCString(state->m_directoryName));
-      
+
       if (NS_FAILED(rv)) goto done;
-      
+
       ConvertAndSanitizeFileName(state->m_displayNameArray[i], unescapedName);
       rv = localFile->Append(unescapedName);
       if (NS_FAILED(rv))
         goto done;
 
       // When we are running with no warnings (typically filters and other automatic
       //  uses), then don't prompt for duplicates, but create a unique file
       //  instead.
@@ -1977,17 +1977,17 @@ nsSaveMsgListener::OnDataAvailable(nsIRe
                                   nsIInputStream* inStream,
                                   uint64_t srcOffset,
                                   uint32_t count)
 {
   nsresult rv = NS_ERROR_FAILURE;
   // first, check to see if we've been canceled....
   if (mCanceled) // then go cancel our underlying channel too
     return request->Cancel(NS_BINDING_ABORTED);
-  
+
   if (!mInitialized)
     InitializeDownload(request);
 
   if (m_outputStream)
   {
     mProgress += count;
     uint64_t available;
     uint32_t readCount, maxReadCount = sizeof(m_dataBuffer);
@@ -2868,17 +2868,17 @@ nsDelAttachListener::StartProcessing(nsM
 
   // create an output stream on a temporary file. This stream will save the modified
   // message data to a file which we will later use to replace the existing message.
   // The file is removed in the destructor.
   rv = GetSpecialDirectoryWithFileName(NS_OS_TEMP_DIR, "nsmail.tmp",
                                        getter_AddRefs(mMsgFile));
   NS_ENSURE_SUCCESS(rv,rv);
 
-  // For temp file, we should use restrictive 00600 instead of ATTACHMENT_PERMISSION 
+  // For temp file, we should use restrictive 00600 instead of ATTACHMENT_PERMISSION
   rv = mMsgFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 00600);
   NS_ENSURE_SUCCESS(rv,rv);
 
   rv = MsgNewBufferedFileOutputStream(getter_AddRefs(mMsgFileStream), mMsgFile, -1, ATTACHMENT_PERMISSION);
 
   // create the additional header for data conversion. This will tell the stream converter
   // which MIME emitter we want to use, and it will tell the MIME emitter which attachments
   // should be deleted.
@@ -2965,17 +2965,17 @@ nsMessenger::DetachAttachments(uint32_t 
                                const char ** aDisplayNameArray,
                                const char ** aMessageUriArray,
                                nsTArray<nsCString> *saveFileUris,
                                bool withoutWarning)
 {
   // if withoutWarning no dialog for user
   if (!withoutWarning && NS_FAILED(PromptIfDeleteAttachments(saveFileUris != nullptr, aCount, aDisplayNameArray)))
       return NS_OK;
-  
+
   nsresult rv = NS_OK;
 
   // ensure that our arguments are valid
 //  char * partId;
   for (uint32_t u = 0; u < aCount; ++u)
   {
     // ensure all of the message URI are the same, we cannot process
     // attachments from different messages
--- a/mailnews/base/src/nsMessenger.h
+++ b/mailnews/base/src/nsMessenger.h
@@ -22,24 +22,24 @@
 #include "nsIFolderListener.h"
 
 class nsMessenger : public nsIMessenger, public nsSupportsWeakReference, public nsIFolderListener
 {
 
 public:
   nsMessenger();
 
-  NS_DECL_ISUPPORTS  
+  NS_DECL_ISUPPORTS
   NS_DECL_NSIMESSENGER
   NS_DECL_NSIFOLDERLISTENER
 
   nsresult Alert(const char * stringName);
 
   nsresult SaveAttachment(nsIFile *file, const nsACString& unescapedUrl,
-                          const nsACString& messageUri, const nsACString& contentType, 
+                          const nsACString& messageUri, const nsACString& contentType,
                           void *closure, nsIUrlListener *aListener);
   nsresult PromptIfFileExists(nsIFile *file);
   nsresult DetachAttachments(uint32_t aCount,
                              const char ** aContentTypeArray,
                              const char ** aUrlArray,
                              const char ** aDisplayNameArray,
                              const char ** aMessageUriArray,
                              nsTArray<nsCString> *saveFileUris,
--- a/mailnews/base/src/nsMessengerBootstrap.cpp
+++ b/mailnews/base/src/nsMessengerBootstrap.cpp
@@ -65,17 +65,17 @@ NS_IMETHODIMP nsMessengerBootstrap::Open
     if (!standAloneMsgWindow)
     {
       nsCOMPtr<nsISupportsPRUint32> scriptableMessageKey (do_CreateInstance(NS_SUPPORTS_PRUINT32_CONTRACTID));
       NS_ENSURE_TRUE(scriptableMessageKey, NS_ERROR_FAILURE);
       scriptableMessageKey->SetData(aMessageKey);
       argsArray->AppendElement(scriptableMessageKey, false);
     }
   }
-  
+
   nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // we need to use the "mailnews.reuse_thread_window2" pref
   // to determine if we should open a new window, or use an existing one.
   nsCOMPtr<mozIDOMWindowProxy> newWindow;
   return wwatch->OpenWindow(0, chromeUrl.get(), "_blank",
                             "chrome,all,dialog=no", argsArray,
--- a/mailnews/base/src/nsMessengerBootstrap.h
+++ b/mailnews/base/src/nsMessengerBootstrap.h
@@ -16,16 +16,16 @@
   {0xb7, 0xf6, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5}}
 
 class nsMessengerBootstrap :
     public nsIMessengerWindowService
 {
 public:
   nsMessengerBootstrap();
 
-  NS_DECL_THREADSAFE_ISUPPORTS  
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMESSENGERWINDOWSERVICE
 
 private:
   virtual ~nsMessengerBootstrap();
 };
 
 #endif
--- a/mailnews/base/src/nsMessengerContentHandler.cpp
+++ b/mailnews/base/src/nsMessengerContentHandler.cpp
@@ -64,17 +64,17 @@ NS_IMETHODIMP nsMessengerContentHandler:
 
   return rv;
 }
 
 // Utility function to open a message display window and and load the message in it.
 nsresult nsMessengerContentHandler::OpenWindow(nsIURI* aURI)
 {
   NS_ENSURE_ARG_POINTER(aURI);
-  
+
   nsCOMPtr<nsIWindowWatcher> wwatch = do_GetService("@mozilla.org/embedcomp/window-watcher;1");
   if (!wwatch)
     return NS_ERROR_FAILURE;
 
   nsCOMPtr<mozIDOMWindowProxy> newWindow;
   return wwatch->OpenWindow(0, "chrome://messenger/content/messageWindow.xul",
                  "_blank", "all,chrome,dialog=no,status,toolbar", aURI,
                  getter_AddRefs(newWindow));
--- a/mailnews/base/src/nsMessengerContentHandler.h
+++ b/mailnews/base/src/nsMessengerContentHandler.h
@@ -5,16 +5,16 @@
 
 #include "nsIContentHandler.h"
 #include "nsIURI.h"
 
 class nsMessengerContentHandler : public nsIContentHandler
 {
 public:
   nsMessengerContentHandler();
-  
+
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTENTHANDLER
-    
+
 private:
   virtual ~nsMessengerContentHandler();
   nsresult OpenWindow(nsIURI* aURI);
 };
--- a/mailnews/base/src/nsMessengerWinIntegration.h
+++ b/mailnews/base/src/nsMessengerWinIntegration.h
@@ -18,17 +18,17 @@
 #include "nsString.h"
 #include "nsIMutableArray.h"
 #include "nsIObserver.h"
 
 #define NS_MESSENGERWININTEGRATION_CID \
   {0xf62f3d3a, 0x1dd1, 0x11b2, \
     {0xa5, 0x16, 0xef, 0xad, 0xb1, 0x31, 0x61, 0x5c}}
 
-class nsIStringBundle; 
+class nsIStringBundle;
 
 class nsMessengerWinIntegration : public nsIMessengerOSIntegration,
                                   public nsIFolderListener,
                                   public nsIObserver
 {
 public:
   nsMessengerWinIntegration();
   virtual nsresult Init();
@@ -46,33 +46,33 @@ public:
 private:
   virtual ~nsMessengerWinIntegration();
   nsresult AlertFinished();
   nsresult AlertClicked();
 #ifdef MOZ_SUITE
   nsresult AlertClickedSimple();
 #endif
 
-  void InitializeBiffStatusIcon(); 
+  void InitializeBiffStatusIcon();
   void FillToolTipInfo();
   void GenericShellNotify(DWORD aMessage);
   void DestroyBiffIcon();
 
   nsresult GetFirstFolderWithNewMail(nsACString& aFolderURI);
 
   nsresult GetStringBundle(nsIStringBundle **aBundle);
   nsCOMPtr<nsIMutableArray> mFoldersWithNewMail;  // keep track of all the root folders with pending new mail
   uint32_t mCurrentBiffState;
 
   bool mBiffIconVisible;
   bool mBiffIconInitialized;
   bool mSuppressBiffIcon;
   bool mAlertInProgress;
-  
-  // "might" because we don't know until we check 
+
+  // "might" because we don't know until we check
   // what type of server is associated with the default account
   bool            mDefaultAccountMightHaveAnInbox;
 
   // True if the timer is running
   bool mUnreadTimerActive;
 
   nsresult ResetCurrent();
   nsresult RemoveCurrentFromRegistry();
--- a/mailnews/base/src/nsMsgAccountManager.h
+++ b/mailnews/base/src/nsMsgAccountManager.h
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- * This Original Code has been modified by IBM Corporation. Modifications made by IBM 
+ * This Original Code has been modified by IBM Corporation. Modifications made by IBM
  * described herein are Copyright (c) International Business Machines Corporation, 2000.
  * Modifications to Mozilla code or documentation identified per MPL Section 3.3
  *
  * Date             Modified by     Description of modification
  * 04/20/2000       IBM Corp.      OS/2 VisualAge build.
  */
 
 #include "nscore.h"
@@ -66,23 +66,23 @@ class nsMsgAccountManager: public nsIMsg
     public nsIObserver,
     public nsSupportsWeakReference,
     public nsIUrlListener,
     public nsIFolderListener
 {
 public:
 
   nsMsgAccountManager();
-  
+
   NS_DECL_THREADSAFE_ISUPPORTS
- 
+
   /* nsIMsgAccountManager methods */
-  
+
   NS_DECL_NSIMSGACCOUNTMANAGER
-  NS_DECL_NSIOBSERVER  
+  NS_DECL_NSIOBSERVER
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIFOLDERLISTENER
 
   nsresult Init();
   nsresult Shutdown();
   void LogoutOfServer(nsIMsgIncomingServer *aServer);
 
 private:
--- a/mailnews/base/src/nsMsgAccountManagerDS.cpp
+++ b/mailnews/base/src/nsMsgAccountManagerDS.cpp
@@ -219,25 +219,25 @@ nsMsgAccountManagerDataSource::Init()
   nsresult rv;
 
   rv = nsMsgRDFDataSource::Init();
   if (NS_FAILED(rv)) return rv;
 
   nsCOMPtr<nsIMsgAccountManager> am;
 
   // get a weak ref to the account manager
-  if (!mAccountManager) 
+  if (!mAccountManager)
   {
     am = do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     mAccountManager = do_GetWeakReference(am);
   }
   else
     am = do_QueryReferent(mAccountManager);
 
-  if (am) 
+  if (am)
   {
     am->AddIncomingServerListener(this);
     am->AddRootFolderListener(this);
   }
 
 
   return NS_OK;
 }
@@ -264,17 +264,17 @@ nsMsgAccountManagerDataSource::GetTarget
 {
   nsresult rv;
 
 
   rv = NS_RDF_NO_VALUE;
 
   nsAutoString str;
   if (property == kNC_Name || property == kNC_FolderTreeName ||
-      property == kNC_FolderTreeSimpleName) 
+      property == kNC_FolderTreeSimpleName)
   {
     rv = getStringBundle();
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsString pageTitle;
     if (source == kNC_PageTitleServer)
       mStringBundle->GetStringFromName("prefPanel-server", pageTitle);
 
@@ -360,17 +360,17 @@ nsMsgAccountManagerDataSource::GetTarget
     else {
       nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(source, &rv);
       if (NS_SUCCEEDED(rv) && folder) {
         /* if this is a server, with no identities, then we show a special panel */
         nsCOMPtr<nsIMsgIncomingServer> server;
         rv = getServerForFolderNode(source, getter_AddRefs(server));
         if (server)
           server->GetAccountManagerChrome(str);
-        else 
+        else
           str.AssignLiteral("am-main.xul");
       }
       else {
         // allow for the accountmanager to be dynamically extended
         const char *sourceValue;
         rv = source->GetValueConst(&sourceValue);
         NS_ENSURE_SUCCESS(rv,rv);
 
@@ -703,17 +703,17 @@ nsMsgAccountManagerDataSource::createSet
     rv = server->GetOfflineSupportLevel(&offlineSupportLevel);
     NS_ENSURE_SUCCESS(rv,rv);
 
     bool supportsDiskSpace;
     rv = server->GetSupportsDiskSpace(&supportsDiskSpace);
     NS_ENSURE_SUCCESS(rv,rv);
 
     // currently there is no offline without diskspace
-    if (offlineSupportLevel >= OFFLINE_SUPPORT_LEVEL_REGULAR) 
+    if (offlineSupportLevel >= OFFLINE_SUPPORT_LEVEL_REGULAR)
       aNodeArray->AppendObject(kNC_PageTitleSynchronization);
     else if (supportsDiskSpace)
       aNodeArray->AppendObject(kNC_PageTitleDiskSpace);
 
     if (hasIdentities) {
       // extensions come after the default panels
       rv = appendGenericSettingsResources(server, aNodeArray);
       NS_ASSERTION(NS_SUCCEEDED(rv), "failed to add generic panels");
@@ -1037,21 +1037,21 @@ nsMsgAccountManagerDataSource::isContain
 
 // returns failure if the object is not a root server
 nsresult
 nsMsgAccountManagerDataSource::getServerForFolderNode(nsIRDFNode *aResource,
                                                       nsIMsgIncomingServer **aResult)
 {
   nsresult rv;
   nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(aResource, &rv);
-  if (NS_SUCCEEDED(rv)) 
+  if (NS_SUCCEEDED(rv))
   {
     bool isServer;
     rv = folder->GetIsServer(&isServer);
-    if (NS_SUCCEEDED(rv) && isServer) 
+    if (NS_SUCCEEDED(rv) && isServer)
       return folder->GetServer(aResult);
   }
   return NS_ERROR_FAILURE;
 }
 
 nsresult
 nsMsgAccountManagerDataSource::getStringBundle()
 {
--- a/mailnews/base/src/nsMsgAccountManagerDS.h
+++ b/mailnews/base/src/nsMsgAccountManagerDS.h
@@ -27,23 +27,23 @@
     {0x96, 0x9d, 0x00, 0x60, 0x08, 0x94, 0x80, 0x10}}
 
 class nsMsgAccountManagerDataSource : public nsMsgRDFDataSource,
                                       public nsIFolderListener,
                                       public nsIIncomingServerListener
 {
 
 public:
-    
+
   nsMsgAccountManagerDataSource();
   virtual nsresult Init() override;
 
   virtual void Cleanup() override;
   // service manager shutdown method
-  
+
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIFOLDERLISTENER
   NS_DECL_NSIINCOMINGSERVERLISTENER
   NS_DECL_NSIOBSERVER
   // RDF datasource methods
   NS_IMETHOD GetTarget(nsIRDFResource *source,
                        nsIRDFResource *property,
                        bool aTruthValue,
@@ -55,38 +55,38 @@ public:
   NS_IMETHOD ArcLabelsOut(nsIRDFResource *source,
                           nsISimpleEnumerator **_retval) override;
 
   NS_IMETHOD HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty,
                           nsIRDFNode *aTarget, bool aTruthValue,
                           bool *_retval) override;
   NS_IMETHOD HasArcOut(nsIRDFResource *source, nsIRDFResource *aArc,
                        bool *result) override;
-    
+
 protected:
   virtual ~nsMsgAccountManagerDataSource();
 
   nsresult HasAssertionServer(nsIMsgIncomingServer *aServer,
                               nsIRDFResource *aProperty,
                               nsIRDFNode *aTarget,
                               bool aTruthValue, bool *_retval);
 
   nsresult HasAssertionAccountRoot(nsIRDFResource *aProperty,
                                    nsIRDFNode *aTarget,
                                    bool aTruthValue, bool *_retval);
-  
+
   bool isDefaultServer(nsIMsgIncomingServer *aServer);
   bool supportsFilters(nsIMsgIncomingServer *aServer);
   bool canGetMessages(nsIMsgIncomingServer *aServer);
   bool canGetIncomingMessages(nsIMsgIncomingServer *aServer);
-  
+
   static bool isContainment(nsIRDFResource *aProperty);
   nsresult getServerForFolderNode(nsIRDFNode *aResource,
                                   nsIMsgIncomingServer **aResult);
-  
+
   nsresult createRootResources(nsIRDFResource *aProperty,
                                nsCOMArray<nsIRDFResource> *aNodeArray);
   nsresult createSettingsResources(nsIRDFResource *aSource,
                                    nsCOMArray<nsIRDFResource> *aNodeArray);
   nsresult appendGenericSettingsResources(nsIMsgIncomingServer *server,\
                                           nsCOMArray<nsIRDFResource> *aNodeArray);
   nsresult appendGenericSetting(const char *name,
                                 nsCOMArray<nsIRDFResource> *aNodeArray);
@@ -96,20 +96,20 @@ protected:
   static nsIRDFResource* kNC_FolderTreeSimpleName;
   static nsIRDFResource* kNC_NameSort;
   static nsIRDFResource* kNC_FolderTreeNameSort;
   static nsIRDFResource* kNC_PageTag;
   static nsIRDFResource* kNC_IsDefaultServer;
   static nsIRDFResource* kNC_SupportsFilters;
   static nsIRDFResource* kNC_CanGetMessages;
   static nsIRDFResource* kNC_CanGetIncomingMessages;
-  
+
   static nsIRDFResource* kNC_Child;
   static nsIRDFResource* kNC_AccountRoot;
-  
+
   static nsIRDFResource* kNC_Account;
   static nsIRDFResource* kNC_Server;
   static nsIRDFResource* kNC_Identity;
   static nsIRDFResource* kNC_Settings;
   static nsIRDFResource* kNC_Junk;
 
   static nsIRDFResource* kNC_PageTitleMain;
   static nsIRDFResource* kNC_PageTitleServer;
@@ -121,17 +121,17 @@ protected:
   static nsIRDFResource* kNC_PageTitleJunk;
 
   static nsIRDFLiteral* kTrueLiteral;
 
   static nsrefcnt gAccountManagerResourceRefCnt;
 
   static nsresult getAccountArcs(nsIMutableArray **aResult);
   static nsresult getAccountRootArcs(nsIMutableArray **aResult);
-  
+
 private:
   nsresult serverHasIdentities(nsIMsgIncomingServer *aServer, bool *aResult);
   nsresult getStringBundle();
 
   static nsCOMPtr<nsIMutableArray> mAccountArcsOut;
   static nsCOMPtr<nsIMutableArray> mAccountRootArcsOut;
   nsWeakPtr mAccountManager;
   nsCOMPtr<nsIStringBundle> mStringBundle;
--- a/mailnews/base/src/nsMsgBiffManager.cpp
+++ b/mailnews/base/src/nsMsgBiffManager.cpp
@@ -61,45 +61,45 @@ nsMsgBiffManager::~nsMsgBiffManager()
 NS_IMETHODIMP nsMsgBiffManager::Init()
 {
   if (mInited)
     return NS_OK;
 
   mInited = true;
   nsresult rv;
 
-  nsCOMPtr<nsIMsgAccountManager> accountManager = 
+  nsCOMPtr<nsIMsgAccountManager> accountManager =
   do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv))
     accountManager->AddIncomingServerListener(this);
 
   // in turbo mode on profile change we don't need to do anything below this
   if (mHaveShutdown)
   {
     mHaveShutdown = false;
     return NS_OK;
   }
 
   // Ensure status bar biff service has started
-  nsCOMPtr<nsIFolderListener> statusBarBiffService = 
+  nsCOMPtr<nsIFolderListener> statusBarBiffService =
     do_GetService(kStatusBarBiffManagerCID, &rv);
 
   nsCOMPtr<nsIObserverService> observerService =
     mozilla::services::GetObserverService();
   if (observerService)
   {
     observerService->AddObserver(this, "sleep_notification", true);
     observerService->AddObserver(this, "wake_notification", true);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgBiffManager::Shutdown()
 {
-  if (mBiffTimer) 
+  if (mBiffTimer)
   {
     mBiffTimer->Cancel();
     mBiffTimer = nullptr;
   }
 
   nsresult rv;
   nsCOMPtr<nsIMsgAccountManager> accountManager =
     do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
@@ -314,17 +314,17 @@ nsresult nsMsgBiffManager::PerformBiff()
   {
     // Take a copy of the entry rather than the a reference so that we can
     // remove and add if necessary, but keep the references and memory alive.
     nsBiffEntry current = mBiffArray[i];
     if (current.nextBiffTime < currentTime)
     {
       bool serverBusy = false;
       bool serverRequiresPassword = true;
-      bool passwordPromptRequired; 
+      bool passwordPromptRequired;
 
       current.server->GetPasswordPromptRequired(&passwordPromptRequired);
       current.server->GetServerBusy(&serverBusy);
       current.server->GetServerRequiresPasswordForBiff(&serverRequiresPassword);
       // find the dest folder we're actually downloading to...
       nsCOMPtr<nsIMsgFolder> rootMsgFolder;
       current.server->GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
       int32_t targetFolderIndex = targetFolders.IndexOfObject(rootMsgFolder);
--- a/mailnews/base/src/nsMsgBiffManager.h
+++ b/mailnews/base/src/nsMsgBiffManager.h
@@ -23,17 +23,17 @@ typedef struct {
 
 class nsMsgBiffManager
   : public nsIMsgBiffManager,
     public nsIIncomingServerListener,
     public nsIObserver,
     public nsSupportsWeakReference
 {
 public:
-  nsMsgBiffManager(); 
+  nsMsgBiffManager();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGBIFFMANAGER
   NS_DECL_NSIINCOMINGSERVERLISTENER
   NS_DECL_NSIOBSERVER
 
   nsresult PerformBiff();
 
--- a/mailnews/base/src/nsMsgContentPolicy.h
+++ b/mailnews/base/src/nsMsgContentPolicy.h
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**********************************************************************************
  * nsMsgContentPolicy enforces the specified content policy on images, js, plugins, etc.
  * This is the class used to determine what elements in a message should be loaded.
  *
- * nsMsgCookiePolicy enforces our cookie policy for mail and RSS messages. 
+ * nsMsgCookiePolicy enforces our cookie policy for mail and RSS messages.
  ***********************************************************************************/
 
 #ifndef _nsMsgContentPolicy_H_
 #define _nsMsgContentPolicy_H_
 
 #include "nsIContentPolicy.h"
 #include "nsIObserver.h"
 #include "nsWeakReference.h"
@@ -39,23 +39,23 @@ class nsMsgContentPolicy : public nsICon
                            public nsIWebProgressListener,
                            public nsIMsgContentPolicy,
                            public nsSupportsWeakReference
 {
 public:
   nsMsgContentPolicy();
 
   nsresult Init();
-    
+
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTENTPOLICY
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIMSGCONTENTPOLICY
-  
+
 protected:
   virtual ~nsMsgContentPolicy();
 
   bool     mBlockRemoteImages;
   nsCString mTrustedMailDomains;
   nsCOMPtr<nsIPermissionManager> mPermissionManager;
 
   bool IsTrustedDomain(nsIURI * aContentLocation);
@@ -67,17 +67,17 @@ protected:
   bool ShouldAcceptRemoteContentForSender(nsIMsgDBHdr *aMsgHdr);
   int16_t ShouldAcceptRemoteContentForMsgHdr(nsIMsgDBHdr *aMsgHdr,
                                              nsIURI *aRequestingLocation,
                                              nsIURI *aContentLocation);
   void ShouldAcceptContentForPotentialMsg(nsIURI *aOriginatorLocation,
                                           nsIURI *aContentLocation,
                                           int16_t *aDecision);
   void ComposeShouldLoad(nsIMsgCompose *aMsgCompose,
-                         nsISupports *aRequestingContext, 
+                         nsISupports *aRequestingContext,
                          nsIURI *aContentLocation, int16_t *aDecision);
   already_AddRefed<nsIMsgCompose> GetMsgComposeForContext(nsISupports *aRequestingContext);
 
   nsresult GetRootDocShellForContext(nsISupports *aRequestingContext,
                                      nsIDocShell **aDocShell);
   nsresult GetOriginatingURIForContext(nsISupports *aRequestingContext,
                                        nsIURI **aURI);
   nsresult SetDisableItemsOnMailNewsUrlDocshells(nsIURI *aContentLocation,
--- a/mailnews/base/src/nsMsgCopyService.cpp
+++ b/mailnews/base/src/nsMsgCopyService.cpp
@@ -64,17 +64,17 @@ nsCopyRequest::~nsCopyRequest()
   int32_t j = m_copySourceArray.Length();
   while(j-- > 0)
     delete m_copySourceArray.ElementAt(j);
 }
 
 nsresult
 nsCopyRequest::Init(nsCopyRequestType type, nsISupports* aSupport,
                     nsIMsgFolder* dstFolder,
-                    bool bVal, uint32_t newMsgFlags, 
+                    bool bVal, uint32_t newMsgFlags,
                     const nsACString &newMsgKeywords,
                     nsIMsgCopyServiceListener* listener,
                     nsIMsgWindow* msgWindow, bool allowUndo)
 {
   nsresult rv = NS_OK;
   m_requestType = type;
   m_srcSupport = aSupport;
   m_dstFolder = dstFolder;
@@ -167,17 +167,17 @@ void nsMsgCopyService::LogCopyRequest(co
 }
 
 nsresult
 nsMsgCopyService::ClearRequest(nsCopyRequest* aRequest, nsresult rv)
 {
   if (aRequest)
   {
     if (MOZ_LOG_TEST(gCopyServiceLog, mozilla::LogLevel::Info))
-      LogCopyRequest(NS_SUCCEEDED(rv) ? "Clearing OK request" 
+      LogCopyRequest(NS_SUCCEEDED(rv) ? "Clearing OK request"
                                       : "Clearing failed request", aRequest);
 
     // Send notifications to nsIMsgFolderListeners
     if (NS_SUCCEEDED(rv) && aRequest->m_requestType == nsCopyFoldersType)
     {
       nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
       if (notifier)
       {
@@ -360,17 +360,17 @@ nsMsgCopyService::DoNextCopy()
             }
           }
       }
     }
     return rv;
 }
 
 /**
- * Find a request in m_copyRequests which matches the passed in source 
+ * Find a request in m_copyRequests which matches the passed in source
  * and destination folders.
  *
  * @param aSupport the iSupports of the source folder.
  * @param dstFolder the destination folder of the copy request.
  */
 nsCopyRequest*
 nsMsgCopyService::FindRequest(nsISupports* aSupport,
                               nsIMsgFolder* dstFolder)
@@ -475,17 +475,17 @@ nsMsgCopyService::CopyMessages(nsIMsgFol
 
   copyRequest = new nsCopyRequest();
   if (!copyRequest)
     return NS_ERROR_OUT_OF_MEMORY;
 
   aSupport = do_QueryInterface(srcFolder, &rv);
 
   rv = copyRequest->Init(nsCopyMessagesType, aSupport, dstFolder, isMove,
-                        0 /* new msg flags, not used */, EmptyCString(), 
+                        0 /* new msg flags, not used */, EmptyCString(),
                         listener, window, allowUndo);
   if (NS_FAILED(rv))
     goto done;
 
   if (MOZ_LOG_TEST(gCopyServiceLog, mozilla::LogLevel::Info))
     LogCopyRequest("CopyMessages request", copyRequest);
 
   // duplicate the message array so we could sort the messages by it's
--- a/mailnews/base/src/nsMsgCopyService.h
+++ b/mailnews/base/src/nsMsgCopyService.h
@@ -33,25 +33,25 @@ public:
     ~nsCopySource();
     void AddMessage(nsIMsgDBHdr* aMsg);
 
     nsCOMPtr<nsIMsgFolder> m_msgFolder;
     nsCOMPtr<nsIMutableArray> m_messageArray;
     bool m_processed;
 };
 
-class nsCopyRequest 
+class nsCopyRequest
 {
 public:
     nsCopyRequest();
     ~nsCopyRequest();
 
     nsresult Init(nsCopyRequestType type, nsISupports* aSupport,
                   nsIMsgFolder* dstFolder,
-                  bool bVal, uint32_t newMsgFlags, 
+                  bool bVal, uint32_t newMsgFlags,
                   const nsACString &newMsgKeywords,
                   nsIMsgCopyServiceListener* listener,
                   nsIMsgWindow *msgWindow, bool allowUndo);
     nsCopySource* AddNewCopySource(nsIMsgFolder* srcFolder);
 
     nsCOMPtr<nsISupports> m_srcSupport; // ui source folder or file spec
     nsCOMPtr<nsIMsgFolder> m_dstFolder;
     nsCOMPtr<nsIMsgWindow> m_msgWindow;
@@ -67,17 +67,17 @@ public:
     nsTArray<nsCopySource*> m_copySourceArray; // array of nsCopySource
 };
 
 class nsMsgCopyService : public nsIMsgCopyService
 {
 public:
   nsMsgCopyService();
 
-  NS_DECL_THREADSAFE_ISUPPORTS 
+  NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_DECL_NSIMSGCOPYSERVICE
 
 private:
   virtual ~nsMsgCopyService();
 
   nsresult ClearRequest(nsCopyRequest* aRequest, nsresult rv);
   nsresult DoCopy(nsCopyRequest* aRequest);
@@ -86,9 +86,9 @@ private:
   nsresult QueueRequest(nsCopyRequest* aRequest, bool *aCopyImmediately);
   void LogCopyCompletion(nsISupports *aSrc, nsIMsgFolder *aDest);
   void LogCopyRequest(const char *logMsg, nsCopyRequest* aRequest);
 
   nsTArray<nsCopyRequest*> m_copyRequests;
 };
 
 
-#endif 
+#endif
--- a/mailnews/base/src/nsMsgDBView.h
+++ b/mailnews/base/src/nsMsgDBView.h
@@ -137,17 +137,17 @@ protected:
   bool           mSuppressMsgDisplay; // set when the message pane is collapsed
   bool           mSuppressCommandUpdating;
   bool           mRemovingRow; // set when we're telling the outline a row is being removed. used to suppress msg loading.
                         // during delete/move operations.
   bool          mCommandsNeedDisablingBecauseOfSelection;
   bool          mSuppressChangeNotification;
   bool          mGoForwardEnabled;
   bool          mGoBackEnabled;
-  
+
   virtual const char * GetViewName(void) {return "MsgDBView"; }
   nsresult FetchAuthor(nsIMsgDBHdr * aHdr, nsAString &aAuthorString);
   nsresult FetchRecipients(nsIMsgDBHdr * aHdr, nsAString &aRecipientsString);
   nsresult FetchSubject(nsIMsgDBHdr * aMsgHdr, uint32_t aFlags, nsAString &aValue);
   nsresult FetchDate(nsIMsgDBHdr * aHdr, nsAString & aDateString, bool rcvDate = false);
   nsresult FetchStatus(uint32_t aFlags, nsAString &aStatusString);
   nsresult FetchSize(nsIMsgDBHdr * aHdr, nsAString & aSizeString);
   nsresult FetchPriority(nsIMsgDBHdr *aHdr, nsAString & aPriorityString);
@@ -163,27 +163,27 @@ protected:
   // The default enumerator is over the db, but things like
   // quick search views will enumerate just the displayed messages.
   virtual nsresult GetMessageEnumerator(nsISimpleEnumerator **enumerator);
   // this is a message enumerator that enumerates based on the view contents
   virtual nsresult GetViewEnumerator(nsISimpleEnumerator **enumerator);
 
   // Save and Restore Selection are a pair of routines you should
   // use when performing an operation which is going to change the view
-  // and you want to remember the selection. (i.e. for sorting). 
+  // and you want to remember the selection. (i.e. for sorting).
   // Call SaveAndClearSelection and we'll give you an array of msg keys for
-  // the current selection. We also freeze and clear the selection. 
-  // When you are done changing the view, 
+  // the current selection. We also freeze and clear the selection.
+  // When you are done changing the view,
   // call RestoreSelection passing in the same array
   // and we'll restore the selection AND unfreeze selection in the UI.
   nsresult SaveAndClearSelection(nsMsgKey *aCurrentMsgKey, nsTArray<nsMsgKey> &aMsgKeyArray);
   nsresult RestoreSelection(nsMsgKey aCurrentmsgKey, nsTArray<nsMsgKey> &aMsgKeyArray);
 
   // this is not safe to use when you have a selection
-  // RowCountChanged() will call AdjustSelection() 
+  // RowCountChanged() will call AdjustSelection()
   // it should be called after SaveAndClearSelection() and before
   // RestoreSelection()
   nsresult AdjustRowCount(int32_t rowCountBeforeSort, int32_t rowCountAfterSort);
 
   nsresult GetSelectedIndices(nsMsgViewIndexArray& selection);
   nsresult GenerateURIForMsgKey(nsMsgKey aMsgKey, nsIMsgFolder *folder, nsACString &aURI);
 // routines used in building up view
   virtual bool WantsThisThread(nsIMsgThread * thread);
@@ -196,17 +196,17 @@ protected:
   nsMsgViewIndex GetIndexForThread(nsIMsgDBHdr *hdr);
   nsMsgViewIndex GetThreadRootIndex(nsIMsgDBHdr *msgHdr);
   virtual nsresult GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDBHdr **msgHdr);
   // given a view index, return the index of the top-level msg in the thread.
   nsMsgViewIndex GetThreadIndex(nsMsgViewIndex msgIndex);
 
   virtual void InsertMsgHdrAt(nsMsgViewIndex index, nsIMsgDBHdr *hdr,
                               nsMsgKey msgKey, uint32_t flags, uint32_t level);
-  virtual void SetMsgHdrAt(nsIMsgDBHdr *hdr, nsMsgViewIndex index, 
+  virtual void SetMsgHdrAt(nsIMsgDBHdr *hdr, nsMsgViewIndex index,
                               nsMsgKey msgKey, uint32_t flags, uint32_t level);
   virtual bool InsertEmptyRows(nsMsgViewIndex viewIndex, int32_t numRows);
   virtual void RemoveRows(nsMsgViewIndex viewIndex, int32_t numRows);
   nsresult ToggleExpansion(nsMsgViewIndex index, uint32_t *numChanged);
   nsresult ExpandByIndex(nsMsgViewIndex index, uint32_t *pNumExpanded);
   nsresult CollapseByIndex(nsMsgViewIndex index, uint32_t *pNumCollapsed);
   nsresult ExpandAll();
   nsresult CollapseAll();
@@ -337,17 +337,17 @@ protected:
   static int FnSortIdUint32(const void *pItem1, const void *pItem2, void *privateData);
 
   nsresult GetStatusSortValue(nsIMsgDBHdr *msgHdr, uint32_t *result);
   nsresult GetLocationCollationKey(nsIMsgDBHdr *msgHdr, uint8_t **result, uint32_t *len);
   void PushSort(const MsgViewSortColumnInfo &newSort);
   nsresult EncodeColumnSort(nsString &columnSortString);
   nsresult DecodeColumnSort(nsString &columnSortString);
   // for view navigation
-  nsresult NavigateFromPos(nsMsgNavigationTypeValue motion, nsMsgViewIndex startIndex, nsMsgKey *pResultKey, 
+  nsresult NavigateFromPos(nsMsgNavigationTypeValue motion, nsMsgViewIndex startIndex, nsMsgKey *pResultKey,
               nsMsgViewIndex *pResultIndex, nsMsgViewIndex *pThreadIndex, bool wrap);
   nsresult FindNextFlagged(nsMsgViewIndex startIndex, nsMsgViewIndex *pResultIndex);
   nsresult FindFirstNew(nsMsgViewIndex *pResultIndex);
   nsresult FindPrevUnread(nsMsgKey startKey, nsMsgKey *pResultKey, nsMsgKey *resultThreadId);
   nsresult FindFirstFlagged(nsMsgViewIndex *pResultIndex);
   nsresult FindPrevFlagged(nsMsgViewIndex startIndex, nsMsgViewIndex *pResultIndex);
   nsresult MarkThreadOfMsgRead(nsMsgKey msgId, nsMsgViewIndex msgIndex, nsTArray<nsMsgKey> &idsMarkedRead, bool bRead);
   nsresult MarkThreadRead(nsIMsgThread *threadHdr, nsMsgViewIndex threadIndex, nsTArray<nsMsgKey> &idsMarkedRead, bool bRead);
@@ -382,17 +382,17 @@ protected:
   // we need to store the message key for the message we are currenty displaying to ensure we
   // don't try to redisplay the same message just because the selection changed (i.e. after a sort)
   nsMsgKey                m_currentlyDisplayedMsgKey;
   nsCString               m_currentlyDisplayedMsgUri;
   nsMsgViewIndex          m_currentlyDisplayedViewIndex;
   // if we're deleting messages, we want to hold off loading messages on selection changed until the delete is done
   // and we want to batch notifications.
   bool m_deletingRows;
-  // for certain special folders 
+  // for certain special folders
   // and decendents of those folders
   // (like the "Sent" folder, "Sent/Old Sent")
   // the Sender column really shows recipients.
 
   // Server types for this view's folder
   bool mIsNews;             // we have special icons for news
   bool mIsRss;              // rss affects enabling of junk commands
   bool mIsXFVirtual;        // a virtual folder with multiple folders
@@ -419,49 +419,49 @@ protected:
   nsString m_secondaryCustomColumn;
   nsMsgViewFlagsTypeValue m_viewFlags;
 
   // I18N date formatter service which we'll want to cache locally.
   nsCOMPtr<nsIMsgTagService> mTagService;
   nsWeakPtr mMessengerWeak;
   nsWeakPtr mMsgWindowWeak;
   nsCOMPtr<nsIMsgDBViewCommandUpdater> mCommandUpdater; // we push command update notifications to the UI from this.
-  nsCOMPtr<nsIStringBundle> mMessengerStringBundle;  
+  nsCOMPtr<nsIStringBundle> mMessengerStringBundle;
 
   // used for the preference labels
   nsString mLabelPrefDescriptions[PREF_LABELS_MAX];
   nsString mLabelPrefColors[PREF_LABELS_MAX];
 
   // used to determine when to start and end
   // junk plugin batches
   uint32_t mNumMessagesRemainingInBatch;
 
   // these are the headers of the messages in the current
   // batch/series of batches of messages manually marked
   // as junk
   nsCOMPtr<nsIMutableArray> mJunkHdrs;
-  
+
   nsTArray<uint32_t> mIndicesToNoteChange;
 
   nsTHashtable<nsCStringHashKey> mEmails;
 
-  // the saved search views keep track of the XX most recently deleted msg ids, so that if the 
+  // the saved search views keep track of the XX most recently deleted msg ids, so that if the
   // delete is undone, we can add the msg back to the search results, even if it no longer
   // matches the search criteria (e.g., a saved search over unread messages).
   // We use mRecentlyDeletedArrayIndex to treat the array as a list of the XX
   // most recently deleted msgs.
   nsTArray<nsCString> mRecentlyDeletedMsgIds;
   uint32_t mRecentlyDeletedArrayIndex;
   void RememberDeletedMsgHdr(nsIMsgDBHdr *msgHdr);
   bool WasHdrRecentlyDeleted(nsIMsgDBHdr *msgHdr);
-  
+
   //these hold pointers (and IDs) for the nsIMsgCustomColumnHandler object that constitutes the custom column handler
   nsCOMArray <nsIMsgCustomColumnHandler> m_customColumnHandlers;
   nsTArray<nsString> m_customColumnHandlerIDs;
-  
+
   nsIMsgCustomColumnHandler* GetColumnHandler(const char16_t*);
   nsIMsgCustomColumnHandler* GetCurColumnHandler();
   bool CustomColumnsInSortAndNotRegistered();
   void EnsureCustomColumnsValid();
 
 #ifdef DEBUG_David_Bienvenu
 void InitEntryInfoForIndex(nsMsgViewIndex i, IdKeyPtr &EntryInfo);
 void ValidateSort();
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -95,17 +95,17 @@ void nsFolderCompactState::CloseOutputSt
 }
 
 void nsFolderCompactState::CleanupTempFilesAfterError()
 {
   CloseOutputStream();
   if (m_db)
     m_db->ForceClosed();
   nsCOMPtr <nsIFile> summaryFile;
-  GetSummaryFileLocation(m_file, getter_AddRefs(summaryFile)); 
+  GetSummaryFileLocation(m_file, getter_AddRefs(summaryFile));
   m_file->Remove(false);
   summaryFile->Remove(false);
 }
 
 nsresult nsFolderCompactState::BuildMessageURI(const char *baseURI, nsMsgKey key, nsCString& uri)
 {
   uri.Append(baseURI);
   uri.Append('#');
@@ -149,31 +149,31 @@ NS_IMETHODIMP nsFolderCompactState::Comp
   else if (aOfflineFolderArray)
   {
     m_folderArray = aOfflineFolderArray;
     m_compactingOfflineFolders = true;
     aOfflineFolderArray = nullptr;
   }
   if (!m_folderArray)
     return NS_OK;
- 
+
   m_compactAll = true;
   m_compactOfflineAlso = aOfflineFolderArray != nullptr;
   if (m_compactOfflineAlso)
     m_offlineFolderArray = aOfflineFolderArray;
 
   m_folderIndex = 0;
   nsresult rv = NS_OK;
   nsCOMPtr<nsIMsgFolder> firstFolder = do_QueryElementAt(m_folderArray,
                                                          m_folderIndex, &rv);
 
   if (NS_SUCCEEDED(rv) && firstFolder)
-    Compact(firstFolder, m_compactingOfflineFolders, aUrlListener, 
+    Compact(firstFolder, m_compactingOfflineFolders, aUrlListener,
             aMsgWindow);   //start with first folder from here.
-  
+
   return rv;
 }
 
 NS_IMETHODIMP
 nsFolderCompactState::Compact(nsIMsgFolder *folder, bool aOfflineStore,
                               nsIUrlListener *aListener, nsIMsgWindow *aMsgWindow)
 {
   NS_ENSURE_ARG_POINTER(folder);
@@ -381,17 +381,17 @@ nsFolderCompactState::Init(nsIMsgFolder 
   {
     CleanupTempFilesAfterError();
     return rv;
   }
 
   m_curIndex = 0;
 
   rv = MsgNewBufferedFileOutputStream(getter_AddRefs(m_fileStream), m_file, -1, 00600);
-  if (NS_FAILED(rv)) 
+  if (NS_FAILED(rv))
     m_folder->ThrowAlertMsg("compactFolderWriteFailed", m_window);
   else
     rv = GetMessageServiceFromURI(nsDependentCString(baseMsgUri),
                                 getter_AddRefs(m_messageService));
   if (NS_FAILED(rv))
   {
     m_status = rv;
   }
@@ -435,22 +435,22 @@ NS_IMETHODIMP nsFolderCompactState::OnSt
   }
   return NS_OK;
 }
 
 nsresult nsFolderCompactState::StartCompacting()
 {
   nsCOMPtr<nsIMsgPluggableStore> msgStore;
   nsCOMPtr<nsIMsgIncomingServer> server;
-  
+
   nsresult rv = m_folder->GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = server->GetMsgStore(getter_AddRefs(msgStore));
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   // Notify that compaction is beginning.  We do this even if there are no
   // messages to be copied because the summary database still gets blown away
   // which is still pretty interesting.  (And we like consistency.)
   nsCOMPtr<nsIMsgFolderNotificationService>
     notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
   if (notifier)
     notifier->NotifyItemEvent(m_folder,
                               NS_LITERAL_CSTRING("FolderCompactStart"),
@@ -645,17 +645,17 @@ nsFolderCompactState::FinishCompact()
                               nullptr,
                               EmptyCString());
   m_folder->NotifyCompactCompleted();
 
   if (m_compactAll)
     rv = CompactNextFolder();
   else
     CompactCompleted(rv);
-      
+
   return rv;
 }
 
 
 void nsFolderCompactState::CompactCompleted(nsresult exitCode)
 {
   NS_WARNING_ASSERTION(NS_SUCCEEDED(exitCode),
                        "nsFolderCompactState::CompactCompleted failed");
@@ -780,17 +780,17 @@ nsFolderCompactState::OnStopRequest(nsIR
   return status;
 }
 
 NS_IMETHODIMP
 nsFolderCompactState::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
                                       nsIInputStream *inStr,
                                       uint64_t sourceOffset, uint32_t count)
 {
-  if (!m_fileStream || !inStr) 
+  if (!m_fileStream || !inStr)
     return NS_ERROR_FAILURE;
 
   nsresult rv = NS_OK;
   uint32_t msgFlags;
   bool checkForKeyword = m_startOfMsg;
   bool addKeywordHdr = false;
   uint32_t needToGrowKeywords = 0;
   uint32_t statusOffset;
@@ -805,46 +805,46 @@ nsFolderCompactState::OnDataAvailable(ns
                                 m_messageUri)))
     {
       rv = GetMessage(getter_AddRefs(m_curSrcHdr));
       NS_ENSURE_SUCCESS(rv, rv);
       if (m_curSrcHdr)
       {
         (void) m_curSrcHdr->GetFlags(&msgFlags);
         (void) m_curSrcHdr->GetStatusOffset(&statusOffset);
-        
+
         if (statusOffset == 0)
           m_needStatusLine = true;
         // x-mozilla-status lines should be at the start of the headers, and the code
         // below assumes everything will fit in m_dataBuffer - if there's not
         // room, skip the keyword stuff.
         if (statusOffset > sizeof(m_dataBuffer) - 1024)
         {
           checkForKeyword = false;
           NS_ASSERTION(false, "status offset past end of read buffer size");
-          
+
         }
       }
     }
     m_startOfMsg = false;
   }
   uint32_t maxReadCount, readCount, writeCount;
   uint32_t bytesWritten;
-  
+
   while (NS_SUCCEEDED(rv) && (int32_t) count > 0)
   {
     maxReadCount = count > sizeof(m_dataBuffer) - 1 ? sizeof(m_dataBuffer) - 1 : count;
     writeCount = 0;
     rv = inStr->Read(m_dataBuffer, maxReadCount, &readCount);
-    
+
     // if status offset is past the number of bytes we read, it's probably bogus,
     // and we shouldn't do any of the keyword stuff.
     if (statusOffset + X_MOZILLA_STATUS_LEN > readCount)
       checkForKeyword = false;
-    
+
     if (NS_SUCCEEDED(rv))
     {
       if (checkForKeyword)
       {
         // make sure that status offset really points to x-mozilla-status line
         if  (!strncmp(m_dataBuffer + statusOffset, X_MOZILLA_STATUS, X_MOZILLA_STATUS_LEN))
         {
           const char *keywordHdr = PL_strnrstr(m_dataBuffer, HEADER_X_MOZILLA_KEYWORDS, readCount);
@@ -855,19 +855,19 @@ nsFolderCompactState::OnDataAvailable(ns
           m_curSrcHdr->GetStringProperty("keywords", getter_Copies(msgHdrKeywords));
         }
         checkForKeyword = false;
       }
       uint32_t blockOffset = 0;
       if (m_needStatusLine)
       {
         m_needStatusLine = false;
-        // we need to parse out the "From " header, write it out, then 
-        // write out the x-mozilla-status headers, and set the 
-        // status offset of the dest hdr for later use 
+        // we need to parse out the "From " header, write it out, then
+        // write out the x-mozilla-status headers, and set the
+        // status offset of the dest hdr for later use
         // in OnEndCopy).
         if (!strncmp(m_dataBuffer, "From ", 5))
         {
           blockOffset = 5;
           // skip from line
           MsgAdvanceToNextLine(m_dataBuffer, blockOffset, readCount);
           char statusLine[50];
           m_fileStream->Write(m_dataBuffer, blockOffset, &writeCount);
@@ -988,17 +988,17 @@ nsFolderCompactState::OnDataAvailable(ns
         needToGrowKeywords = false;
         writeCount += blockOffset - preKeywordBlockOffset; // fudge writeCount
 
       }
       if (readCount <= blockOffset)
       {
         NS_ASSERTION(false, "bad block offset");
         // not sure what to do to handle this.
-      
+
       }
       m_fileStream->Write(m_dataBuffer + blockOffset, readCount - blockOffset, &bytesWritten);
       writeCount += bytesWritten;
       count -= readCount;
       if (writeCount != readCount)
         return NS_MSG_ERROR_WRITING_MAIL_FOLDER;
     }
   }
@@ -1152,17 +1152,17 @@ done:
     m_status = rv; // set the status to rv so the destructor can remove the
                    // temp folder and database
     ReleaseFolderLock();
     NS_RELEASE_THIS(); // kill self
     return rv;
   }
   return rv;
 }
- 
+
 
 nsresult
 nsOfflineStoreCompactState::FinishCompact()
 {
   // All okay time to finish up the compact process
   nsCOMPtr<nsIFile> path;
   uint32_t flags;
 
@@ -1188,20 +1188,20 @@ nsOfflineStoreCompactState::FinishCompac
   if (dbFolderInfo)
     dbFolderInfo->SetExpungedBytes(0);
   // this forces the m_folder to update mExpungedBytes from the db folder info.
   int64_t expungedBytes;
   m_folder->GetExpungedBytes(&expungedBytes);
   m_folder->UpdateSummaryTotals(true);
   m_db->SetSummaryValid(true);
 
-    // remove the old folder 
+    // remove the old folder
   path->Remove(false);
 
-    // rename the copied folder to be the original folder 
+    // rename the copied folder to be the original folder
   m_file->MoveToNative((nsIFile *) nullptr, leafName);
 
   ShowStatusMsg(EmptyString());
   m_folder->NotifyCompactCompleted();
   if (m_compactAll)
     rv = CompactNextFolder();
   return rv;
 }
@@ -1315,17 +1315,17 @@ nsresult nsOfflineStoreCompactState::Sta
   return rv;
 }
 
 NS_IMETHODIMP
 nsOfflineStoreCompactState::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
                                             nsIInputStream *inStr,
                                             uint64_t sourceOffset, uint32_t count)
 {
-  if (!m_fileStream || !inStr) 
+  if (!m_fileStream || !inStr)
     return NS_ERROR_FAILURE;
 
   nsresult rv = NS_OK;
 
   if (m_startOfMsg)
   {
     m_statusOffset = 0;
     m_offlineMsgSize = 0;
--- a/mailnews/base/src/nsMsgFolderCompactor.h
+++ b/mailnews/base/src/nsMsgFolderCompactor.h
@@ -67,17 +67,17 @@ protected:
   uint64_t m_totalMsgSize;
   // number of bytes that can be expunged while compacting.
   uint64_t m_totalExpungedBytes;
 
   uint32_t m_curIndex; // index of the current copied message key in key array
   uint64_t m_startOfNewMsg; // offset in mailbox of new message
   char m_dataBuffer[COMPACTOR_READ_BUFF_SIZE + 1]; // temp data buffer for copying message
   nsresult m_status; // the status of the copying operation
-  nsCOMPtr <nsIMsgMessageService> m_messageService; // message service for copying 
+  nsCOMPtr <nsIMsgMessageService> m_messageService; // message service for copying
   nsCOMPtr<nsIArray> m_folderArray; // folders we are compacting, if compacting multiple.
   nsCOMPtr <nsIMsgWindow> m_window;
   nsCOMPtr <nsIMsgDBHdr> m_curSrcHdr;
   uint32_t m_folderIndex; // tells which folder to compact in case of compact all
   bool m_compactAll;  //flag for compact all
   bool m_compactOfflineAlso; //whether to compact offline also
   bool m_compactingOfflineFolders; // are we in the offline folder compact phase
   bool m_parsingFolder; //flag for parsing local folders;
--- a/mailnews/base/src/nsMsgFolderDataSource.h
+++ b/mailnews/base/src/nsMsgFolderDataSource.h
@@ -27,17 +27,17 @@
 #endif
 /**
  * The mail data source.
  */
 class nsMsgFolderDataSource : public nsMsgRDFDataSource,
                               public nsIFolderListener
 {
 public:
-  
+
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIFOLDERLISTENER
 
   nsMsgFolderDataSource(void);
   virtual nsresult Init() override;
   virtual void Cleanup() override;
 
   // nsIRDFDataSource methods
@@ -54,22 +54,22 @@ public:
                        nsIRDFNode** target) override;
 
   NS_IMETHOD GetSources(nsIRDFResource* property,
                         nsIRDFNode* target,
                         bool tv,
                         nsISimpleEnumerator** sources) override;
 
   NS_IMETHOD GetTargets(nsIRDFResource* source,
-                        nsIRDFResource* property,    
+                        nsIRDFResource* property,
                         bool tv,
                         nsISimpleEnumerator** targets) override;
 
   NS_IMETHOD Assert(nsIRDFResource* source,
-                    nsIRDFResource* property, 
+                    nsIRDFResource* property,
                     nsIRDFNode* target,
                     bool tv) override;
 
   NS_IMETHOD Unassert(nsIRDFResource* source,
                       nsIRDFResource* property,
                       nsIRDFNode* target) override;
 
   NS_IMETHOD HasAssertion(nsIRDFResource* source,
@@ -80,17 +80,17 @@ public:
 
   NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc,
                        bool *result) override;
 
   NS_IMETHOD ArcLabelsIn(nsIRDFNode* node,
                          nsISimpleEnumerator** labels) override;
 
   NS_IMETHOD ArcLabelsOut(nsIRDFResource* source,
-                          nsISimpleEnumerator** labels) override; 
+                          nsISimpleEnumerator** labels) override;
 
   NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) override;
 
   NS_IMETHOD GetAllCmds(nsIRDFResource* source,
                             nsISimpleEnumerator/*<nsIRDFResource>*/** commands
                         ) override;
 
   NS_IMETHOD IsCommandEnabled(nsISupports/*nsISupportsArray<nsIRDFResource>*/* aSources,
@@ -155,28 +155,28 @@ protected:
                                     nsIRDFNode **target);
   nsresult createFolderSynchronizeNode(nsIMsgFolder *folder, nsIRDFNode **target);
   nsresult createFolderSyncDisabledNode(nsIMsgFolder *folder, nsIRDFNode **target);
   nsresult createCanSearchMessages(nsIMsgFolder *folder,
                                       nsIRDFNode **target);
   nsresult createFolderChildNode(nsIMsgFolder *folder, nsIRDFNode **target);
 
   nsresult getFolderArcLabelsOut(nsCOMArray<nsIRDFResource> &aArcs);
-  
+
 #if 0
   nsresult DoDeleteFromFolder(nsIMsgFolder *folder,
                 nsISupportsArray *arguments, nsIMsgWindow *msgWindow, bool reallyDelete);
 
   nsresult DoCopyToFolder(nsIMsgFolder *dstFolder, nsISupportsArray *arguments,
               nsIMsgWindow *msgWindow, bool isMove);
 
   nsresult DoFolderCopyToFolder(nsIMsgFolder *dstFolder, nsISupportsArray *arguments,
               nsIMsgWindow *msgWindow, bool isMoveFolder);
 
-  nsresult DoNewFolder(nsIMsgFolder *folder, nsISupportsArray *arguments, 
+  nsresult DoNewFolder(nsIMsgFolder *folder, nsISupportsArray *arguments,
                         nsIMsgWindow *window);
 #endif
 
   nsresult DoFolderAssert(nsIMsgFolder *folder, nsIRDFResource *property, nsIRDFNode *target);
   nsresult DoFolderUnassert(nsIMsgFolder *folder, nsIRDFResource *property, nsIRDFNode *target);
 
   nsresult DoFolderHasAssertion(nsIMsgFolder *folder, nsIRDFResource *property, nsIRDFNode *target,
                                 bool tv, bool *hasAssertion);
@@ -275,17 +275,17 @@ public:
   // constructor could take a filter to filter out folders.
   nsMsgFlatFolderDataSource();
   virtual ~nsMsgFlatFolderDataSource();
   virtual nsresult Init() override;
   virtual void Cleanup() override;
 
   NS_IMETHOD GetURI(char* *uri) override;
   NS_IMETHOD GetTargets(nsIRDFResource* source,
-                        nsIRDFResource* property,    
+                        nsIRDFResource* property,
                         bool tv,
                         nsISimpleEnumerator** targets) override;
   NS_IMETHOD GetTarget(nsIRDFResource* source,
                        nsIRDFResource* property,
                        bool tv,
                        nsIRDFNode** target) override;
 
   NS_IMETHOD HasAssertion(nsIRDFResource* source,
@@ -309,18 +309,18 @@ protected:
 };
 
 
 class nsMsgUnreadFoldersDataSource : public nsMsgFlatFolderDataSource
 {
 public:
   nsMsgUnreadFoldersDataSource() {m_dsName = "mailnewsunreadfolders";}
   virtual ~nsMsgUnreadFoldersDataSource() {}
-  virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource, 
-                    nsIRDFResource *propertyResource, nsIRDFNode *newNode, 
+  virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource,
+                    nsIRDFResource *propertyResource, nsIRDFNode *newNode,
                     nsIRDFNode *oldNode = nullptr) override;
 protected:
   virtual bool WantsThisFolder(nsIMsgFolder *folder) override;
 };
 
 class nsMsgFavoriteFoldersDataSource : public nsMsgFlatFolderDataSource
 {
 public:
@@ -331,18 +331,18 @@ protected:
 };
 
 class nsMsgRecentFoldersDataSource : public nsMsgFlatFolderDataSource
 {
 public:
   nsMsgRecentFoldersDataSource() {m_dsName = "mailnewsrecentfolders";
                                   m_cutOffDate = 0; m_maxNumFolders = 15;}
   virtual ~nsMsgRecentFoldersDataSource() {}
-  virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource, 
-                    nsIRDFResource *property, nsIRDFNode *newNode, 
+  virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource,
+                    nsIRDFResource *property, nsIRDFNode *newNode,
                     nsIRDFNode *oldNode) override;
   NS_IMETHOD OnItemAdded(nsIMsgFolder *parentItem, nsISupports *item) override;
   virtual void Cleanup() override;
 protected:
   virtual void EnsureFolders() override;
   uint32_t m_cutOffDate;
   uint32_t m_maxNumFolders;
 };
--- a/mailnews/base/src/nsMsgFolderNotificationService.cpp
+++ b/mailnews/base/src/nsMsgFolderNotificationService.cpp
@@ -87,31 +87,31 @@ NS_IMETHODIMP nsMsgFolderNotificationSer
 
 /* void notifyMsgsMoveCopyCompleted (in boolean aMove, in nsIArray aSrcMsgs,
                                      in nsIMsgFolder aDestFolder); */
 NS_IMETHODIMP nsMsgFolderNotificationService::NotifyMsgsMoveCopyCompleted(
   bool aMove, nsIArray *aSrcMsgs, nsIMsgFolder *aDestFolder,
   nsIArray *aDestMsgs)
 {
   uint32_t count = mListeners.Length();
-  
+
   // IMAP delete model means that a "move" isn't really a move, it is a copy,
   // followed by storing the IMAP deleted flag on the message.
   bool isReallyMove = aMove;
   if (count > 0 && aMove)
   {
     nsresult rv;
     // Assume that all the source messages are from the same server.
     nsCOMPtr<nsIMsgDBHdr> message(do_QueryElementAt(aSrcMsgs, 0, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIMsgFolder> msgFolder;
     rv = message->GetFolder(getter_AddRefs(msgFolder));
     NS_ENSURE_SUCCESS(rv, rv);
-    
+
     nsCOMPtr<nsIMsgImapMailFolder> imapFolder(do_QueryInterface(msgFolder));
     if (imapFolder)
     {
       nsCOMPtr<nsIImapIncomingServer> imapServer;
       imapFolder->GetImapIncomingServer(getter_AddRefs(imapServer));
       if (imapServer)
       {
         nsMsgImapDeleteModel deleteModel;
--- a/mailnews/base/src/nsMsgGroupThread.h
+++ b/mailnews/base/src/nsMsgGroupThread.h
@@ -30,31 +30,31 @@ protected:
   virtual ~nsMsgGroupThread();
 
   void      Init();
   nsMsgViewIndex AddChildFromGroupView(nsIMsgDBHdr *child, nsMsgDBView *view);
   nsresult  RemoveChild(nsMsgKey msgKey);
   nsresult  RerootThread(nsIMsgDBHdr *newParentOfOldRoot, nsIMsgDBHdr *oldRoot, nsIDBChangeAnnouncer *announcer);
 
   virtual nsMsgViewIndex AddMsgHdrInDateOrder(nsIMsgDBHdr *child, nsMsgDBView *view);
-  virtual nsMsgViewIndex GetInsertIndexFromView(nsMsgDBView *view, 
-                                          nsIMsgDBHdr *child, 
+  virtual nsMsgViewIndex GetInsertIndexFromView(nsMsgDBView *view,
+                                          nsIMsgDBHdr *child,
                                           nsMsgViewSortOrderValue threadSortOrder);
   nsresult ReparentNonReferenceChildrenOf(nsIMsgDBHdr *topLevelHdr, nsMsgKey newParentKey,
                                                             nsIDBChangeAnnouncer *announcer);
 
   nsresult ReparentChildrenOf(nsMsgKey oldParent, nsMsgKey newParent, nsIDBChangeAnnouncer *announcer);
   nsresult ChangeUnreadChildCount(int32_t delta);
   nsresult GetChildHdrForKey(nsMsgKey desiredKey, nsIMsgDBHdr **result, int32_t *resultIndex);
   uint32_t NumRealChildren();
   virtual void InsertMsgHdrAt(nsMsgViewIndex index, nsIMsgDBHdr *hdr);
   virtual void SetMsgHdrAt(nsMsgViewIndex index, nsIMsgDBHdr *hdr);
   virtual nsMsgViewIndex FindMsgHdr(nsIMsgDBHdr *hdr);
 
-  nsMsgKey        m_threadKey; 
+  nsMsgKey        m_threadKey;
   uint32_t        m_numUnreadChildren;	
   uint32_t        m_flags;
   nsMsgKey        m_threadRootKey;
   uint32_t        m_newestMsgDate;
   nsTArray<nsMsgKey> m_keys;
   bool            m_dummy; // top level msg is a dummy, e.g., grouped by age.
   nsCOMPtr <nsIMsgDatabase> m_db; // should we make a weak ref or just a ptr?
 };
@@ -70,18 +70,18 @@ public:
   NS_IMETHOD RemoveChildAt(uint32_t aIndex) override;
 protected:
   virtual ~nsMsgXFGroupThread();
 
   virtual void InsertMsgHdrAt(nsMsgViewIndex index,
                               nsIMsgDBHdr *hdr) override;
   virtual void SetMsgHdrAt(nsMsgViewIndex index, nsIMsgDBHdr *hdr) override;
   virtual nsMsgViewIndex FindMsgHdr(nsIMsgDBHdr *hdr) override;
-  virtual nsMsgViewIndex AddMsgHdrInDateOrder(nsIMsgDBHdr *child, 
+  virtual nsMsgViewIndex AddMsgHdrInDateOrder(nsIMsgDBHdr *child,
                                               nsMsgDBView *view) override;
-  virtual nsMsgViewIndex GetInsertIndexFromView(nsMsgDBView *view, 
-                                          nsIMsgDBHdr *child, 
+  virtual nsMsgViewIndex GetInsertIndexFromView(nsMsgDBView *view,
+                                          nsIMsgDBHdr *child,
                                           nsMsgViewSortOrderValue threadSortOrder
                                                 ) override;
 
   nsCOMArray<nsIMsgFolder> m_folders;
 };
 
--- a/mailnews/base/src/nsMsgGroupView.h
+++ b/mailnews/base/src/nsMsgGroupView.h
@@ -27,19 +27,19 @@ public:
                   int32_t *pCount) override;
   NS_IMETHOD OpenWithHdrs(nsISimpleEnumerator *aHeaders, nsMsgViewSortTypeValue aSortType,
                                         nsMsgViewSortOrderValue aSortOrder, nsMsgViewFlagsTypeValue aViewFlags,
                                         int32_t *aCount) override;
   NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
   NS_IMETHOD CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMessengerInstance,
                         nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCmdUpdater);
   NS_IMETHOD Close() override;
-  NS_IMETHOD OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted, nsMsgKey aParentKey, int32_t aFlags, 
+  NS_IMETHOD OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted, nsMsgKey aParentKey, int32_t aFlags,
                           nsIDBChangeListener *aInstigator) override;
-  NS_IMETHOD OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags, 
+  NS_IMETHOD OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags,
                                uint32_t aNewFlags, nsIDBChangeListener *aInstigator) override;
 
   NS_IMETHOD LoadMessageByViewIndex(nsMsgViewIndex aViewIndex) override;
   NS_IMETHOD GetCellProperties(int32_t aRow, nsITreeColumn *aCol, nsAString& aProperties) override;
   NS_IMETHOD GetRowProperties(int32_t aRow, nsAString& aProperties) override;
   NS_IMETHOD CellTextForColumn(int32_t aRow, const char16_t *aColumnName,
                                nsAString &aValue) override;
   NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **pThread) override;
@@ -47,17 +47,17 @@ public:
 
 protected:
   virtual void InternalClose();
   nsMsgGroupThread *AddHdrToThread(nsIMsgDBHdr *msgHdr, bool *pNewThread);
   virtual nsresult HashHdr(nsIMsgDBHdr *msgHdr, nsString& aHashKey);
   nsresult GetAgeBucketValue(nsIMsgDBHdr *aMsgHdr, uint32_t * aAgeBucket, bool rcvDate = false); // helper function to get the age bucket for a hdr, useful when grouped by date
   nsresult OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey aParentKey, bool /*ensureListed*/) override;
   virtual int32_t FindLevelInThread(nsIMsgDBHdr *msgHdr, nsMsgViewIndex startOfThread, nsMsgViewIndex viewIndex) override;
-  nsMsgViewIndex ThreadIndexOfMsg(nsMsgKey msgKey, 
+  nsMsgViewIndex ThreadIndexOfMsg(nsMsgKey msgKey,
                                   nsMsgViewIndex msgIndex = nsMsgViewIndex_None,
                                   int32_t *pThreadCount = NULL,
                                   uint32_t *pFlags = NULL) override;
 
   // Returns true if we are grouped by a sort attribute that uses a dummy row.
   bool GroupViewUsesDummyRow();
   nsresult RebuildView(nsMsgViewFlagsTypeValue viewFlags);
   virtual nsMsgGroupThread *CreateGroupThread(nsIMsgDatabase *db);
--- a/mailnews/base/src/nsMsgMailSession.cpp
+++ b/mailnews/base/src/nsMsgMailSession.cpp
@@ -356,17 +356,17 @@ NS_IMETHODIMP nsMsgMailSession::RemoveMs
   // Mac keeps a hidden window open so the app doesn't shut down when
   // the last window is closed. So don't shutdown the account manager in that
   // case. Similarly, for suite, we don't want to disable mailnews when the
   // last mail window is closed.
 #if !defined(XP_MACOSX) && !defined(MOZ_SUITE)
   if (!mWindows.Count())
   {
     nsresult rv;
-    nsCOMPtr<nsIMsgAccountManager> accountManager = 
+    nsCOMPtr<nsIMsgAccountManager> accountManager =
       do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
     if (NS_FAILED(rv))
       return rv;
     accountManager->CleanupOnExit();
   }
 #endif
   return NS_OK;
 }
@@ -513,17 +513,17 @@ nsMsgShutdownService::nsMsgShutdownServi
   }
 }
 
 nsMsgShutdownService::~nsMsgShutdownService()
 {
   nsCOMPtr<nsIObserverService> observerService =
     mozilla::services::GetObserverService();
   if (observerService)
-  {  
+  {
     observerService->RemoveObserver(this, "quit-application-requested");
     observerService->RemoveObserver(this, "quit-application-granted");
     observerService->RemoveObserver(this, "quit-application");
   }
 }
 
 nsresult nsMsgShutdownService::ProcessNextTask()
 {
@@ -531,17 +531,17 @@ nsresult nsMsgShutdownService::ProcessNe
 
   uint32_t count = mShutdownTasks.Length();
   if (mTaskIndex < count)
   {
     shutdownTasksDone = false;
 
     nsCOMPtr<nsIMsgShutdownTask> curTask = mShutdownTasks[mTaskIndex];
     nsString taskName;
-    curTask->GetCurrentTaskName(taskName); 
+    curTask->GetCurrentTaskName(taskName);
     SetStatusText(taskName);
 
     nsCOMPtr<nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID);
     NS_ENSURE_TRUE(mailSession, NS_ERROR_FAILURE);
 
     nsCOMPtr<nsIMsgWindow> topMsgWindow;
     mailSession->GetTopmostMsgWindow(getter_AddRefs(topMsgWindow));
 
@@ -597,84 +597,84 @@ NS_IMETHODIMP nsMsgShutdownService::Obse
 {
   // Due to bug 459376 we don't always get quit-application-requested and
   // quit-application-granted. quit-application-requested is preferred, but if
   // we don't then we have to hook onto quit-application, but we don't want
   // to do the checking twice so we set some flags to prevent that.
   if (!strcmp(aTopic, "quit-application-granted"))
   {
     // Quit application has been requested and granted, therefore we will shut
-    // down. 
+    // down.
     mProcessedShutdown = true;
     return NS_OK;
   }
 
   // If we've already processed a shutdown notification, no need to do it again.
   if (!strcmp(aTopic, "quit-application"))
   {
     if (mProcessedShutdown)
       return NS_OK;
     else
       mQuitForced = true;
   }
 
   nsCOMPtr<nsIObserverService> observerService =
     mozilla::services::GetObserverService();
   NS_ENSURE_STATE(observerService);
-  
+
   nsCOMPtr<nsISimpleEnumerator> listenerEnum;
   nsresult rv = observerService->EnumerateObservers("msg-shutdown", getter_AddRefs(listenerEnum));
   if (NS_SUCCEEDED(rv) && listenerEnum)
   {
     bool hasMore;
     listenerEnum->HasMoreElements(&hasMore);
     if (!hasMore)
       return NS_OK;
 
     while (hasMore)
     {
       nsCOMPtr<nsISupports> curObject;
       listenerEnum->GetNext(getter_AddRefs(curObject));
-      
+
       nsCOMPtr<nsIMsgShutdownTask> curTask = do_QueryInterface(curObject);
       if (curTask)
       {
         bool shouldRunTask;
         curTask->GetNeedsToRunTask(&shouldRunTask);
         if (shouldRunTask)
           mShutdownTasks.AppendObject(curTask);
       }
-      
+
       listenerEnum->HasMoreElements(&hasMore);
     }
 
     if (mShutdownTasks.Count() < 1)
       return NS_ERROR_FAILURE;
-    
+
     mTaskIndex = 0;
-    
+
     mMsgProgress = do_CreateInstance(NS_MSGPROGRESS_CONTRACTID);
     NS_ENSURE_TRUE(mMsgProgress, NS_ERROR_FAILURE);
-    
+
     nsCOMPtr<nsIMsgMailSession> mailSession = do_GetService(NS_MSGMAILSESSION_CONTRACTID);
     NS_ENSURE_TRUE(mailSession, NS_ERROR_FAILURE);
 
     nsCOMPtr<nsIMsgWindow> topMsgWindow;
     mailSession->GetTopmostMsgWindow(getter_AddRefs(topMsgWindow));
-    
+
     nsCOMPtr<mozIDOMWindowProxy> internalDomWin;
     if (topMsgWindow)
       topMsgWindow->GetDomWindow(getter_AddRefs(internalDomWin));
-    
+
     if (!internalDomWin)
     {
-      // First see if there is a window open. 
+      // First see if there is a window open.
       nsCOMPtr<nsIWindowMediator> winMed = do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
       winMed->GetMostRecentWindow(nullptr, getter_AddRefs(internalDomWin));
-      
+
       //If not use the hidden window.
       if (!internalDomWin)
       {
         nsCOMPtr<nsIAppShellService> appShell(do_GetService(NS_APPSHELLSERVICE_CONTRACTID));
         appShell->GetHiddenDOMWindow(getter_AddRefs(internalDomWin));
         NS_ENSURE_TRUE(internalDomWin, NS_ERROR_FAILURE);  // bail if we don't get a window.
       }
     }
@@ -686,18 +686,18 @@ NS_IMETHODIMP nsMsgShutdownService::Obse
 
       // If the attempted quit was a restart, be sure to restart the app once
       // the tasks have been run. This is usually the case when addons or
       // updates are going to be installed.
       if (aData && nsDependentString(aData).EqualsLiteral("restart"))
         mQuitMode |= nsIAppStartup::eRestart;
     }
 
-    mMsgProgress->OpenProgressDialog(internalDomWin, topMsgWindow, 
-                                     "chrome://messenger/content/shutdownWindow.xul", 
+    mMsgProgress->OpenProgressDialog(internalDomWin, topMsgWindow,
+                                     "chrome://messenger/content/shutdownWindow.xul",
                                      false, nullptr);
 
     if (mQuitForced)
     {
       nsCOMPtr<nsIThread> thread(do_GetCurrentThread());
 
       mReadyToQuit = false;
       while (!mReadyToQuit)
@@ -705,17 +705,17 @@ NS_IMETHODIMP nsMsgShutdownService::Obse
         PR_CEnterMonitor(this);
         // Waiting for 50 milliseconds
         PR_CWait(this, PR_MicrosecondsToInterval(50000UL));
         PR_CExitMonitor(this);
         NS_ProcessPendingEvents(thread);
       }
     }
   }
-  
+
   return NS_OK;
 }
 
 // nsIUrlListener
 NS_IMETHODIMP nsMsgShutdownService::OnStartRunningUrl(nsIURI *url)
 {
   return NS_OK;
 }
--- a/mailnews/base/src/nsMsgMailSession.h
+++ b/mailnews/base/src/nsMsgMailSession.h
@@ -20,18 +20,18 @@
 #include "nsTObserverArray.h"
 #include "nsIMsgUserFeedbackListener.h"
 #include "nsIUrlListener.h"
 
 ///////////////////////////////////////////////////////////////////////////////////
 // The mail session is a replacement for the old 4.x MSG_Master object. It contains
 // mail session generic information such as the user's current mail identity, ....
 // I'm starting this off as an empty interface and as people feel they need to
-// add more information to it, they can. I think this is a better approach than 
-// trying to port over the old MSG_Master in its entirety as that had a lot of 
+// add more information to it, they can. I think this is a better approach than
+// trying to port over the old MSG_Master in its entirety as that had a lot of
 // cruft in it....
 //////////////////////////////////////////////////////////////////////////////////
 
 class nsMsgMailSession : public nsIMsgMailSession,
                          public nsIFolderListener
 {
 public:
   nsMsgMailSession();
@@ -76,26 +76,26 @@ protected:
 /********************************************************************************/
 
 class nsMsgShutdownService : public nsIMsgShutdownService,
                              public nsIUrlListener,
                              public nsIObserver
 {
 public:
   nsMsgShutdownService();
-  
+
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGSHUTDOWNSERVICE
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIOBSERVER
-    
+
 protected:
   nsresult ProcessNextTask();
   void AttemptShutdown();
-  
+
 private:
   virtual ~nsMsgShutdownService();
 
   nsCOMArray<nsIMsgShutdownTask> mShutdownTasks;
   nsCOMPtr<nsIMsgProgress>       mMsgProgress;
   uint32_t                       mTaskIndex;
   uint32_t                       mQuitMode;
   bool mProcessedShutdown;
--- a/mailnews/base/src/nsMsgOfflineManager.cpp
+++ b/mailnews/base/src/nsMsgOfflineManager.cpp
@@ -173,17 +173,17 @@ nsresult nsMsgOfflineManager::Synchroniz
   return imapService->PlaybackAllOfflineOperations(m_window, this, getter_AddRefs(mOfflineImapSync));
 }
 
 nsresult nsMsgOfflineManager::SendUnsentMessages()
 {
   nsresult rv;
   nsCOMPtr<nsIMsgSendLater> pMsgSendLater(do_GetService(kMsgSendLaterCID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
-  nsCOMPtr<nsIMsgAccountManager> accountManager = 
+  nsCOMPtr<nsIMsgAccountManager> accountManager =
            do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
   // now we have to iterate over the identities, finding the *unique* unsent messages folder
   // for each one, determine if they have unsent messages, and if so, add them to the list
   // of identities to send unsent messages from.
   // However, I think there's only ever one unsent messages folder at the moment,
   // so I think we'll go with that for now.
   nsCOMPtr<nsIArray> identities;
@@ -210,42 +210,42 @@ nsresult nsMsgOfflineManager::SendUnsent
         if (numMessages > 0)
         {
           identityToUse = thisIdentity;
           break;
         }
       }
     }
   }
-  if (identityToUse) 
-  { 
+  if (identityToUse)
+  {
 #ifdef MOZ_SUITE
     if (m_statusFeedback)
       pMsgSendLater->SetStatusFeedback(m_statusFeedback);
 #endif
 
     pMsgSendLater->AddListener(this);
     rv = pMsgSendLater->SendUnsentMessages(identityToUse);
     ShowStatus("sendingUnsent");
     // if we succeeded, return - we'll run the next operation when the
     // send finishes. Otherwise, advance to the next state.
     if (NS_SUCCEEDED(rv))
       return rv;
-  } 
+  }
   return AdvanceToNextState(rv);
 
 }
 
 #define MESSENGER_STRING_URL       "chrome://messenger/locale/messenger.properties"
 
 nsresult nsMsgOfflineManager::ShowStatus(const char *statusMsgName)
 {
   if (!mStringBundle)
   {
-    nsCOMPtr<nsIStringBundleService> sBundleService = 
+    nsCOMPtr<nsIStringBundleService> sBundleService =
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(sBundleService, NS_ERROR_UNEXPECTED);
     sBundleService->CreateBundle(MESSENGER_STRING_URL, getter_AddRefs(mStringBundle));
     return NS_OK;
   }
 
   nsString statusString;
   nsresult res = mStringBundle->GetStringFromName(statusMsgName, statusString);
@@ -340,17 +340,17 @@ nsMsgOfflineManager::OnStopRunningUrl(ns
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgOfflineManager::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *someData)
 {
   return NS_OK;
 }
 
-// nsIMsgSendLaterListener implementation 
+// nsIMsgSendLaterListener implementation
 NS_IMETHODIMP
 nsMsgOfflineManager::OnStartSending(uint32_t aTotalMessageCount)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgOfflineManager::OnMessageStartSending(uint32_t aCurrentMessage,
@@ -380,17 +380,17 @@ nsMsgOfflineManager::OnMessageSendError(
                                         nsresult aStatus,
                                         const char16_t *aMsg)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgOfflineManager::OnStopSending(nsresult aStatus,
-                                   const char16_t *aMsg, uint32_t aTotalTried, 
+                                   const char16_t *aMsg, uint32_t aTotalTried,
                                    uint32_t aSuccessful)
 {
 #ifdef NS_DEBUG
   if (NS_SUCCEEDED(aStatus))
     printf("SendLaterListener::OnStopSending: Tried to send %d messages. %d successful.\n",
             aTotalTried, aSuccessful);
 #endif
   return AdvanceToNextState(aStatus);
--- a/mailnews/base/src/nsMsgOfflineManager.h
+++ b/mailnews/base/src/nsMsgOfflineManager.h
@@ -21,38 +21,38 @@ class nsMsgOfflineManager
       public nsIObserver,
       public nsSupportsWeakReference,
       public nsIMsgSendLaterListener,
     public nsIUrlListener
 {
 public:
 
   nsMsgOfflineManager();
-  
+
   NS_DECL_THREADSAFE_ISUPPORTS
- 
+
   /* nsIMsgOfflineManager methods */
-  
+
   NS_DECL_NSIMSGOFFLINEMANAGER
-  NS_DECL_NSIOBSERVER  
+  NS_DECL_NSIOBSERVER
   NS_DECL_NSIURLLISTENER
   NS_DECL_NSIMSGSENDLATERLISTENER
 
-  typedef enum 
+  typedef enum
   {
     eStarting = 0,
 	  eSynchronizingOfflineImapChanges = 1,
     eDownloadingNews = 2,
     eDownloadingMail = 3,
 	  eSendingUnsent = 4,
     eDone = 5,
     eNoState = 6  // we're not doing anything
   } offlineManagerState;
 
-  typedef enum 
+  typedef enum
   {
     eGoingOnline = 0,
     eDownloadingForOffline = 1,
     eNoOp = 2 // no operation in progress
   } offlineManagerOperation;
 
 private:
   virtual ~nsMsgOfflineManager();
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -55,42 +55,42 @@ nsMsgPrintEngine::nsMsgPrintEngine() :
 
 
 nsMsgPrintEngine::~nsMsgPrintEngine()
 {
 }
 
 // Implement AddRef and Release
 NS_IMPL_ISUPPORTS(nsMsgPrintEngine,
-                         nsIMsgPrintEngine, 
-                         nsIWebProgressListener, 
+                         nsIMsgPrintEngine,
+                         nsIWebProgressListener,
                          nsIObserver,
                          nsISupportsWeakReference)
 
 // nsIWebProgressListener implementation
 NS_IMETHODIMP
-nsMsgPrintEngine::OnStateChange(nsIWebProgress* aWebProgress, 
-                   nsIRequest *aRequest, 
-                   uint32_t progressStateFlags, 
+nsMsgPrintEngine::OnStateChange(nsIWebProgress* aWebProgress,
+                   nsIRequest *aRequest,
+                   uint32_t progressStateFlags,
                    nsresult aStatus)
 {
   nsresult rv = NS_OK;
 
   // top-level document load data
   if (progressStateFlags & nsIWebProgressListener::STATE_IS_DOCUMENT) {
     if (progressStateFlags & nsIWebProgressListener::STATE_START) {
       // Tell the user we are loading...
       nsString msg;
       GetString(u"LoadingMessageToPrint", msg);
       SetStatusMessage(msg);
     }
 
     if (progressStateFlags & nsIWebProgressListener::STATE_STOP) {
       nsCOMPtr<nsIDocumentLoader> docLoader(do_QueryInterface(aWebProgress));
-      if (docLoader) 
+      if (docLoader)
       {
         // Check to see if the document DOMWin that is finished loading is the same
         // one as the mail msg that we started to load.
         // We only want to print when the entire msg and all of its attachments
         // have finished loading.
         // The mail msg doc is the last one to receive the STATE_STOP notification
         nsCOMPtr<nsISupports> container;
         docLoader->GetContainer(getter_AddRefs(container));
@@ -109,63 +109,63 @@ nsMsgPrintEngine::OnStateChange(nsIWebPr
 
       bool isPrintingCancelled = false;
       if (mPrintSettings)
       {
         mPrintSettings->GetIsCancelled(&isPrintingCancelled);
       }
       if (!isPrintingCancelled) {
         // if aWebProgress is a documentloader than the notification from
-        // loading the documents. If it is NULL (or not a DocLoader) then it 
+        // loading the documents. If it is NULL (or not a DocLoader) then it
         // it coming from Printing
         if (docLoader) {
           // Now, fire off the print operation!
           rv = NS_ERROR_FAILURE;
 
           // Tell the user the message is loaded...
           nsString msg;
           GetString(u"MessageLoaded", msg);
           SetStatusMessage(msg);
 
           NS_ASSERTION(mDocShell,"can't print, there is no docshell");
-          if ( (!mDocShell) || (!aRequest) ) 
+          if ( (!mDocShell) || (!aRequest) )
           {
             return StartNextPrintOperation();
           }
           nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(aRequest);
           if (!aChannel) return NS_ERROR_FAILURE;
 
           // Make sure this isn't just "about:blank" finishing....
           nsCOMPtr<nsIURI> originalURI = nullptr;
           if (NS_SUCCEEDED(aChannel->GetOriginalURI(getter_AddRefs(originalURI))) && originalURI)
           {
             nsAutoCString spec;
 
             if (NS_SUCCEEDED(originalURI->GetSpec(spec)))
-            {      
+            {
               if (spec.Equals("about:blank"))
               {
                 return StartNextPrintOperation();
               }
             }
           }
 
           // If something bad happens here (menaing we can fire the PLEvent, highly unlikely)
-          // we will still ask the msg to print, but if the user "cancels" out of the 
+          // we will still ask the msg to print, but if the user "cancels" out of the
           // print dialog the hidden print window will not be "closed"
-          if (!FirePrintEvent()) 
+          if (!FirePrintEvent())
           {
             PrintMsgWindow();
           }
         } else {
           FireStartNextEvent();
           rv = NS_OK;
         }
-      } 
-      else 
+      }
+      else
       {
         if (mWindow) {
           nsPIDOMWindowOuter::From(mWindow)->Close();
         }
       }
     }
   }
 
@@ -200,25 +200,25 @@ nsMsgPrintEngine::OnStatusChange(nsIWebP
                     nsresult aStatus,
                     const char16_t* aMessage)
 {
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
-nsMsgPrintEngine::OnSecurityChange(nsIWebProgress *aWebProgress, 
-                      nsIRequest *aRequest, 
+nsMsgPrintEngine::OnSecurityChange(nsIWebProgress *aWebProgress,
+                      nsIRequest *aRequest,
                       uint32_t state)
 {
     NS_NOTREACHED("notification excluded in AddProgressListener(...)");
     return NS_OK;
 }
 
-NS_IMETHODIMP    
+NS_IMETHODIMP
 nsMsgPrintEngine::SetWindow(mozIDOMWindowProxy *aWin)
 {
   if (!aWin)
   {
     // It isn't an error to pass in null for aWin, in fact it means we are shutting
     // down and we should start cleaning things up...
     return NS_OK;
   }
@@ -268,17 +268,17 @@ nsMsgPrintEngine::ShowWindow(bool aShow)
   nsCOMPtr<nsPIDOMWindowOuter> window = nsPIDOMWindowOuter::From(mWindow);
   nsCOMPtr <nsIDocShellTreeItem> treeItem =
     do_QueryInterface(window->GetDocShell(), &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr <nsIDocShellTreeOwner> treeOwner;
   rv = treeItem->GetTreeOwner(getter_AddRefs(treeOwner));
   NS_ENSURE_SUCCESS(rv,rv);
-  
+
   if (treeOwner) {
     // disable (enable) the window
     nsCOMPtr<nsIBaseWindow> baseWindow;
     baseWindow = do_QueryInterface(treeOwner, &rv);
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = baseWindow->SetEnabled(aShow);
     NS_ENSURE_SUCCESS(rv,rv);
@@ -307,84 +307,84 @@ nsMsgPrintEngine::SetPrintURICount(int32
 
 NS_IMETHODIMP
 nsMsgPrintEngine::StartPrintOperation(nsIPrintSettings* aPS)
 {
   NS_ENSURE_ARG_POINTER(aPS);
   mPrintSettings = aPS;
 
   // Load the about:blank on the tail end...
-  nsresult rv = AddPrintURI(u"about:blank"); 
-  if (NS_FAILED(rv)) return rv; 
+  nsresult rv = AddPrintURI(u"about:blank");
+  if (NS_FAILED(rv)) return rv;
   return StartNextPrintOperation();
 }
 
 //----------------------------------------------------------------------
 // Set up to use the "pluggable" Print Progress Dialog
 nsresult
 nsMsgPrintEngine::ShowProgressDialog(bool aIsForPrinting, bool& aDoNotify)
 {
   nsresult rv;
 
   // default to not notifying, that if something here goes wrong
-  // or we aren't going to show the progress dialog we can straight into 
+  // or we aren't going to show the progress dialog we can straight into
   // reflowing the doc for printing.
   aDoNotify = false;
 
   // Assume we can't do progress and then see if we can
   bool showProgressDialog = false;
 
   // if it is already being shown then don't bother to find out if it should be
   // so skip this and leave mShowProgressDialog set to FALSE
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
-  if (NS_SUCCEEDED(rv)) 
+  if (NS_SUCCEEDED(rv))
   {
     prefBranch->GetBoolPref("print.show_print_progress", &showProgressDialog);
   }
 
   // Turning off the showing of Print Progress in Prefs overrides
-  // whether the calling PS desire to have it on or off, so only check PS if 
+  // whether the calling PS desire to have it on or off, so only check PS if
   // prefs says it's ok to be on.
-  if (showProgressDialog) 
+  if (showProgressDialog)
   {
     mPrintSettings->GetShowPrintProgress(&showProgressDialog);
   }
 
   // Now open the service to get the progress dialog
   // If we don't get a service, that's ok, then just don't show progress
   if (showProgressDialog) {
-    if (!mPrintPromptService) 
+    if (!mPrintPromptService)
     {
       mPrintPromptService = do_GetService(kPrintingPromptService);
     }
-    if (mPrintPromptService) 
+    if (mPrintPromptService)
     {
       nsCOMPtr<mozIDOMWindowProxy> domWin(do_QueryInterface(mParentWindow));
-      if (!domWin) 
+      if (!domWin)
       {
         domWin = mWindow;
       }
 
       rv = mPrintPromptService->ShowProgress(domWin, mWebBrowserPrint, mPrintSettings, this, aIsForPrinting,
-                                            getter_AddRefs(mPrintProgressListener), 
-                                            getter_AddRefs(mPrintProgressParams), 
+                                            getter_AddRefs(mPrintProgressListener),
+                                            getter_AddRefs(mPrintProgressParams),
                                             &aDoNotify);
       if (NS_SUCCEEDED(rv)) {
 
         showProgressDialog = mPrintProgressListener != nullptr && mPrintProgressParams != nullptr;
 
-        if (showProgressDialog) 
+        if (showProgressDialog)
         {
           nsString msg;
           if (mIsDoingPrintPreview) {
             GetString(u"LoadingMailMsgForPrintPreview", msg);
           } else {
             GetString(u"LoadingMailMsgForPrint", msg);
           }
-          if (!msg.IsEmpty()) 
+          if (!msg.IsEmpty())
             mPrintProgressParams->SetDocTitle(msg.get());
         }
       }
     }
   }
   return rv;
 }
 
@@ -420,71 +420,71 @@ nsMsgPrintEngine::StartNextPrintOperatio
   const nsString &uri = mURIArray[mCurrentlyPrintingURI];
   rv = FireThatLoadOperationStartup(uri);
   if (NS_FAILED(rv))
     return StartNextPrintOperation();
   else
     return rv;
 }
 
-NS_IMETHODIMP    
+NS_IMETHODIMP
 nsMsgPrintEngine::SetStatusFeedback(nsIMsgStatusFeedback *aFeedback)
 {
 	mFeedback = aFeedback;
 	return NS_OK;
 }
 
 #define DATA_URL_PREFIX     "data:"
 #define ADDBOOK_URL_PREFIX     "addbook:"
 
 nsresult
 nsMsgPrintEngine::FireThatLoadOperationStartup(const nsString& uri)
 {
-  if (!uri.IsEmpty()) 
+  if (!uri.IsEmpty())
     mLoadURI = uri;
   else
     mLoadURI.Truncate();
 
   bool     notify = false;
   nsresult rv     = NS_ERROR_FAILURE;
   // Don't show dialog if we are out of URLs
   //if ( mCurrentlyPrintingURI < mURIArray.Length() && !mIsDoingPrintPreview)
   if ( mCurrentlyPrintingURI < (int32_t)mURIArray.Length())
     rv = ShowProgressDialog(!mIsDoingPrintPreview, notify);
-  if (NS_FAILED(rv) || !notify) 
+  if (NS_FAILED(rv) || !notify)
     return FireThatLoadOperation(uri);
   return NS_OK;
 }
 
 nsresult
 nsMsgPrintEngine::FireThatLoadOperation(const nsString& uri)
 {
   nsresult rv = NS_ERROR_FAILURE;
-  
+
   nsCString uriCStr;
   LossyCopyUTF16toASCII(uri, uriCStr);
 
   nsCOMPtr <nsIMsgMessageService> messageService;
-  // if this is a data: url, skip it, because 
+  // if this is a data: url, skip it, because
   // we've already got something we can print
   // and we know it is not a message.
   //
   // if this an about:blank url, skip it, because
   // ...
   //
   // if this is an addbook: url, skip it, because
   // we know that isn't a message.
   //
   // if this is a message part (or .eml file on disk)
   // skip it, because we don't want to print the parent message
   // we want to print the part.
   // example:  imap://sspitzer@nsmail-1:143/fetch%3EUID%3E/INBOX%3E180958?part=1.1.2&type=application/x-message-display&filename=test"
   if (!StringBeginsWith(uriCStr, NS_LITERAL_CSTRING(DATA_URL_PREFIX)) &&
       !StringBeginsWith(uriCStr, NS_LITERAL_CSTRING(ADDBOOK_URL_PREFIX)) &&
-      !uriCStr.EqualsLiteral("about:blank") && 
+      !uriCStr.EqualsLiteral("about:blank") &&
       uriCStr.Find(NS_LITERAL_CSTRING("type=application/x-message-display")) == -1) {
     rv = GetMessageServiceFromURI(uriCStr, getter_AddRefs(messageService));
   }
 
   if (NS_SUCCEEDED(rv) && messageService) {
     nsCOMPtr<nsIURI> dummyNull;
     rv = messageService->DisplayMessageForPrinting(uriCStr.get(), mDocShell, nullptr, nullptr,
                                                    getter_AddRefs(dummyNull));
@@ -503,45 +503,45 @@ nsMsgPrintEngine::FireThatLoadOperation(
   }
   return rv;
 }
 
 void
 nsMsgPrintEngine::InitializeDisplayCharset()
 {
   // libmime always converts to UTF-8 (both HTML and XML)
-  if (mDocShell) 
+  if (mDocShell)
   {
     nsCOMPtr<nsIContentViewer> cv;
     mDocShell->GetContentViewer(getter_AddRefs(cv));
-    if (cv) 
+    if (cv)
     {
       cv->SetForceCharacterSet(NS_LITERAL_CSTRING("UTF-8"));
     }
   }
 }
 
 void
 nsMsgPrintEngine::SetupObserver()
 {
   if (!mDocShell)
     return;
 
   if (mDocShell)
   {
     nsCOMPtr<nsIWebProgress> progress(do_GetInterface(mDocShell));
     NS_ASSERTION(progress, "we were expecting a nsIWebProgress");
-    if (progress) 
+    if (progress)
     {
       (void) progress->AddProgressListener((nsIWebProgressListener *)this,
                                         nsIWebProgress::NOTIFY_STATE_DOCUMENT);
     }
 
-    // Cache a pointer to the mail message's DOMWindow 
-    // so later we know when we can print when the 
+    // Cache a pointer to the mail message's DOMWindow
+    // so later we know when we can print when the
     // document "loaded" msgs com thru via the Progress listener
     mMsgDOMWin = do_GetInterface(mDocShell);
   }
 }
 
 nsresult
 nsMsgPrintEngine::SetStatusMessage(const nsString& aMsgString)
 {
@@ -558,17 +558,17 @@ void
 nsMsgPrintEngine::GetString(const char16_t *aStringName, nsString& outStr)
 {
   outStr.Truncate();
 
   if (!mStringBundle)
   {
     static const char propertyURL[] = MESSENGER_STRING_URL;
 
-    nsCOMPtr<nsIStringBundleService> sBundleService = 
+    nsCOMPtr<nsIStringBundleService> sBundleService =
       mozilla::services::GetStringBundleService();
     if (sBundleService)
       sBundleService->CreateBundle(propertyURL, getter_AddRefs(mStringBundle));
   }
 
   if (mStringBundle)
     mStringBundle->GetStringFromName(NS_ConvertUTF16toUTF8(aStringName).get(), outStr);
   return;
@@ -577,61 +577,61 @@ nsMsgPrintEngine::GetString(const char16
 //-----------------------------------------------------------
 void
 nsMsgPrintEngine::PrintMsgWindow()
 {
   const char* kMsgKeys[] = {"PrintingMessage",  "PrintPreviewMessage",
                             "PrintingContact",  "PrintPreviewContact",
                             "PrintingAddrBook", "PrintPreviewAddrBook"};
 
-  mDocShell->GetContentViewer(getter_AddRefs(mContentViewer));  
-  if (mContentViewer) 
+  mDocShell->GetContentViewer(getter_AddRefs(mContentViewer));
+  if (mContentViewer)
   {
     mWebBrowserPrint = do_QueryInterface(mContentViewer);
-    if (mWebBrowserPrint) 
+    if (mWebBrowserPrint)
     {
-      if (!mPrintSettings) 
+      if (!mPrintSettings)
       {
         mWebBrowserPrint->GetGlobalPrintSettings(getter_AddRefs(mPrintSettings));
       }
-      
+
       // fix for bug #118887 and bug #176016
       // don't show the actual url when printing mail messages or addressbook cards.
       // for mail, it can review the salt.  for addrbook, it's a data:// url, which
       // means nothing to the end user.
       // needs to be " " and not "" or nullptr, otherwise, we'll still print the url
       mPrintSettings->SetDocURL(u" ");
 
       nsresult rv = NS_ERROR_FAILURE;
-      if (mIsDoingPrintPreview) 
+      if (mIsDoingPrintPreview)
       {
         if (mStartupPPObs) {
           rv = mStartupPPObs->Observe(nullptr, nullptr, nullptr);
         }
-      } 
-      else 
+      }
+      else
       {
         mPrintSettings->SetPrintSilent(mCurrentlyPrintingURI != 0);
         rv = mWebBrowserPrint->Print(mPrintSettings, (nsIWebProgressListener *)this);
       }
 
       if (NS_FAILED(rv))
       {
         mWebBrowserPrint = nullptr;
         mContentViewer = nullptr;
         bool isPrintingCancelled = false;
         if (mPrintSettings)
         {
           mPrintSettings->GetIsCancelled(&isPrintingCancelled);
         }
-        if (!isPrintingCancelled) 
+        if (!isPrintingCancelled)
         {
           StartNextPrintOperation();
-        } 
-        else 
+        }
+        else
         {
           if (mWindow) {
             nsPIDOMWindowOuter::From(mWindow)->Close();
           }
         }
       }
       else
       {
@@ -653,17 +653,17 @@ class nsPrintMsgWindowEvent : public moz
 {
 public:
   nsPrintMsgWindowEvent(nsMsgPrintEngine *mpe)
     : mozilla::Runnable("nsPrintMsgWindowEvent"), mMsgPrintEngine(mpe)
   {}
 
   NS_IMETHOD Run()
   {
-    if (mMsgPrintEngine) 
+    if (mMsgPrintEngine)
       mMsgPrintEngine->PrintMsgWindow();
     return NS_OK;
   }
 
 private:
   RefPtr<nsMsgPrintEngine> mMsgPrintEngine;
 };
 
@@ -672,17 +672,17 @@ class nsStartNextPrintOpEvent : public m
 {
 public:
   nsStartNextPrintOpEvent(nsMsgPrintEngine *mpe)
     : mozilla::Runnable("nsStartNextPrintOpEvent"), mMsgPrintEngine(mpe)
   {}
 
   NS_IMETHOD Run()
   {
-    if (mMsgPrintEngine) 
+    if (mMsgPrintEngine)
       mMsgPrintEngine->StartNextPrintOperation();
     return NS_OK;
   }
 
 private:
   RefPtr<nsMsgPrintEngine> mMsgPrintEngine;
 };
 
@@ -720,17 +720,17 @@ NS_IMETHODIMP nsMsgPrintEngine::SetDoPri
 {
   mIsDoingPrintPreview = aDoPrintPreview;
   return NS_OK;
 }
 
 /* void setMsgType (in long aMsgType); */
 NS_IMETHODIMP nsMsgPrintEngine::SetMsgType(int32_t aMsgType)
 {
-  if (mMsgInx >= nsIMsgPrintEngine::MNAB_START && mMsgInx < nsIMsgPrintEngine::MNAB_END) 
+  if (mMsgInx >= nsIMsgPrintEngine::MNAB_START && mMsgInx < nsIMsgPrintEngine::MNAB_END)
   {
     mMsgInx = aMsgType;
     return NS_OK;
   }
   return NS_ERROR_FAILURE;
 }
 
 /*=============== nsIObserver Interface ======================*/
--- a/mailnews/base/src/nsMsgPrintEngine.h
+++ b/mailnews/base/src/nsMsgPrintEngine.h
@@ -77,15 +77,15 @@ protected:
   nsCOMPtr<nsIWebBrowserPrint> mWebBrowserPrint;
   nsCOMPtr<nsIPrintSettings>   mPrintSettings;
   nsCOMPtr<mozIDOMWindowProxy> mMsgDOMWin;
   bool                         mIsDoingPrintPreview;
   nsCOMPtr<nsIObserver>        mStartupPPObs;
   int32_t                      mMsgInx;
 
   // Progress Dialog
-  
+
   nsCOMPtr<nsIPrintingPromptService> mPrintPromptService;
   nsCOMPtr<nsIWebProgressListener> mPrintProgressListener;
   nsCOMPtr<nsIPrintProgress>       mPrintProgress;
   nsCOMPtr<nsIPrintProgressParams> mPrintProgressParams;
   nsString                         mLoadURI;
 };
--- a/mailnews/base/src/nsMsgProgress.h
+++ b/mailnews/base/src/nsMsgProgress.h
@@ -12,34 +12,34 @@
 #include "nsIDOMWindow.h"
 #include "nsIMsgStatusFeedback.h"
 #include "nsString.h"
 #include "nsIMsgWindow.h"
 #include "nsIProgressEventSink.h"
 #include "nsIStringBundle.h"
 #include "nsWeakReference.h"
 
-class nsMsgProgress : public nsIMsgProgress, 
-                      public nsIMsgStatusFeedback, 
+class nsMsgProgress : public nsIMsgProgress,
+                      public nsIMsgStatusFeedback,
                       public nsIProgressEventSink,
                       public nsSupportsWeakReference
 {
-public: 
+public:
   nsMsgProgress();
-  
+
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMSGPROGRESS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIMSGSTATUSFEEDBACK
   NS_DECL_NSIPROGRESSEVENTSINK
 
 private:
   virtual ~nsMsgProgress();
   nsresult ReleaseListeners(void);
-  
+
   bool                               m_closeProgress;
   bool                               m_processCanceled;
   nsString                           m_pendingStatus;
   int32_t                            m_pendingStateFlags;
   nsresult                           m_pendingStateValue;
   nsWeakPtr                          m_msgWindow;
   nsCOMArray<nsIWebProgressListener> m_listenerList;
 };
--- a/mailnews/base/src/nsMsgPurgeService.h
+++ b/mailnews/base/src/nsMsgPurgeService.h
@@ -17,17 +17,17 @@
 #include "nsIMsgFolderCacheElement.h"
 #include "nsIMutableArray.h"
 
 class nsMsgPurgeService
 	: public nsIMsgPurgeService,
 		public nsIMsgSearchNotify
 {
 public:
-	nsMsgPurgeService(); 
+	nsMsgPurgeService();
 
 	NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGPURGESERVICE
 	NS_DECL_NSIMSGSEARCHNOTIFY
 
 	nsresult PerformPurge();
 
 protected:
--- a/mailnews/base/src/nsMsgQuickSearchDBView.cpp
+++ b/mailnews/base/src/nsMsgQuickSearchDBView.cpp
@@ -67,19 +67,19 @@ nsMsgQuickSearchDBView::CopyDBView(nsMsg
 
   // now copy all of our private member data
   newMsgDBView->m_origKeys = m_origKeys;
   return NS_OK;
 }
 
 nsresult nsMsgQuickSearchDBView::DeleteMessages(nsIMsgWindow *window, nsMsgViewIndex *indices, int32_t numIndices, bool deleteStorage)
 {
-  for (nsMsgViewIndex i = 0; i < (nsMsgViewIndex) numIndices; i++) 
+  for (nsMsgViewIndex i = 0; i < (nsMsgViewIndex) numIndices; i++)
   {
-    nsCOMPtr<nsIMsgDBHdr> msgHdr; 
+    nsCOMPtr<nsIMsgDBHdr> msgHdr;
     (void) GetMsgHdrForViewIndex(indices[i],getter_AddRefs(msgHdr));
     if (msgHdr)
       RememberDeletedMsgHdr(msgHdr);
   }
 
   return nsMsgDBView::DeleteMessages(window, indices, numIndices, deleteStorage);
 }
 
@@ -88,38 +88,38 @@ NS_IMETHODIMP nsMsgQuickSearchDBView::Do
   if (aCommand == nsMsgViewCommandType::markAllRead)
   {
     nsresult rv = NS_OK;
     m_folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, false);
 
     for (uint32_t i = 0; NS_SUCCEEDED(rv) && i < GetSize(); i++)
     {
       nsCOMPtr<nsIMsgDBHdr> msgHdr;
-      m_db->GetMsgHdrForKey(m_keys[i],getter_AddRefs(msgHdr)); 
+      m_db->GetMsgHdrForKey(m_keys[i],getter_AddRefs(msgHdr));
       rv = m_db->MarkHdrRead(msgHdr, true, nullptr);
     }
 
     m_folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, true);
 
     nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_folder);
     if (NS_SUCCEEDED(rv) && imapFolder)
-      rv = imapFolder->StoreImapFlags(kImapMsgSeenFlag, true, m_keys.Elements(), 
+      rv = imapFolder->StoreImapFlags(kImapMsgSeenFlag, true, m_keys.Elements(),
                                       m_keys.Length(), nullptr);
 
     m_db->SetSummaryValid(true);
     return rv;
   }
   else
     return nsMsgDBView::DoCommand(aCommand);
 }
 
 NS_IMETHODIMP nsMsgQuickSearchDBView::GetViewType(nsMsgViewTypeValue *aViewType)
 {
     NS_ENSURE_ARG_POINTER(aViewType);
-    *aViewType = nsMsgViewType::eShowQuickSearchResults; 
+    *aViewType = nsMsgViewType::eShowQuickSearchResults;
     return NS_OK;
 }
 
 nsresult nsMsgQuickSearchDBView::AddHdr(nsIMsgDBHdr *msgHdr, nsMsgViewIndex *resultIndex)
 {
   nsMsgKey msgKey;
   msgHdr->GetMessageKey(&msgKey);
   // protect against duplication.
@@ -158,28 +158,28 @@ nsresult nsMsgQuickSearchDBView::OnNewHe
                       nsMsgViewSortOrder::ascending, nsMsgViewSortType::byId);
       m_origKeys.InsertElementAt(insertIndex, newKey);
       nsMsgThreadedDBView::OnNewHeader(newHdr, aParentKey, ensureListed); // do not add a new message if there isn't a match.
     }
   }
   return NS_OK;
 }
 
-NS_IMETHODIMP nsMsgQuickSearchDBView::OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags, 
+NS_IMETHODIMP nsMsgQuickSearchDBView::OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags,
                                        uint32_t aNewFlags, nsIDBChangeListener *aInstigator)
 {
   nsresult rv = nsMsgGroupView::OnHdrFlagsChanged(aHdrChanged, aOldFlags, aNewFlags, aInstigator);
 
   if (m_viewFolder &&
       (m_viewFolder != m_folder) &&
       (aOldFlags & nsMsgMessageFlags::Read) != (aNewFlags & nsMsgMessageFlags::Read))
   {
     // if we're displaying a single folder virtual folder for an imap folder,
     // the search criteria might be on message body, and we might not have the
-    // message body offline, in which case we can't tell if the message 
+    // message body offline, in which case we can't tell if the message
     // matched or not. But if the unread flag changed, we need to update the
     // unread counts. Normally, VirtualFolderChangeListener::OnHdrFlagsChanged will
     // handle this, but it won't work for body criteria when we don't have the
     // body offline.
     nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_viewFolder);
     if (imapFolder)
     {
       nsMsgViewIndex hdrIndex = FindHdr(aHdrChanged);
@@ -187,17 +187,17 @@ NS_IMETHODIMP nsMsgQuickSearchDBView::On
       {
         nsCOMPtr <nsIMsgSearchSession> searchSession = do_QueryReferent(m_searchSession);
         if (searchSession)
         {
           bool oldMatch, newMatch;
           rv = searchSession->MatchHdr(aHdrChanged, m_db, &newMatch);
           aHdrChanged->SetFlags(aOldFlags);
           rv = searchSession->MatchHdr(aHdrChanged, m_db, &oldMatch);
-          aHdrChanged->SetFlags(aNewFlags); 
+          aHdrChanged->SetFlags(aNewFlags);
           // if it doesn't match the criteria, VirtualFolderChangeListener::OnHdrFlagsChanged
           // won't tweak the read/unread counts. So do it here:
           if (!oldMatch && !newMatch)
           {
             nsCOMPtr <nsIMsgDatabase> virtDatabase;
             nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
 
             rv = m_viewFolder->GetDBFolderInfoAndDB(getter_AddRefs(dbFolderInfo), getter_AddRefs(virtDatabase));
@@ -283,17 +283,17 @@ nsMsgQuickSearchDBView::OnSearchHit(nsIM
   // remember search hit and when search is done, reconcile cache
   // with new hits;
   m_hdrHits.AppendObject(aMsgHdr);
   nsMsgKey key;
   aMsgHdr->GetMessageKey(&key);
   // Is FindKey going to be expensive here? A lot of hits could make
   // it a little bit slow to search through the view for every hit.
   if (m_cacheEmpty || FindKey(key, false) == nsMsgViewIndex_None)
-    return AddHdr(aMsgHdr); 
+    return AddHdr(aMsgHdr);
   else
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgQuickSearchDBView::OnSearchDone(nsresult status)
 {
   // We're a single-folder virtual folder if viewFolder != folder, and that is
@@ -346,17 +346,17 @@ nsMsgQuickSearchDBView::OnSearchDone(nsr
     }
     dbFolderInfo->SetNumUnreadMessages(numUnread);
     dbFolderInfo->SetNumMessages(numTotal);
     m_viewFolder->UpdateSummaryTotals(true); // force update from db.
     virtDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
   }
   if (m_sortType != nsMsgViewSortType::byThread)//we do not find levels for the results.
   {
-    m_sortValid = false;       //sort the results 
+    m_sortValid = false;       //sort the results
     Sort(m_sortType, m_sortOrder);
   }
   if (m_viewFolder && (m_viewFolder != m_folder))
     SetMRUTimeForFolder(m_viewFolder);
 
   return NS_OK;
 }
 
@@ -371,17 +371,17 @@ nsMsgQuickSearchDBView::OnNewSearch()
   m_flags.Clear();
   m_hdrHits.Clear();
   // this needs to happen after we remove all the keys, since RowCountChanged() will call our GetRowCount()
   if (mTree)
     mTree->RowCountChanged(0, -oldSize);
   uint32_t folderFlags = 0;
   if (m_viewFolder)
     m_viewFolder->GetFlags(&folderFlags);
-  // check if it's a virtual folder - if so, we should get the cached hits 
+  // check if it's a virtual folder - if so, we should get the cached hits
   // from the db, and set a flag saying that we're using cached values.
   if (folderFlags & nsMsgFolderFlags::Virtual)
   {
     nsCOMPtr<nsISimpleEnumerator> cachedHits;
     nsCString searchUri;
     m_viewFolder->GetURI(searchUri);
     m_db->GetCachedHits(searchUri.get(), getter_AddRefs(cachedHits));
     if (cachedHits)
@@ -474,26 +474,26 @@ nsresult nsMsgQuickSearchDBView::GetFirs
         {
           minLevel = level;
           retHdr = child;
         }
       }
     }
   }
   retHdr.forget(result);
-  return NS_OK; 
+  return NS_OK;
 }
 
 nsresult nsMsgQuickSearchDBView::SortThreads(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder)
 {
   // don't need to sort by threads for group view.
   if (m_viewFlags & nsMsgViewFlagsType::kGroupBySort)
     return NS_OK;
   // iterate over the messages in the view, getting the thread id's
-  // sort m_keys so we can quickly find if a key is in the view. 
+  // sort m_keys so we can quickly find if a key is in the view.
   m_keys.Sort();
   // array of the threads' root hdr keys.
   nsTArray<nsMsgKey> threadRootIds;
   nsCOMPtr <nsIMsgDBHdr> rootHdr;
   nsCOMPtr <nsIMsgDBHdr> msgHdr;
   nsCOMPtr <nsIMsgThread> threadHdr;
   for (uint32_t i = 0; i < m_keys.Length(); i++)
   {
@@ -571,17 +571,17 @@ nsresult nsMsgQuickSearchDBView::SortThr
 
   return NS_OK;
 }
 
 nsresult
 nsMsgQuickSearchDBView::ListCollapsedChildren(nsMsgViewIndex viewIndex,
                                               nsIMutableArray *messageArray)
 {
-  nsCOMPtr<nsIMsgThread> threadHdr; 
+  nsCOMPtr<nsIMsgThread> threadHdr;
   nsresult rv = GetThreadContainingIndex(viewIndex, getter_AddRefs(threadHdr));
   NS_ENSURE_SUCCESS(rv, rv);
   uint32_t numChildren;
   threadHdr->GetNumChildren(&numChildren);
   nsCOMPtr<nsIMsgDBHdr> rootHdr;
   nsMsgKey rootKey;
   GetMsgHdrForViewIndex(viewIndex, getter_AddRefs(rootHdr));
   rootHdr->GetMessageKey(&rootKey);
@@ -642,17 +642,17 @@ nsresult nsMsgQuickSearchDBView::ListIds
       if (msgKey != rootKey || (GroupViewUsesDummyRow() && rootKeySkipped))
       {
         nsMsgViewIndex threadRootIndex = m_origKeys.BinaryIndexOf(msgKey);
         // if this hdr is in the original view, add it to new view.
         if (threadRootIndex != nsMsgViewIndex_None)
         {
           uint32_t childFlags;
           msgHdr->GetFlags(&childFlags);
-          InsertMsgHdrAt(viewIndex, msgHdr, msgKey, childFlags, 
+          InsertMsgHdrAt(viewIndex, msgHdr, msgKey, childFlags,
                         FindLevelInThread(msgHdr, startOfThreadViewIndex, viewIndex));
           if (! (rootFlags & MSG_VIEW_FLAG_HASCHILDREN))
             m_flags[startOfThreadViewIndex] = rootFlags | MSG_VIEW_FLAG_HASCHILDREN;
 
           viewIndex++;
           (*pNumListed)++;
         }
       }
@@ -671,17 +671,17 @@ nsMsgQuickSearchDBView::ListIdsInThreadO
                                              uint32_t callLevel,
                                              nsMsgKey keyToSkip,
                                              nsMsgViewIndex *viewIndex,
                                              uint32_t *pNumListed)
 {
   nsCOMPtr <nsISimpleEnumerator> msgEnumerator;
   nsresult rv = threadHdr->EnumerateMessages(parentKey, getter_AddRefs(msgEnumerator));
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   // We use the numChildren as a sanity check on the thread structure.
   uint32_t numChildren;
   (void) threadHdr->GetNumChildren(&numChildren);
   bool hasMore;
   nsCOMPtr <nsISupports> supports;
   nsCOMPtr <nsIMsgDBHdr> msgHdr;
   while (NS_SUCCEEDED(rv) && NS_SUCCEEDED(rv = msgEnumerator->HasMoreElements(&hasMore)) &&
          hasMore)
@@ -761,17 +761,17 @@ nsresult nsMsgQuickSearchDBView::Expansi
   if (index >= ((nsMsgViewIndex) m_keys.Length()))
     return NS_MSG_MESSAGE_NOT_FOUND;
 
   char flags = m_flags[index];
 
   if (!(m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay))
     return NS_OK;
 
-  nsCOMPtr<nsIMsgThread> threadHdr; 
+  nsCOMPtr<nsIMsgThread> threadHdr;
   nsresult rv = GetThreadContainingIndex(index, getter_AddRefs(threadHdr));
   NS_ENSURE_SUCCESS(rv, rv);
   uint32_t numChildren;
   threadHdr->GetNumChildren(&numChildren);
   nsCOMPtr<nsIMsgDBHdr> rootHdr;
   nsMsgKey rootKey;
   GetMsgHdrForViewIndex(index, getter_AddRefs(rootHdr));
   rootHdr->GetMessageKey(&rootKey);
@@ -797,42 +797,42 @@ nsresult nsMsgQuickSearchDBView::Expansi
       }
     }
   }
   if (! (flags & nsMsgMessageFlags::Elided))
     *expansionDelta = - (*expansionDelta);
   return NS_OK;
 }
 
-NS_IMETHODIMP 
-nsMsgQuickSearchDBView::OpenWithHdrs(nsISimpleEnumerator *aHeaders, 
+NS_IMETHODIMP
+nsMsgQuickSearchDBView::OpenWithHdrs(nsISimpleEnumerator *aHeaders,
                                      nsMsgViewSortTypeValue aSortType,
-                                     nsMsgViewSortOrderValue aSortOrder, 
+                                     nsMsgViewSortOrderValue aSortOrder,
                                      nsMsgViewFlagsTypeValue aViewFlags,
                                      int32_t *aCount)
 {
   if (aViewFlags & nsMsgViewFlagsType::kGroupBySort)
-    return nsMsgGroupView::OpenWithHdrs(aHeaders, aSortType, aSortOrder, 
+    return nsMsgGroupView::OpenWithHdrs(aHeaders, aSortType, aSortOrder,
                                         aViewFlags, aCount);
 
   m_sortType = aSortType;
   m_sortOrder = aSortOrder;
   m_viewFlags = aViewFlags;
 
   bool hasMore;
   nsCOMPtr<nsISupports> supports;
   nsCOMPtr<nsIMsgDBHdr> msgHdr;
   nsresult rv = NS_OK;
   while (NS_SUCCEEDED(rv = aHeaders->HasMoreElements(&hasMore)) && hasMore)
   {
     rv = aHeaders->GetNext(getter_AddRefs(supports));
     if (NS_SUCCEEDED(rv) && supports)
     {
       msgHdr = do_QueryInterface(supports);
-      AddHdr(msgHdr); 
+      AddHdr(msgHdr);
     }
     else
       break;
   }
   *aCount = m_keys.Length();
   return rv;
 }
 
@@ -843,17 +843,17 @@ NS_IMETHODIMP nsMsgQuickSearchDBView::Se
   if ((m_viewFlags & nsMsgViewFlagsType::kGroupBySort) ^
       (aViewFlags & nsMsgViewFlagsType::kGroupBySort))
     rv = RebuildView(aViewFlags);
   nsMsgDBView::SetViewFlags(aViewFlags);
 
   return rv;
 }
 
-nsresult 
+nsresult
 nsMsgQuickSearchDBView::GetMessageEnumerator(nsISimpleEnumerator **enumerator)
 {
   return GetViewEnumerator(enumerator);
 }
 
 NS_IMETHODIMP
 nsMsgQuickSearchDBView::OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted,
                                      nsMsgKey aParentKey,
--- a/mailnews/base/src/nsMsgQuickSearchDBView.h
+++ b/mailnews/base/src/nsMsgQuickSearchDBView.h
@@ -18,40 +18,40 @@ class nsMsgQuickSearchDBView : public ns
 {
 public:
   nsMsgQuickSearchDBView();
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIMSGSEARCHNOTIFY
 
   virtual const char * GetViewName(void) override {return "QuickSearchView"; }
-  NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, 
-                  nsMsgViewSortOrderValue sortOrder, 
+  NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType,
+                  nsMsgViewSortOrderValue sortOrder,
                   nsMsgViewFlagsTypeValue viewFlags, int32_t *pCount) override;
-  NS_IMETHOD OpenWithHdrs(nsISimpleEnumerator *aHeaders, 
-                          nsMsgViewSortTypeValue aSortType, 
-                          nsMsgViewSortOrderValue aSortOrder, 
-                          nsMsgViewFlagsTypeValue aViewFlags, 
+  NS_IMETHOD OpenWithHdrs(nsISimpleEnumerator *aHeaders,
+                          nsMsgViewSortTypeValue aSortType,
+                          nsMsgViewSortOrderValue aSortOrder,
+                          nsMsgViewFlagsTypeValue aViewFlags,
                           int32_t *aCount) override;
   NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance,
                          nsIMsgWindow *aMsgWindow,
                          nsIMsgDBViewCommandUpdater *aCommandUpdater,
                          nsIMsgDBView **_retval) override;
   NS_IMETHOD CopyDBView(nsMsgDBView *aNewMsgDBView,
                         nsIMessenger *aMessengerInstance,
                         nsIMsgWindow *aMsgWindow,
                         nsIMsgDBViewCommandUpdater *aCmdUpdater) override;
   NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue aCommand) override;
   NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
   NS_IMETHOD SetViewFlags(nsMsgViewFlagsTypeValue aViewFlags) override;
   NS_IMETHOD SetSearchSession(nsIMsgSearchSession *aSearchSession) override;
   NS_IMETHOD GetSearchSession(nsIMsgSearchSession* *aSearchSession) override;
-  NS_IMETHOD OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags, 
+  NS_IMETHOD OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags,
                                uint32_t aNewFlags, nsIDBChangeListener *aInstigator) override;
-  NS_IMETHOD OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, uint32_t *aStatus, 
+  NS_IMETHOD OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, uint32_t *aStatus,
                                   nsIDBChangeListener * aInstigator) override;
   NS_IMETHOD OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted, nsMsgKey aParentKey,
                           int32_t aFlags, nsIDBChangeListener *aInstigator) override;
   NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs) override;
 
 protected:
   virtual ~nsMsgQuickSearchDBView();
   nsWeakPtr m_searchSession;
--- a/mailnews/base/src/nsMsgRDFDataSource.h
+++ b/mailnews/base/src/nsMsgRDFDataSource.h
@@ -41,21 +41,21 @@ class nsMsgRDFDataSource : public nsIRDF
 
  protected:
   virtual ~nsMsgRDFDataSource();
   nsIRDFService *getRDFService();
   static bool assertEnumFunc(nsIRDFObserver *aObserver, void *aData);
   static bool unassertEnumFunc(nsIRDFObserver *aObserver, void *aData);
   static bool changeEnumFunc(nsIRDFObserver *aObserver, void *aData);
   nsresult  NotifyObservers(nsIRDFResource *subject, nsIRDFResource *property,
-                            nsIRDFNode *newObject, nsIRDFNode *oldObject, 
+                            nsIRDFNode *newObject, nsIRDFNode *oldObject,
                             bool assert, bool change);
 
-  virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource, 
-                    nsIRDFResource *propertyResource, nsIRDFNode *newNode, 
+  virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource,
+                    nsIRDFResource *propertyResource, nsIRDFNode *newNode,
                     nsIRDFNode *oldNode = nullptr);
 
   nsCOMPtr<nsIMsgWindow> mWindow;
 
   bool m_shuttingDown;
   bool mInitialized;
 
  private:
--- a/mailnews/base/src/nsMsgRDFUtils.cpp
+++ b/mailnews/base/src/nsMsgRDFUtils.cpp
@@ -13,68 +13,68 @@ nsresult createNode(const char16_t *str,
   nsresult rv;
   nsCOMPtr<nsIRDFLiteral> value;
 
   NS_ASSERTION(rdfService, "rdfService is null");
   if (!rdfService) return NS_OK;
 
   if (str) {
     rv = rdfService->GetLiteral(str, getter_AddRefs(value));
-  } 
+  }
   else {
     rv = rdfService->GetLiteral(EmptyString().get(), getter_AddRefs(value));
   }
 
   if (NS_SUCCEEDED(rv)) {
     value.forget(node);
   }
   return rv;
 }
 
 nsresult createIntNode(int32_t value, nsIRDFNode **node, nsIRDFService *rdfService)
 {
   *node = nullptr;
-  nsresult rv; 
-  if (!rdfService) return NS_ERROR_NULL_POINTER;  
+  nsresult rv;
+  if (!rdfService) return NS_ERROR_NULL_POINTER;
   nsCOMPtr<nsIRDFInt> num;
   rv = rdfService->GetIntLiteral(value, getter_AddRefs(num));
   if(NS_SUCCEEDED(rv)) {
     num.forget(node);
   }
   return rv;
 }
 
 nsresult createBlobNode(uint8_t *value, uint32_t &length, nsIRDFNode **node, nsIRDFService *rdfService)
 {
   NS_ENSURE_ARG_POINTER(node);
   NS_ENSURE_ARG_POINTER(rdfService);
-  
+
   *node = nullptr;
   nsCOMPtr<nsIRDFBlob> blob;
   nsresult rv = rdfService->GetBlobLiteral(value, length, getter_AddRefs(blob));
   NS_ENSURE_SUCCESS(rv,rv);
   blob.forget(node);
   return rv;
 }
 
 nsresult GetTargetHasAssertion(nsIRDFDataSource *dataSource, nsIRDFResource* folderResource,
                                nsIRDFResource *property,bool tv, nsIRDFNode *target,bool* hasAssertion)
 {
   NS_ENSURE_ARG_POINTER(hasAssertion);
-  
+
   nsCOMPtr<nsIRDFNode> currentTarget;
-  
+
   nsresult rv = dataSource->GetTarget(folderResource, property,tv, getter_AddRefs(currentTarget));
   if(NS_SUCCEEDED(rv))
   {
     nsCOMPtr<nsIRDFLiteral> value1(do_QueryInterface(target));
     nsCOMPtr<nsIRDFLiteral> value2(do_QueryInterface(currentTarget));
     if(value1 && value2)
       //If the two values are equal then it has this assertion
       *hasAssertion = (value1 == value2);
   }
   else
     rv = NS_NOINTERFACE;
-  
+
   return rv;
-  
+
 }
 
--- a/mailnews/base/src/nsMsgRDFUtils.h
+++ b/mailnews/base/src/nsMsgRDFUtils.h
@@ -92,13 +92,13 @@ typedef struct _nsMsgRDFNotification {
 nsresult createNode(const char16_t *str, nsIRDFNode **, nsIRDFService *rdfService);
 
 //Given an int32_t creates an nsIRDFNode that is really an int literal.
 nsresult createIntNode(int32_t value, nsIRDFNode **node, nsIRDFService *rdfService);
 
 //Given an nsIRDFBlob creates an nsIRDFNode that is really an blob literal.
 nsresult createBlobNode(uint8_t *value, uint32_t &length,  nsIRDFNode **node, nsIRDFService *rdfService);
 
-//s Assertion for a datasource that will just call GetTarget on property.  When all of our 
+//s Assertion for a datasource that will just call GetTarget on property.  When all of our
 //datasource derive from our datasource baseclass, this should be moved there and the first
 //parameter will no longer be needed.
 nsresult GetTargetHasAssertion(nsIRDFDataSource *dataSource, nsIRDFResource* folderResource,
 							   nsIRDFResource *property,bool tv, nsIRDFNode *target,bool* hasAssertion);
--- a/mailnews/base/src/nsMsgSearchDBView.h
+++ b/mailnews/base/src/nsMsgSearchDBView.h
@@ -24,38 +24,38 @@ public:
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIMSGSEARCHNOTIFY
   NS_DECL_NSIMSGCOPYSERVICELISTENER
 
   NS_IMETHOD SetSearchSession(nsIMsgSearchSession *aSearchSession) override;
 
   virtual const char *GetViewName(void) override { return "SearchView"; }
-  NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, 
+  NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder,
         nsMsgViewFlagsTypeValue viewFlags, int32_t *pCount) override;
   NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow,
                          nsIMsgDBViewCommandUpdater *aCmdUpdater, nsIMsgDBView **_retval) override;
-  NS_IMETHOD CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMessengerInstance, 
+  NS_IMETHOD CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMessengerInstance,
                         nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCmdUpdater) override;
   NS_IMETHOD Close() override;
   NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
   NS_IMETHOD Sort(nsMsgViewSortTypeValue sortType,
                   nsMsgViewSortOrderValue sortOrder) override;
   NS_IMETHOD GetCommandStatus(nsMsgViewCommandTypeValue command,
                               bool *selectable_p,
                               nsMsgViewCommandCheckStateValue *selected_p) override;
   NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue command) override;
   NS_IMETHOD DoCommandWithFolder(nsMsgViewCommandTypeValue command, nsIMsgFolder *destFolder) override;
   NS_IMETHOD GetHdrForFirstSelectedMessage(nsIMsgDBHdr **hdr) override;
-  NS_IMETHOD OpenWithHdrs(nsISimpleEnumerator *aHeaders, 
+  NS_IMETHOD OpenWithHdrs(nsISimpleEnumerator *aHeaders,
                           nsMsgViewSortTypeValue aSortType,
-                          nsMsgViewSortOrderValue aSortOrder, 
+                          nsMsgViewSortOrderValue aSortOrder,
                           nsMsgViewFlagsTypeValue aViewFlags,
                           int32_t *aCount) override;
-  NS_IMETHOD OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted, nsMsgKey aParentKey, 
+  NS_IMETHOD OnHdrDeleted(nsIMsgDBHdr *aHdrDeleted, nsMsgKey aParentKey,
                           int32_t aFlags, nsIDBChangeListener *aInstigator) override;
   NS_IMETHOD OnHdrFlagsChanged(nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags,
                                uint32_t aNewFlags, nsIDBChangeListener *aInstigator) override;
   NS_IMETHOD GetNumMsgsInView(int32_t *aNumMsgs) override;
   // override to get location
   NS_IMETHOD GetCellText(int32_t aRow, nsITreeColumn* aCol, nsAString& aValue) override;
   virtual nsresult GetMsgHdrForViewIndex(nsMsgViewIndex index, nsIMsgDBHdr **msgHdr) override;
   virtual nsresult OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey parentKey, bool ensureListed) override;
@@ -67,18 +67,18 @@ public:
   virtual nsresult GetFolderFromMsgURI(const char *aMsgURI, nsIMsgFolder **aFolder) override;
 
   NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **pThread) override;
 
 protected:
   virtual ~nsMsgSearchDBView();
   virtual void InternalClose() override;
   virtual nsresult HashHdr(nsIMsgDBHdr *msgHdr, nsString& aHashKey) override;
-  virtual nsresult ListIdsInThread(nsIMsgThread *threadHdr, 
-                                   nsMsgViewIndex startOfThreadViewIndex, 
+  virtual nsresult ListIdsInThread(nsIMsgThread *threadHdr,
+                                   nsMsgViewIndex startOfThreadViewIndex,
                                    uint32_t *pNumListed) override;
   nsresult FetchLocation(int32_t aRow, nsAString& aLocationString);
   virtual nsresult AddHdrFromFolder(nsIMsgDBHdr *msgHdr, nsIMsgFolder *folder);
   virtual nsresult GetDBForViewIndex(nsMsgViewIndex index, nsIMsgDatabase **db) override;
   virtual nsresult RemoveByIndex(nsMsgViewIndex index) override;
   virtual nsresult CopyMessages(nsIMsgWindow *window, nsMsgViewIndex *indices, int32_t numIndices, bool isMove, nsIMsgFolder *destFolder) override;
   virtual nsresult DeleteMessages(nsIMsgWindow *window, nsMsgViewIndex *indices, int32_t numIndices, bool deleteStorage) override;
   virtual void InsertMsgHdrAt(nsMsgViewIndex index, nsIMsgDBHdr *hdr,
@@ -94,17 +94,17 @@ protected:
   nsresult PartitionSelectionByFolder(nsMsgViewIndex *indices,
                                       int32_t numIndices,
                                       mozilla::UniquePtr<nsTArray<uint32_t>[]> &indexArrays,
                                       int32_t *numArrays);
 
   virtual nsresult ApplyCommandToIndicesWithFolder(nsMsgViewCommandTypeValue command, nsMsgViewIndex* indices,
                     int32_t numIndices, nsIMsgFolder *destFolder) override;
   void MoveThreadAt(nsMsgViewIndex threadIndex);
-  
+
   virtual nsresult GetMessageEnumerator(nsISimpleEnumerator **enumerator) override;
   virtual nsresult InsertHdrFromFolder(nsIMsgDBHdr *msgHdr, nsIMsgFolder *folder);
 
   nsCOMArray<nsIMsgFolder> m_folders;
   nsCOMArray<nsIMutableArray> m_hdrsForEachFolder;
   nsCOMArray<nsIMsgFolder> m_uniqueFoldersSelected;
   uint32_t mCurIndex;
 
@@ -117,17 +117,17 @@ protected:
 
   nsresult ProcessRequestsInOneFolder(nsIMsgWindow *window);
   nsresult ProcessRequestsInAllFolders(nsIMsgWindow *window);
   // these are for doing threading of the search hits
 
   // used for assigning thread id's to xfview threads.
   nsMsgKey m_nextThreadId;
   // this maps message-ids and reference message ids to
-  // the corresponding nsMsgXFViewThread object. If we're 
+  // the corresponding nsMsgXFViewThread object. If we're
   // doing subject threading, we would throw subjects
   // into the same table.
   nsInterfaceHashtable <nsCStringHashKey, nsIMsgThread> m_threadsTable;
 
   // map message-ids to msg hdrs in the view, used for threading.
   nsInterfaceHashtable <nsCStringHashKey, nsIMsgDBHdr> m_hdrsTable;
   uint32_t m_totalMessagesInView;
 
--- a/mailnews/base/src/nsMsgServiceProvider.cpp
+++ b/mailnews/base/src/nsMsgServiceProvider.cpp
@@ -33,17 +33,17 @@ nsMsgServiceProviderService::~nsMsgServi
 NS_IMPL_ISUPPORTS(nsMsgServiceProviderService, nsIRDFDataSource)
 
 nsresult
 nsMsgServiceProviderService::Init()
 {
   nsresult rv;
   nsCOMPtr<nsIRDFService> rdf = do_GetService(kRDFServiceCID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   mInnerDataSource = do_CreateInstance(kRDFCompositeDataSourceCID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   LoadISPFiles();
   return NS_OK;
 }
 
 /**
@@ -61,17 +61,17 @@ void nsMsgServiceProviderService::LoadIS
   nsCOMPtr<nsISimpleEnumerator> ispDirectories;
   rv = dirSvc->Get(ISP_DIRECTORY_LIST,
                    NS_GET_IID(nsISimpleEnumerator), getter_AddRefs(ispDirectories));
   if (NS_FAILED(rv))
     return;
 
   bool hasMore;
   nsCOMPtr<nsIFile> ispDirectory;
-  while (NS_SUCCEEDED(ispDirectories->HasMoreElements(&hasMore)) && hasMore) 
+  while (NS_SUCCEEDED(ispDirectories->HasMoreElements(&hasMore)) && hasMore)
   {
     nsCOMPtr<nsISupports> elem;
     ispDirectories->GetNext(getter_AddRefs(elem));
 
     ispDirectory = do_QueryInterface(elem);
     if (ispDirectory)
       LoadISPFilesFromDir(ispDirectory);
   }
@@ -121,17 +121,17 @@ nsMsgServiceProviderService::LoadDataSou
 
   nsCOMPtr<nsIRDFDataSource> ds =
       do_CreateInstance(kRDFXMLDataSourceCID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
 
   nsCOMPtr<nsIRDFRemoteDataSource> remote =
       do_QueryInterface(ds, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   rv = remote->Init(aURI);
   NS_ENSURE_SUCCESS(rv, rv);
   // for now load synchronously (async seems to be busted)
   rv = remote->Refresh(true);
   NS_ASSERTION(NS_SUCCEEDED(rv), "failed refresh?\n");
 
   rv = mInnerDataSource->AddDataSource(ds);
 
--- a/mailnews/base/src/nsMsgServiceProvider.h
+++ b/mailnews/base/src/nsMsgServiceProvider.h
@@ -13,20 +13,20 @@
 
 class nsMsgServiceProviderService : public nsIRDFDataSource
 {
 
  public:
   nsMsgServiceProviderService();
 
   nsresult Init();
-  
+
   NS_DECL_ISUPPORTS
   NS_FORWARD_NSIRDFDATASOURCE(mInnerDataSource->)
-  
+
  private:
   virtual ~nsMsgServiceProviderService();
 
   nsCOMPtr<nsIRDFCompositeDataSource> mInnerDataSource;
   nsresult LoadDataSource(const char *aURL);
 
   void LoadISPFilesFromDir(nsIFile* aDir);
   void LoadISPFiles();
--- a/mailnews/base/src/nsMsgSpecialViews.cpp
+++ b/mailnews/base/src/nsMsgSpecialViews.cpp
@@ -6,17 +6,17 @@
 #include "msgCore.h"
 #include "nsMsgSpecialViews.h"
 #include "nsIMsgThread.h"
 #include "nsMsgMessageFlags.h"
 
 nsMsgThreadsWithUnreadDBView::nsMsgThreadsWithUnreadDBView()
 : m_totalUnwantedMessagesInView(0)
 {
-  
+
 }
 
 nsMsgThreadsWithUnreadDBView::~nsMsgThreadsWithUnreadDBView()
 {
 }
 
 NS_IMETHODIMP nsMsgThreadsWithUnreadDBView::GetViewType(nsMsgViewTypeValue *aViewType)
 {
--- a/mailnews/base/src/nsMsgStatusFeedback.cpp
+++ b/mailnews/base/src/nsMsgStatusFeedback.cpp
@@ -50,31 +50,31 @@ NS_IMPL_ISUPPORTS(nsMsgStatusFeedback, n
 //////////////////////////////////////////////////////////////////////////////////
 // nsMsgStatusFeedback::nsIWebProgressListener
 //////////////////////////////////////////////////////////////////////////////////
 
 NS_IMETHODIMP
 nsMsgStatusFeedback::OnProgressChange(nsIWebProgress* aWebProgress,
                                       nsIRequest* aRequest,
                                       int32_t aCurSelfProgress,
-                                      int32_t aMaxSelfProgress, 
+                                      int32_t aMaxSelfProgress,
                                       int32_t aCurTotalProgress,
                                       int32_t aMaxTotalProgress)
 {
   int32_t percentage = 0;
   if (aMaxTotalProgress > 0)
   {
     percentage =  (aCurTotalProgress * 100) / aMaxTotalProgress;
     if (percentage)
       ShowProgress(percentage);
   }
 
    return NS_OK;
 }
-      
+
 NS_IMETHODIMP
 nsMsgStatusFeedback::OnStateChange(nsIWebProgress* aWebProgress,
                                    nsIRequest* aRequest,
                                    uint32_t aProgressStateFlags,
                                    nsresult aStatus)
 {
   nsresult rv;
 
@@ -87,44 +87,44 @@ nsMsgStatusFeedback::OnStateChange(nsIWe
       StartMeteors();
       nsString loadingDocument;
       rv = mBundle->GetStringFromName("documentLoading", loadingDocument);
       if (NS_SUCCEEDED(rv))
         ShowStatusString(loadingDocument);
     }
     else if (aProgressStateFlags & STATE_STOP)
     {
-      // if we are loading message for display purposes, this STATE_STOP notification is 
+      // if we are loading message for display purposes, this STATE_STOP notification is
       // the only notification we get when layout is actually done rendering the message. We need
       // to fire the appropriate msgHdrSink notification in this particular case.
       nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
-      if (channel) 
+      if (channel)
       {
-        nsCOMPtr<nsIURI> uri; 
+        nsCOMPtr<nsIURI> uri;
         channel->GetURI(getter_AddRefs(uri));
         nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl (do_QueryInterface(uri));
         if (mailnewsUrl)
         {
           // get the url type
           bool messageDisplayUrl;
           mailnewsUrl->IsUrlType(nsIMsgMailNewsUrl::eDisplay, &messageDisplayUrl);
 
           if (messageDisplayUrl)
-          {              
+          {
             // get the header sink
             nsCOMPtr<nsIMsgWindow> msgWindow;
             mailnewsUrl->GetMsgWindow(getter_AddRefs(msgWindow));
             if (msgWindow)
             {
               nsCOMPtr<nsIMsgHeaderSink> hdrSink;
               msgWindow->GetMsgHeaderSink(getter_AddRefs(hdrSink));
               if (hdrSink)
                 hdrSink->OnEndMsgDownload(mailnewsUrl);
             }
-            // get the folder and notify that the msg has been loaded. We're 
+            // get the folder and notify that the msg has been loaded. We're
             // using NotifyPropertyFlagChanged. To be completely consistent,
             // we'd send a similar notification that the old message was
             // unloaded.
             nsCOMPtr <nsIMsgDBHdr> msgHdr;
             nsCOMPtr <nsIMsgFolder> msgFolder;
             mailnewsUrl->GetFolder(getter_AddRefs(msgFolder));
             nsCOMPtr <nsIMsgMessageUrl> msgUrl = do_QueryInterface(mailnewsUrl);
             if (msgUrl)
@@ -150,29 +150,29 @@ nsMsgStatusFeedback::OnStateChange(nsIWe
 NS_IMETHODIMP nsMsgStatusFeedback::OnLocationChange(nsIWebProgress* aWebProgress,
                                                     nsIRequest* aRequest,
                                                     nsIURI* aLocation,
                                                     uint32_t aFlags)
 {
    return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsMsgStatusFeedback::OnStatusChange(nsIWebProgress* aWebProgress,
                                     nsIRequest* aRequest,
                                     nsresult aStatus,
                                     const char16_t* aMessage)
 {
     return NS_OK;
 }
 
 
-NS_IMETHODIMP 
-nsMsgStatusFeedback::OnSecurityChange(nsIWebProgress *aWebProgress, 
-                                    nsIRequest *aRequest, 
+NS_IMETHODIMP
+nsMsgStatusFeedback::OnSecurityChange(nsIWebProgress *aWebProgress,
+                                    nsIRequest *aRequest,
                                     uint32_t state)
 {
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsMsgStatusFeedback::ShowStatusString(const nsAString& aStatus)
@@ -194,17 +194,17 @@ nsMsgStatusFeedback::SetStatusString(con
 
 NS_IMETHODIMP
 nsMsgStatusFeedback::ShowProgress(int32_t aPercentage)
 {
   // if the percentage hasn't changed...OR if we are going from 0 to 100% in one step
   // then don't bother....just fall out....
   if (aPercentage == m_lastPercent || (m_lastPercent == 0 && aPercentage >= 100))
     return NS_OK;
-  
+
   m_lastPercent = aPercentage;
 
   int64_t nowMS = 0;
   if (aPercentage < 100)	// always need to do 100%
   {
     nowMS = PR_IntervalToMilliseconds(PR_IntervalNow());
     if (nowMS < m_lastProgressTime + 250)
       return NS_OK;
@@ -237,26 +237,26 @@ nsMsgStatusFeedback::StopMeteors()
 
 NS_IMETHODIMP nsMsgStatusFeedback::SetWrappedStatusFeedback(nsIMsgStatusFeedback * aJSStatusFeedback)
 {
   NS_ENSURE_ARG_POINTER(aJSStatusFeedback);
   mJSStatusFeedbackWeak = do_GetWeakReference(aJSStatusFeedback);
   return NS_OK;
 }
 
-NS_IMETHODIMP nsMsgStatusFeedback::OnProgress(nsIRequest *request, nsISupports* ctxt, 
+NS_IMETHODIMP nsMsgStatusFeedback::OnProgress(nsIRequest *request, nsISupports* ctxt,
                                               int64_t aProgress, int64_t aProgressMax)
 {
   // XXX: What should the nsIWebProgress be?
   // XXX: this truncates 64-bit to 32-bit
-  return OnProgressChange(nullptr, request, int32_t(aProgress), int32_t(aProgressMax), 
+  return OnProgressChange(nullptr, request, int32_t(aProgress), int32_t(aProgressMax),
                           int32_t(aProgress) /* current total progress */, int32_t(aProgressMax) /* max total progress */);
 }
 
-NS_IMETHODIMP nsMsgStatusFeedback::OnStatus(nsIRequest *request, nsISupports* ctxt, 
+NS_IMETHODIMP nsMsgStatusFeedback::OnStatus(nsIRequest *request, nsISupports* ctxt,
                                             nsresult aStatus, const char16_t* aStatusArg)
 {
   nsresult rv;
   nsCOMPtr<nsIURI> uri;
   nsString accountName;
   // fetching account name from nsIRequest
   nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(request);
   rv = aChannel->GetURI(getter_AddRefs(uri));
--- a/mailnews/base/src/nsMsgTagService.cpp
+++ b/mailnews/base/src/nsMsgTagService.cpp
@@ -489,17 +489,17 @@ nsresult nsMsgTagService::MigrateLabelsT
       tag->GetColor(color);
       DeleteKey(key);
       ToLowerCase(key);
       AddTagForKey(key, tagStr, color, ordinal);
     }
     NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(numTags, tagArray);
     gMigratingKeys = false;
   }
-  else 
+  else
   {
     nsCOMPtr<nsIPrefBranch> prefRoot(do_GetService(NS_PREFSERVICE_CONTRACTID));
     nsCOMPtr<nsIPrefLocalizedString> pls;
     nsString ucsval;
     nsAutoCString labelKey("$label1");
     for(int32_t i = 0; i < PREF_LABELS_MAX; )
     {
       prefString.Assign(PREF_LABELS_DESCRIPTION);
--- a/mailnews/base/src/nsMsgThreadedDBView.cpp
+++ b/mailnews/base/src/nsMsgThreadedDBView.cpp
@@ -37,32 +37,32 @@ NS_IMETHODIMP nsMsgThreadedDBView::Open(
   int32_t totalMessages, unreadMessages;
   nsCOMPtr <nsIDBFolderInfo> dbFolderInfo;
   PersistFolderInfo(getter_AddRefs(dbFolderInfo));
   NS_ENSURE_SUCCESS(rv, rv);
   // save off sort type and order, view type and flags
   dbFolderInfo->GetNumUnreadMessages(&unreadMessages);
   dbFolderInfo->GetNumMessages(&totalMessages);
   if (m_viewFlags & nsMsgViewFlagsType::kUnreadOnly)
-  { 
+  {
     // Set unread msg size + extra entries to avoid reallocation on new mail.
-    totalMessages = (uint32_t)unreadMessages+MSGHDR_CACHE_LOOK_AHEAD_SIZE;  
+    totalMessages = (uint32_t)unreadMessages+MSGHDR_CACHE_LOOK_AHEAD_SIZE;
   }
   else
   {
-    if (totalMessages > MSGHDR_CACHE_MAX_SIZE) 
+    if (totalMessages > MSGHDR_CACHE_MAX_SIZE)
       totalMessages = MSGHDR_CACHE_MAX_SIZE;        // use max default
     else if (totalMessages > 0)
       totalMessages += MSGHDR_CACHE_LOOK_AHEAD_SIZE;// allocate extra entries to avoid reallocation on new mail.
   }
   // if total messages is 0, then we probably don't have any idea how many headers are in the db
   // so we have no business setting the cache size.
   if (totalMessages > 0)
     m_db->SetMsgHdrCacheSize((uint32_t)totalMessages);
-  
+
   if (pCount)
     *pCount = 0;
   rv = InitThreadedView(pCount);
 
   // this is a hack, but we're trying to find a way to correct
   // incorrect total and unread msg counts w/o paying a big
   // performance penalty. So, if we're not threaded, just add
   // up the total and unread messages in the view and see if that
@@ -89,47 +89,47 @@ NS_IMETHODIMP nsMsgThreadedDBView::Open(
 NS_IMETHODIMP nsMsgThreadedDBView::Close()
 {
   return nsMsgDBView::Close();
 }
 
 nsresult nsMsgThreadedDBView::InitThreadedView(int32_t *pCount)
 {
   nsresult rv;
-  
+
   m_keys.Clear();
   m_flags.Clear();
-  m_levels.Clear(); 
+  m_levels.Clear();
   m_prevKeys.Clear();
   m_prevFlags.Clear();
   m_prevLevels.Clear();
   m_havePrevView = false;
   nsresult getSortrv = NS_OK; // ### TODO m_db->GetSortInfo(&sortType, &sortOrder);
-  
+
   // list all the ids into m_keys.
-  nsMsgKey startMsg = 0; 
+  nsMsgKey startMsg = 0;
   do
   {
     const int32_t kIdChunkSize = 400;
     int32_t  numListed = 0;
     nsMsgKey idArray[kIdChunkSize];
     int32_t  flagArray[kIdChunkSize];
     char     levelArray[kIdChunkSize];
 
-    rv = ListThreadIds(&startMsg, (m_viewFlags & nsMsgViewFlagsType::kUnreadOnly) != 0, idArray, flagArray, 
+    rv = ListThreadIds(&startMsg, (m_viewFlags & nsMsgViewFlagsType::kUnreadOnly) != 0, idArray, flagArray,
       levelArray, kIdChunkSize, &numListed, nullptr);
     if (NS_SUCCEEDED(rv))
     {
       int32_t numAdded = AddKeys(idArray, flagArray, levelArray, m_sortType, numListed);
       if (pCount)
         *pCount += numAdded;
     }
-    
+
   } while (NS_SUCCEEDED(rv) && startMsg != nsMsgKey_None);
-  
+
   if (NS_SUCCEEDED(getSortrv))
   {
     rv = InitSort(m_sortType, m_sortOrder);
     SaveSortInfo(m_sortType, m_sortOrder);
 
   }
   return rv;
 }
@@ -210,34 +210,34 @@ int32_t nsMsgThreadedDBView::AddKeys(nsM
   // Allocate enough space first to avoid memory allocation/deallocation.
   m_keys.SetCapacity(m_keys.Length() + numKeysToAdd);
   m_flags.SetCapacity(m_flags.Length() + numKeysToAdd);
   m_levels.SetCapacity(m_levels.Length() + numKeysToAdd);
   for (int32_t i = 0; i < numKeysToAdd; i++)
   {
     int32_t threadFlag = pFlags[i];
     int32_t flag = threadFlag;
-    
+
     // skip ignored threads.
     if ((threadFlag & nsMsgMessageFlags::Ignored) && !(m_viewFlags & nsMsgViewFlagsType::kShowIgnored))
       continue;
-    
+
     // skip ignored subthreads
     nsCOMPtr <nsIMsgDBHdr> msgHdr;
     m_db->GetMsgHdrForKey(pKeys[i], getter_AddRefs(msgHdr));
     if (!(m_viewFlags & nsMsgViewFlagsType::kShowIgnored))
     {
       bool killed;
       msgHdr->GetIsKilled(&killed);
       if (killed)
         continue;
     }
 
     // by default, make threads collapsed, unless we're in only viewing new msgs
-    
+
     if (flag & MSG_VIEW_FLAG_HASCHILDREN)
       flag |= nsMsgMessageFlags::Elided;
     // should this be persistent? Doesn't seem to need to be.
     flag |= MSG_VIEW_FLAG_ISTHREAD;
     m_keys.AppendElement(pKeys[i]);
     m_flags.AppendElement(flag);
     m_levels.AppendElement(pLevels[i]);
     numAdded++;
@@ -250,96 +250,96 @@ int32_t nsMsgThreadedDBView::AddKeys(nsM
 }
 
 NS_IMETHODIMP nsMsgThreadedDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder)
 {
   nsresult rv;
 
   int32_t rowCountBeforeSort = GetSize();
 
-  if (!rowCountBeforeSort) 
+  if (!rowCountBeforeSort)
   {
     // still need to setup our flags even when no articles - bug 98183.
     m_sortType = sortType;
     if (sortType == nsMsgViewSortType::byThread && ! (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay))
       SetViewFlags(m_viewFlags | nsMsgViewFlagsType::kThreadedDisplay);
     SaveSortInfo(sortType, sortOrder);
     return NS_OK;
   }
 
   if (!m_checkedCustomColumns && CustomColumnsInSortAndNotRegistered())
     return NS_OK;
 
   // sort threads by sort order
   bool sortThreads = m_viewFlags & (nsMsgViewFlagsType::kThreadedDisplay | nsMsgViewFlagsType::kGroupBySort);
-  
+
   // if sort type is by thread, and we're already threaded, change sort type to byId
   if (sortType == nsMsgViewSortType::byThread && (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay) != 0)
     sortType = nsMsgViewSortType::byId;
 
   nsMsgKey preservedKey;
   AutoTArray<nsMsgKey, 1> preservedSelection;
   SaveAndClearSelection(&preservedKey, preservedSelection);
   // if the client wants us to forget our cached id arrays, they
   // should build a new view. If this isn't good enough, we
   // need a method to do that.
   if (sortType != m_sortType || !m_sortValid || sortThreads)
   {
     SaveSortInfo(sortType, sortOrder);
-    if (sortType == nsMsgViewSortType::byThread)  
+    if (sortType == nsMsgViewSortType::byThread)
     {
       m_sortType = sortType;
       m_viewFlags |= nsMsgViewFlagsType::kThreadedDisplay;
       m_viewFlags &= ~nsMsgViewFlagsType::kGroupBySort;
       if ( m_havePrevView)
       {
         // restore saved id array and flags array
         m_keys = m_prevKeys;
         m_flags = m_prevFlags;
         m_levels = m_prevLevels;
         m_sortValid = true;
-        
+
         // the sort may have changed the number of rows
         // before we restore the selection, tell the tree
         // do this before we call restore selection
         // this is safe when there is no selection.
         rv = AdjustRowCount(rowCountBeforeSort, GetSize());
-        
+
         RestoreSelection(preservedKey, preservedSelection);
         if (mTree) mTree->Invalidate();
         return NS_OK;
       }
       else
       {
         // set sort info in anticipation of what Init will do.
         InitThreadedView(nullptr);	// build up thread list.
         if (sortOrder != nsMsgViewSortOrder::ascending)
           Sort(sortType, sortOrder);
-        
+
         // the sort may have changed the number of rows
         // before we update the selection, tell the tree
         // do this before we call restore selection
         // this is safe when there is no selection.
         rv = AdjustRowCount(rowCountBeforeSort, GetSize());
-        
+
         RestoreSelection(preservedKey, preservedSelection);
         if (mTree) mTree->Invalidate();
         return NS_OK;
       }
     }
     else if (sortType  != nsMsgViewSortType::byThread && (m_sortType == nsMsgViewSortType::byThread  || sortThreads)/* && !m_havePrevView*/)
     {
       if (sortThreads)
       {
         SortThreads(sortType, sortOrder);
         sortType = nsMsgViewSortType::byThread; // hack so base class won't do anything
       }
       else
       {
-        // going from SortByThread to non-thread sort - must build new key, level,and flags arrays 
+        // going from SortByThread to non-thread sort - must build new key, level,and flags arrays
         m_prevKeys = m_keys;
         m_prevFlags = m_flags;
         m_prevLevels = m_levels;
         // do this before we sort, so that we'll use the cheap method
         // of expanding.
         m_viewFlags &= ~(nsMsgViewFlagsType::kThreadedDisplay | nsMsgViewFlagsType::kGroupBySort);
         ExpandAll();
         //			m_idArray.RemoveAll();
@@ -367,38 +367,38 @@ NS_IMETHODIMP nsMsgThreadedDBView::Sort(
   RestoreSelection(preservedKey, preservedSelection);
   if (mTree) mTree->Invalidate();
   NS_ENSURE_SUCCESS(rv,rv);
   return NS_OK;
 }
 
 // list the ids of the top-level thread ids starting at id == startMsg. This actually returns
 // the ids of the first message in each thread.
-nsresult nsMsgThreadedDBView::ListThreadIds(nsMsgKey *startMsg, bool unreadOnly, nsMsgKey *pOutput, int32_t *pFlags, char *pLevels, 
+nsresult nsMsgThreadedDBView::ListThreadIds(nsMsgKey *startMsg, bool unreadOnly, nsMsgKey *pOutput, int32_t *pFlags, char *pLevels,
 									 int32_t numToList, int32_t *pNumListed, int32_t *pTotalHeaders)
 {
   nsresult rv = NS_OK;
   // N.B..don't ret before assigning numListed to *pNumListed
   int32_t	numListed = 0;
-  
+
   if (*startMsg > 0)
   {
     NS_ASSERTION(m_threadEnumerator != nullptr, "where's our iterator?");	// for now, we'll just have to rely on the caller leaving
     // the iterator in the right place.
   }
   else
   {
     NS_ASSERTION(m_db, "no db");
     if (!m_db) return NS_ERROR_UNEXPECTED;
     rv = m_db->EnumerateThreads(getter_AddRefs(m_threadEnumerator));
     NS_ENSURE_SUCCESS(rv, rv);
   }
-  
+
   bool hasMore = false;
-  
+
   nsCOMPtr <nsIMsgThread> threadHdr ;
   int32_t	threadsRemoved = 0;
   while (numListed < numToList &&
          NS_SUCCEEDED(rv = m_threadEnumerator->HasMoreElements(&hasMore)) &&
          hasMore)
   {
     nsCOMPtr <nsISupports> supports;
     rv = m_threadEnumerator->GetNext(getter_AddRefs(supports));
@@ -440,33 +440,33 @@ nsresult nsMsgThreadedDBView::ListThread
         pLevels[numListed] = 0;
         // turn off these flags on msg hdr - they belong in thread
         msgHdr->AndFlags(~(nsMsgMessageFlags::Watched), &newMsgFlags);
         AdjustReadFlag(msgHdr, &msgFlags);
         // try adding in MSG_VIEW_FLAG_ISTHREAD flag for unreadonly view.
         pFlags[numListed] = msgFlags | MSG_VIEW_FLAG_ISTHREAD | threadFlags;
         if (numChildren > 1)
           pFlags[numListed] |= MSG_VIEW_FLAG_HASCHILDREN;
-        
+
         numListed++;
       }
       else
         NS_ASSERTION(NS_SUCCEEDED(rv) && msgHdr, "couldn't get header for some reason");
     }
     else if (threadsRemoved < 10 && !(threadFlags & (nsMsgMessageFlags::Watched | nsMsgMessageFlags::Ignored)))
     {
       // ### remove thread.
       threadsRemoved++;	// don't want to remove all empty threads first time
       // around as it will choke preformance for upgrade.
 #ifdef DEBUG_bienvenu
       printf("removing empty non-ignored non-watched thread\n");
 #endif
     }
   }
-  
+
   if (hasMore && threadHdr)
   {
     threadHdr->GetThreadKey(startMsg);
   }
   else
   {
     *startMsg = nsMsgKey_None;
     nsCOMPtr <nsIDBChangeListener> dbListener = do_QueryInterface(m_threadEnumerator);
@@ -504,17 +504,17 @@ void	nsMsgThreadedDBView::OnExtraFlagCha
         else
           extraFlag &= ~MSG_VIEW_FLAG_HASCHILDREN;
         m_prevFlags[prevViewIndex] = extraFlag; // will this be right?
       }
     }
   }
   // we don't really know what's changed, but to be on the safe side, set the sort invalid
   // so that reverse sort will pick it up.
-  if (m_sortType == nsMsgViewSortType::byStatus || m_sortType == nsMsgViewSortType::byFlagged || 
+  if (m_sortType == nsMsgViewSortType::byStatus || m_sortType == nsMsgViewSortType::byFlagged ||
     m_sortType == nsMsgViewSortType::byUnread || m_sortType == nsMsgViewSortType::byPriority)
     m_sortValid = false;
 }
 
 void nsMsgThreadedDBView::OnHeaderAddedOrDeleted()
 {
   ClearPrevIdArray();
 }
@@ -538,24 +538,24 @@ nsresult nsMsgThreadedDBView::InitSort(n
     m_sortType = nsMsgViewSortType::byThread;
     m_viewFlags |= nsMsgViewFlagsType::kThreadedDisplay;
     m_viewFlags &= ~nsMsgViewFlagsType::kGroupBySort;
     SetViewFlags(m_viewFlags); // persist the view flags.
     //		m_db->SetSortInfo(m_sortType, sortOrder);
   }
 //  else
 //    m_viewFlags &= ~nsMsgViewFlagsType::kThreadedDisplay;
-  
+
   // by default, the unread only view should have all threads expanded.
-  if ((m_viewFlags & (nsMsgViewFlagsType::kUnreadOnly|nsMsgViewFlagsType::kExpandAll)) 
+  if ((m_viewFlags & (nsMsgViewFlagsType::kUnreadOnly|nsMsgViewFlagsType::kExpandAll))
       && (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay))
     ExpandAll();
   if (! (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay))
     ExpandAll(); // for now, expand all and do a flat sort.
-  
+
   Sort(sortType, sortOrder);
   if (sortType != nsMsgViewSortType::byThread)	// forget prev view, since it has everything expanded.
     ClearPrevIdArray();
   return NS_OK;
 }
 
 nsresult nsMsgThreadedDBView::OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey aParentKey, bool ensureListed)
 {
@@ -685,17 +685,17 @@ NS_IMETHODIMP nsMsgThreadedDBView::OnPar
   if (false && m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)
   {
     nsMsgViewIndex childIndex = FindViewIndex(aKeyChanged);
     if (childIndex != nsMsgViewIndex_None)
     {
       nsMsgViewIndex parentIndex = FindViewIndex(newParent);
       int32_t newParentLevel = (parentIndex == nsMsgViewIndex_None) ? -1 : m_levels[parentIndex];
       nsMsgViewIndex oldParentIndex = FindViewIndex(oldParent);
-      int32_t oldParentLevel = (oldParentIndex != nsMsgViewIndex_None || newParent == nsMsgKey_None) 
+      int32_t oldParentLevel = (oldParentIndex != nsMsgViewIndex_None || newParent == nsMsgKey_None)
         ? m_levels[oldParentIndex] : -1 ;
       int32_t levelChanged = m_levels[childIndex];
       int32_t parentDelta = oldParentLevel - newParentLevel;
       m_levels[childIndex] = (newParent == nsMsgKey_None) ? 0 : newParentLevel + 1;
       if (parentDelta > 0)
       {
         for (nsMsgViewIndex viewIndex = childIndex + 1; viewIndex < GetSize() && m_levels[viewIndex] > levelChanged;  viewIndex++)
         {
@@ -718,17 +718,17 @@ nsMsgViewIndex nsMsgThreadedDBView::GetI
   {
     // loop until we find a message at a level less than or equal to the parent level
     if (m_levels[parentIndex] < targetLevel)
       break;
   }
   return parentIndex;
 }
 
-// This method removes the thread at threadIndex from the view 
+// This method removes the thread at threadIndex from the view
 // and puts it back in its new position, determined by the sort order.
 // And, if the selection is affected, save and restore the selection.
 void nsMsgThreadedDBView::MoveThreadAt(nsMsgViewIndex threadIndex)
 {
   // we need to check if the thread is collapsed or not...
   // We want to turn off tree notifications so that we don't
   // reload the current message.
   // We also need to invalidate the range between where the thread was
@@ -765,17 +765,17 @@ void nsMsgThreadedDBView::MoveThreadAt(n
   nsTArray<uint32_t> threadFlags;
   nsTArray<uint8_t> threadLevels;
 
   if (threadIsExpanded)
   {
     threadKeys.SetCapacity(childCount);
     threadFlags.SetCapacity(childCount);
     threadLevels.SetCapacity(childCount);
-    for (nsMsgViewIndex index = threadIndex + 1; 
+    for (nsMsgViewIndex index = threadIndex + 1;
         index < GetSize() && m_levels[index]; index++)
     {
       threadKeys.AppendElement(m_keys[index]);
       threadFlags.AppendElement(m_flags[index]);
       threadLevels.AppendElement(m_levels[index]);
     }
     uint32_t collapseCount;
     CollapseByIndex(threadIndex, &collapseCount);
@@ -831,25 +831,25 @@ nsresult nsMsgThreadedDBView::AddMsgToTh
 // NOT delete it from the database.
 nsresult nsMsgThreadedDBView::RemoveByIndex(nsMsgViewIndex index)
 {
   nsresult rv = NS_OK;
   int32_t flags;
 
   if (!IsValidIndex(index))
     return NS_MSG_INVALID_DBVIEW_INDEX;
-  
+
   OnHeaderAddedOrDeleted();
 
   flags = m_flags[index];
 
-  if (! (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay)) 
+  if (! (m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay))
     return nsMsgDBView::RemoveByIndex(index);
 
-  nsCOMPtr<nsIMsgThread> threadHdr; 
+  nsCOMPtr<nsIMsgThread> threadHdr;
   GetThreadContainingIndex(index, getter_AddRefs(threadHdr));
   NS_ENSURE_SUCCESS(rv, rv);
   uint32_t numThreadChildren = 0;
   // If we can't get a thread, it's already deleted and thus has 0 children.
   if (threadHdr)
     threadHdr->GetNumChildren(&numThreadChildren);
 
   // Check if we're the top level msg in the thread, and we're not collapsed.
@@ -882,34 +882,34 @@ nsresult nsMsgThreadedDBView::RemoveByIn
       }
     }
     return rv;
   }
   else if (!(flags & MSG_VIEW_FLAG_ISTHREAD))
   {
     // We're not deleting the top level msg, but top level msg might be the
     // only msg in thread now.
-    if (threadHdr && numThreadChildren == 1) 
+    if (threadHdr && numThreadChildren == 1)
     {
       nsMsgKey msgKey;
       rv = threadHdr->GetChildKeyAt(0, &msgKey);
       if (NS_SUCCEEDED(rv))
       {
         nsMsgViewIndex threadIndex = FindViewIndex(msgKey);
         if (IsValidIndex(threadIndex))
         {
           uint32_t flags = m_flags[threadIndex];
           flags &= ~(MSG_VIEW_FLAG_ISTHREAD |
                      nsMsgMessageFlags::Elided |
                      MSG_VIEW_FLAG_HASCHILDREN);
           m_flags[threadIndex] = flags;
           NoteChange(threadIndex, 1, nsMsgViewNotificationCode::changed);
         }
       }
-      
+
     }
     return nsMsgDBView::RemoveByIndex(index);
   }
   // Deleting collapsed thread header is special case. Child will be promoted,
   // so just tell FE that line changed, not that it was deleted.
   // Header has aleady been deleted from thread.
   if (threadHdr && numThreadChildren > 0)
   {
@@ -958,17 +958,17 @@ nsresult nsMsgThreadedDBView::RemoveByIn
     rv = nsMsgDBView::RemoveByIndex(index);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsMsgThreadedDBView::GetViewType(nsMsgViewTypeValue *aViewType)
 {
     NS_ENSURE_ARG_POINTER(aViewType);
-    *aViewType = nsMsgViewType::eShowAllThreads; 
+    *aViewType = nsMsgViewType::eShowAllThreads;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgThreadedDBView::CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCmdUpdater, nsIMsgDBView **_retval)
 {
   nsMsgThreadedDBView* newMsgDBView = new nsMsgThreadedDBView();
 
--- a/mailnews/base/src/nsMsgThreadedDBView.h
+++ b/mailnews/base/src/nsMsgThreadedDBView.h
@@ -23,17 +23,17 @@ public:
   NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
   NS_IMETHOD OnParentChanged (nsMsgKey aKeyChanged, nsMsgKey oldParent, nsMsgKey newParent, nsIDBChangeListener *aInstigator) override;
 
 protected:
   virtual const char *GetViewName(void) override { return "ThreadedDBView"; }
   nsresult InitThreadedView(int32_t *pCount);
   virtual nsresult OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey aParentKey, bool ensureListed) override;
   virtual nsresult AddMsgToThreadNotInView(nsIMsgThread *threadHdr, nsIMsgDBHdr *msgHdr, bool ensureListed);
-  nsresult ListThreadIds(nsMsgKey *startMsg, bool unreadOnly, nsMsgKey *pOutput, int32_t *pFlags, char *pLevels, 
+  nsresult ListThreadIds(nsMsgKey *startMsg, bool unreadOnly, nsMsgKey *pOutput, int32_t *pFlags, char *pLevels,
                         int32_t numToList, int32_t *pNumListed, int32_t *pTotalHeaders);
   nsresult InitSort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder);
   virtual nsresult SortThreads(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder);
   virtual void  OnExtraFlagChanged(nsMsgViewIndex index, uint32_t extraFlag) override;
   virtual void OnHeaderAddedOrDeleted() override;
   void    ClearPrevIdArray();
   virtual nsresult RemoveByIndex(nsMsgViewIndex index) override;
   nsMsgViewIndex GetInsertInfoForNewHdr(nsIMsgDBHdr *newHdr, nsMsgViewIndex threadIndex, int32_t targetLevel);
--- a/mailnews/base/src/nsMsgWindow.h
+++ b/mailnews/base/src/nsMsgWindow.h
@@ -46,16 +46,16 @@ protected:
   // prompt dialog used during testing only
   nsCOMPtr<nsIPrompt> mPromptDialog;
   // authorization prompt used during testing only
   nsCOMPtr<nsIAuthPrompt> mAuthPrompt;
 
   // let's not make this a strong ref - we don't own it.
   nsWeakPtr mRootDocShellWeak;
   nsWeakPtr mMessageWindowDocShellWeak;
-  nsWeakPtr mDomWindow; 
+  nsWeakPtr mDomWindow;
 
   nsCString mMailCharacterSet;
   bool      mCharsetOverride;
   bool      m_stopped;
 };
 
 #endif
--- a/mailnews/base/src/nsMsgXFViewThread.cpp
+++ b/mailnews/base/src/nsMsgXFViewThread.cpp
@@ -71,18 +71,18 @@ NS_IMETHODIMP nsMsgXFViewThread::GetNumC
 
 NS_IMETHODIMP nsMsgXFViewThread::GetNumUnreadChildren (uint32_t *aNumUnreadChildren)
 {
   NS_ENSURE_ARG_POINTER(aNumUnreadChildren);
   *aNumUnreadChildren = m_numUnreadChildren;
   return NS_OK;
 }
 
-NS_IMETHODIMP 
-nsMsgXFViewThread::AddChild(nsIMsgDBHdr *aNewHdr, nsIMsgDBHdr *aInReplyTo, 
+NS_IMETHODIMP
+nsMsgXFViewThread::AddChild(nsIMsgDBHdr *aNewHdr, nsIMsgDBHdr *aInReplyTo,
                             bool aThreadInThread, nsIDBChangeAnnouncer *aAnnouncer)
 {
   uint32_t whereInserted;
   return AddHdr(aNewHdr, false, whereInserted, nullptr);
 }
 
 // Returns the parent of the newly added header. If reparentChildren
 // is true, we believe that the new header is a parent of an existing
@@ -168,17 +168,17 @@ nsresult nsMsgXFViewThread::AddHdr(nsIMs
     // and insert ourselves before it, or as the last child. In other words,
     // insert, sorted by date.
     uint32_t msgDate, childDate;
     newHdr->GetDateInSeconds(&msgDate);
     nsCOMPtr<nsIMsgDBHdr> child;
     nsMsgViewIndex i;
     nsMsgViewIndex insertIndex = m_keys.Length();
     uint32_t insertLevel = parentLevel + 1;
-    for (i = parentIndex; 
+    for (i = parentIndex;
          i < m_keys.Length() && (i == (nsMsgViewIndex)parentIndex || m_levels[i] >= parentLevel);
          i++)
     {
       GetChildHdrAt(i, getter_AddRefs(child));
       if (child)
       {
         if (reparentChildren && IsHdrParentOf(newHdr, child))
         {
@@ -219,17 +219,17 @@ nsresult nsMsgXFViewThread::AddHdr(nsIMs
     whereInserted = insertIndex;
   }
   else
   {
     if (outParent)
       *outParent = nullptr;
     nsCOMPtr<nsIMsgDBHdr> rootHdr;
     GetChildHdrAt(0, getter_AddRefs(rootHdr));
-    // If the new header is a parent of the root then it should be promoted. 
+    // If the new header is a parent of the root then it should be promoted.
     if (rootHdr && IsHdrParentOf(newHdr, rootHdr))
     {
       m_keys.InsertElementAt(0, newHdrKey);
       m_levels.InsertElementAt(0, 0);
       m_folders.InsertObjectAt(newHdrFolder, 0);
       whereInserted = 0;
       // Adjust level of old root hdr and its children
       for (nsMsgViewIndex i = 1; i < m_keys.Length(); i++)
@@ -241,34 +241,34 @@ nsresult nsMsgXFViewThread::AddHdr(nsIMs
       m_levels.AppendElement(1);
       m_folders.AppendObject(newHdrFolder);
       if (outParent)
         rootHdr.forget(outParent);
       whereInserted = m_keys.Length() -1;
     }
   }
 
-  // ### TODO handle the case where the root header starts 
+  // ### TODO handle the case where the root header starts
   // with Re, and the new one doesn't, and is earlier. In that
   // case, we want to promote the new header to root.
 
 //  PRTime newHdrDate;
 //  newHdr->GetDate(&newHdrDate);
 
 //  if (numChildren > 0 && !(newHdrFlags & nsMsgMessageFlags::HasRe))
 //  {
 //    PRTime topLevelHdrDate;
 
 //    nsCOMPtr<nsIMsgDBHdr> topLevelHdr;
 //    rv = GetRootHdr(nullptr, getter_AddRefs(topLevelHdr));
 //    if (NS_SUCCEEDED(rv) && topLevelHdr)
 //    {
 //      topLevelHdr->GetDate(&topLevelHdrDate);
 //      if (newHdrDate < topLevelHdrDate)
-      
+
 //    }
 //  }
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::GetChildHdrAt(uint32_t aIndex, nsIMsgDBHdr **aResult)
 {
   if (aIndex >= m_keys.Length())
@@ -304,17 +304,17 @@ NS_IMETHODIMP nsMsgXFViewThread::RemoveC
 
   for (uint32_t childIndex = 0; childIndex < m_keys.Length(); childIndex++)
   {
     if (m_keys[childIndex] == msgKey && m_folders[childIndex] == msgFolder)
     {
       uint8_t levelRemoved = m_keys[childIndex];
       // Adjust the levels of all the children of this header
       nsMsgViewIndex i;
-      for (i = childIndex + 1; 
+      for (i = childIndex + 1;
                i < m_keys.Length() && m_levels[i] > levelRemoved; i++)
             m_levels[i] = m_levels[i] - 1;
 
       m_view->NoteChange(childIndex + 1, i - childIndex + 1,
                          nsMsgViewNotificationCode::changed);
       m_keys.RemoveElementAt(childIndex);
       m_levels.RemoveElementAt(childIndex);
       m_folders.RemoveObjectAt(childIndex);
@@ -367,17 +367,17 @@ void nsMsgXFViewThread::ChangeUnreadChil
   m_numUnreadChildren += delta;
 }
 
 void nsMsgXFViewThread::ChangeChildCount(int32_t delta)
 {
   m_numChildren += delta;
 }
 
-bool nsMsgXFViewThread::IsHdrParentOf(nsIMsgDBHdr *possibleParent, 
+bool nsMsgXFViewThread::IsHdrParentOf(nsIMsgDBHdr *possibleParent,
                                         nsIMsgDBHdr *possibleChild)
 {
   uint16_t referenceToCheck = 0;
   possibleChild->GetNumReferences(&referenceToCheck);
   nsAutoCString reference;
 
   nsCString messageId;
   possibleParent->GetMessageId(getter_Copies(messageId));
@@ -394,29 +394,29 @@ bool nsMsgXFViewThread::IsHdrParentOf(ns
     m_view->GetMsgHdrFromHash(reference, getter_AddRefs(refHdr));
     if (refHdr)
       break;
     referenceToCheck--;
   }
   return false;
 }
 
-NS_IMETHODIMP nsMsgXFViewThread::GetNewestMsgDate(uint32_t *aResult) 
+NS_IMETHODIMP nsMsgXFViewThread::GetNewestMsgDate(uint32_t *aResult)
 {
   // if this hasn't been set, figure it out by enumerating the msgs in the thread.
   if (!m_newestMsgDate)
   {
     uint32_t numChildren;
     nsresult rv = NS_OK;
-  
+
     GetNumChildren(&numChildren);
 
     if ((int32_t) numChildren < 0)
       numChildren = 0;
- 
+
     for (uint32_t childIndex = 0; childIndex < numChildren; childIndex++)
     {
       nsCOMPtr<nsIMsgDBHdr> child;
       rv = GetChildHdrAt(childIndex, getter_AddRefs(child));
       if (NS_SUCCEEDED(rv) && child)
       {
         uint32_t msgDate;
         child->GetDateInSeconds(&msgDate);
@@ -424,48 +424,48 @@ NS_IMETHODIMP nsMsgXFViewThread::GetNewe
           m_newestMsgDate = msgDate;
       }
     }
   }
   *aResult = m_newestMsgDate;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsMsgXFViewThread::SetNewestMsgDate(uint32_t aNewestMsgDate) 
+NS_IMETHODIMP nsMsgXFViewThread::SetNewestMsgDate(uint32_t aNewestMsgDate)
 {
   m_newestMsgDate = aNewestMsgDate;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::MarkChildRead(bool aRead)
 {
   ChangeUnreadChildCount(aRead ? -1 : 1);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgXFViewThread::GetFirstUnreadChild(nsIMsgDBHdr **aResult)
 {
   NS_ENSURE_ARG(aResult);
   uint32_t numChildren;
   nsresult rv = NS_OK;
-  
+
   GetNumChildren(&numChildren);
 
   if ((int32_t) numChildren < 0)
     numChildren = 0;
-  
+
   for (uint32_t childIndex = 0; childIndex < numChildren; childIndex++)
   {
     nsCOMPtr<nsIMsgDBHdr> child;
     rv = GetChildHdrAt(childIndex, getter_AddRefs(child));
     if (NS_SUCCEEDED(rv) && child)
     {
       nsMsgKey msgKey;
       child->GetMessageKey(&msgKey);
-      
+
       bool isRead;
       nsCOMPtr<nsIMsgDatabase> db;
       nsresult rv = m_folders[childIndex]->GetMsgDatabase(getter_AddRefs(db));
       if (NS_SUCCEEDED(rv))
         rv = db->IsRead(msgKey, &isRead);
       if (NS_SUCCEEDED(rv) && !isRead)
       {
         child.forget(aResult);
--- a/mailnews/base/src/nsMsgXFViewThread.h
+++ b/mailnews/base/src/nsMsgXFViewThread.h
@@ -26,17 +26,17 @@ public:
   NS_DECL_ISUPPORTS
 
   bool      IsHdrParentOf(nsIMsgDBHdr *possibleParent,
                           nsIMsgDBHdr *possibleChild);
 
   void      ChangeUnreadChildCount(int32_t delta);
   void      ChangeChildCount(int32_t delta);
 
-  nsresult  AddHdr(nsIMsgDBHdr *newHdr, bool reparentChildren, 
+  nsresult  AddHdr(nsIMsgDBHdr *newHdr, bool reparentChildren,
                    uint32_t &whereInserted, nsIMsgDBHdr **outParent);
   int32_t   HdrIndex(nsIMsgDBHdr *hdr);
   uint32_t  ChildLevelAt(uint32_t msgIndex) {return m_levels[msgIndex];}
   uint32_t  MsgCount() {return m_numChildren;};
 
 protected:
   virtual ~nsMsgXFViewThread();
 
--- a/mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp
+++ b/mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp
@@ -27,20 +27,20 @@ nsMsgXFVirtualFolderDBView::nsMsgXFVirtu
   m_doingQuickSearch = false;
   m_totalMessagesInView = 0;
 }
 
 nsMsgXFVirtualFolderDBView::~nsMsgXFVirtualFolderDBView()
 {
 }
 
-NS_IMETHODIMP nsMsgXFVirtualFolderDBView::Open(nsIMsgFolder *folder, 
-                                               nsMsgViewSortTypeValue sortType, 
-                                               nsMsgViewSortOrderValue sortOrder, 
-                                               nsMsgViewFlagsTypeValue viewFlags, 
+NS_IMETHODIMP nsMsgXFVirtualFolderDBView::Open(nsIMsgFolder *folder,
+                                               nsMsgViewSortTypeValue sortType,
+                                               nsMsgViewSortOrderValue sortOrder,
+                                               nsMsgViewFlagsTypeValue viewFlags,
                                                int32_t *pCount)
 {
   m_viewFolder = folder;
   return nsMsgSearchDBView::Open(folder, sortType, sortOrder, viewFlags, pCount);
 }
 
 void nsMsgXFVirtualFolderDBView::RemovePendingDBListeners()
 {
@@ -190,17 +190,17 @@ void nsMsgXFVirtualFolderDBView::UpdateC
     nsMsgKey *badHits;
     rv = db->RefreshCache(searchUri.get(), numNewHits, newHits,
                      &numBadHits, &badHits);
     if (NS_SUCCEEDED(rv))
     {
       nsCOMPtr<nsIMsgDBHdr> badHdr;
       for (uint32_t badHitIndex = 0; badHitIndex < numBadHits; badHitIndex++)
       {
-        // ### of course, this isn't quite right, since we should be 
+        // ### of course, this isn't quite right, since we should be
         // using FindHdr, and we shouldn't be expanding the threads.
         db->GetMsgHdrForKey(badHits[badHitIndex], getter_AddRefs(badHdr));
         // let nsMsgSearchDBView decide what to do about this header
         // getting removed.
         if (badHdr)
           OnHdrDeleted(badHdr, nsMsgKey_None, 0, this);
       }
       delete [] badHits;
@@ -263,17 +263,17 @@ nsMsgXFVirtualFolderDBView::OnSearchHit(
     m_hdrHits.Clear();
     m_curFolderStartKeyIndex = m_keys.Length();
   }
   bool hdrInCache = false;
   nsCString searchUri;
   if (!m_doingQuickSearch)
   {
     m_viewFolder->GetURI(searchUri);
-    dbToUse->HdrIsInCache(searchUri.get(), aMsgHdr, &hdrInCache);    
+    dbToUse->HdrIsInCache(searchUri.get(), aMsgHdr, &hdrInCache);
   }
   if (!m_doingSearch || !m_curFolderHasCachedHits || !hdrInCache)
   {
     if (m_viewFlags & nsMsgViewFlagsType::kGroupBySort)
       nsMsgGroupView::OnNewHeader(aMsgHdr, nsMsgKey_None, true);
     else if (m_sortValid)
       InsertHdrFromFolder(aMsgHdr, aFolder);
     else
@@ -327,17 +327,17 @@ nsMsgXFVirtualFolderDBView::OnSearchDone
     {
       if (!(m_flags[i] & nsMsgMessageFlags::Read))
         numUnread++;
     }
   dbFolderInfo->SetNumUnreadMessages(numUnread);
   dbFolderInfo->SetNumMessages(m_totalMessagesInView);
   m_viewFolder->UpdateSummaryTotals(true); // force update from db.
   virtDatabase->Commit(nsMsgDBCommitType::kLargeCommit);
-  if (!m_sortValid && m_sortType != nsMsgViewSortType::byThread && 
+  if (!m_sortValid && m_sortType != nsMsgViewSortType::byThread &&
       !(m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay))
   {
     m_sortValid = false;       //sort the results
     Sort(m_sortType, m_sortOrder);
   }
   m_foldersSearchingOver.Clear();
   m_curFolderGettingHits = nullptr;
   return rv;
@@ -499,13 +499,13 @@ NS_IMETHODIMP nsMsgXFVirtualFolderDBView
       (aViewFlags & (nsMsgViewFlagsType::kGroupBySort |
                      nsMsgViewFlagsType::kThreadedDisplay)))
     rv = RebuildView(aViewFlags);
   nsMsgDBView::SetViewFlags(aViewFlags);
   return rv;
 }
 
 
-nsresult 
+nsresult
 nsMsgXFVirtualFolderDBView::GetMessageEnumerator(nsISimpleEnumerator **enumerator)
 {
   return GetViewEnumerator(enumerator);
 }
--- a/mailnews/base/src/nsMsgXFVirtualFolderDBView.h
+++ b/mailnews/base/src/nsMsgXFVirtualFolderDBView.h
@@ -19,27 +19,27 @@ class nsMsgXFVirtualFolderDBView : publi
 public:
   nsMsgXFVirtualFolderDBView();
   virtual ~nsMsgXFVirtualFolderDBView();
 
   // we override all the methods, currently. Might change...
   NS_DECL_NSIMSGSEARCHNOTIFY
 
   virtual const char * GetViewName(void) override {return "XFVirtualFolderView"; }
-  NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, 
+  NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder,
         nsMsgViewFlagsTypeValue viewFlags, int32_t *pCount) override;
-  NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, 
+  NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow,
                          nsIMsgDBViewCommandUpdater *aCmdUpdater, nsIMsgDBView **_retval) override;
-  NS_IMETHOD CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMessengerInstance, 
+  NS_IMETHOD CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMessengerInstance,
                         nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCmdUpdater) override;
   NS_IMETHOD Close() override;
   NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType) override;
   NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue command) override;
   NS_IMETHOD SetViewFlags(nsMsgViewFlagsTypeValue aViewFlags) override;
-  NS_IMETHOD OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, uint32_t *aStatus, 
+  NS_IMETHOD OnHdrPropertyChanged(nsIMsgDBHdr *aHdrToChange, bool aPreChange, uint32_t *aStatus,
                                  nsIDBChangeListener * aInstigator) override;
   NS_IMETHOD GetMsgFolder(nsIMsgFolder **aMsgFolder) override;
 
   virtual nsresult OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey parentKey, bool ensureListed) override;
   void UpdateCacheAndViewForPrevSearchedFolders(nsIMsgFolder *curSearchFolder);
   void UpdateCacheAndViewForFolder(nsIMsgFolder *folder, nsMsgKey *newHits, uint32_t numNewHits);
   void RemovePendingDBListeners();
 
--- a/mailnews/base/src/nsSpamSettings.cpp
+++ b/mailnews/base/src/nsSpamSettings.cpp
@@ -357,17 +357,17 @@ NS_IMETHODIMP nsSpamSettings::Initialize
       accountManager(do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIMsgAccount> account;
     rv = accountManager->FindAccountForServer(aServer, getter_AddRefs(account));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoCString accountKey;
-    if (account) 
+    if (account)
       account->GetKey(accountKey);
 
     // Loop through all accounts, adding emails from this account, as well as
     // from any accounts that defer to this account.
     mEmails.Clear();
     nsCOMPtr<nsIArray> accounts;
     rv = accountManager->GetAccounts(getter_AddRefs(accounts));
     NS_ENSURE_SUCCESS(rv, rv);
@@ -526,17 +526,17 @@ NS_IMETHODIMP nsSpamSettings::GetSpamFol
     return NS_ERROR_UNEXPECTED;
 
   nsCOMPtr <nsIMsgIncomingServer> server;
   rv = folder->GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv,rv);
 
   // see nsMsgFolder::SetPrettyName() for where the pretty name is set.
 
-  // Check for an existing junk folder - this will do a case-insensitive 
+  // Check for an existing junk folder - this will do a case-insensitive
   // search by URI - if we find a junk folder, use its URI.
   nsCOMPtr<nsIMsgFolder> junkFolder;
   folderURI.Append("/Junk");
   if (NS_SUCCEEDED(server->GetMsgFolderFromURI(nullptr, folderURI,
                                                getter_AddRefs(junkFolder))) &&
       junkFolder)
     junkFolder->GetURI(folderURI);
 
--- a/mailnews/base/src/nsSpamSettings.h
+++ b/mailnews/base/src/nsSpamSettings.h
@@ -27,25 +27,25 @@ public:
   NS_DECL_NSIURLLISTENER
 
 private:
   virtual ~nsSpamSettings();
 
   nsCOMPtr <nsIOutputStream> mLogStream;
   nsCOMPtr<nsIFile> mLogFile;
 
-  int32_t mLevel; 
+  int32_t mLevel;
   int32_t mPurgeInterval;
   int32_t mMoveTargetMode;
 
   bool mPurge;
   bool mUseWhiteList;
   bool mMoveOnSpam;
   bool mUseServerFilter;
-  
+
   nsCString mActionTargetAccount;
   nsCString mActionTargetFolder;
   nsCString mWhiteListAbURI;
   nsCString mCurrentJunkFolderURI; // used to detect changes to the spam folder in ::initialize
 
   nsCString mServerFilterName;
   nsCOMPtr<nsIFile> mServerFilterFile;
   int32_t  mServerFilterTrustFlags;
--- a/mailnews/base/src/nsStatusBarBiffManager.cpp
+++ b/mailnews/base/src/nsStatusBarBiffManager.cpp
@@ -50,18 +50,18 @@ nsStatusBarBiffManager::~nsStatusBarBiff
 
 nsresult nsStatusBarBiffManager::Init()
 {
   if (mInitialized)
     return NS_ERROR_ALREADY_INITIALIZED;
 
   nsresult rv;
 
-  nsCOMPtr<nsIMsgMailSession> mailSession = 
-    do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv); 
+  nsCOMPtr<nsIMsgMailSession> mailSession =
+    do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
   if(NS_SUCCEEDED(rv))
     mailSession->AddFolderListener(this, nsIFolderListener::intPropertyChanged);
 
   nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   bool chatEnabled = false;
   if (NS_SUCCEEDED(rv))
@@ -151,82 +151,82 @@ nsresult nsStatusBarBiffManager::PlayBif
     rv = mSound->PlayEventSound(nsISound::EVENT_NEW_MAIL_RECEIVED);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 #endif
   return rv;
 }
 
 // nsIFolderListener methods....
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsStatusBarBiffManager::OnItemAdded(nsIMsgFolder *parentItem, nsISupports *item)
 {
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsStatusBarBiffManager::OnItemRemoved(nsIMsgFolder *parentItem, nsISupports *item)
 {
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsStatusBarBiffManager::OnItemPropertyChanged(nsIMsgFolder *item, const nsACString &property, const char *oldValue, const char *newValue)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsStatusBarBiffManager::OnItemIntPropertyChanged(nsIMsgFolder *item, const nsACString &property, int64_t oldValue, int64_t newValue)
 {
   if (property.Equals(kBiffState) && mCurrentBiffState != newValue) {
     // if we got new mail, attempt to play a sound.
     // if we fail along the way, don't return.
-    // we still need to update the UI.    
+    // we still need to update the UI.
     if (newValue == nsIMsgFolder::nsMsgBiffState_NewMail) {
       // Get the folder's server type.
       nsCOMPtr<nsIMsgIncomingServer> server;
       nsresult rv = item->GetServer(getter_AddRefs(server));
       if (NS_SUCCEEDED(rv) && server)
         server->GetType(mServerType);
 
       // if we fail to play the biff sound, keep going.
       (void)PlayBiffSound(NEW_MAIL_PREF_BRANCH);
     }
     mCurrentBiffState = newValue;
 
     // don't care if notification fails
     nsCOMPtr<nsIObserverService> observerService =
       mozilla::services::GetObserverService();
-      
+
     if (observerService)
       observerService->NotifyObservers(static_cast<nsIStatusBarBiffManager*>(this), "mail:biff-state-changed", nullptr);
   }
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsStatusBarBiffManager::OnItemBoolPropertyChanged(nsIMsgFolder *item, const nsACString &property, bool oldValue, bool newValue)
 {
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsStatusBarBiffManager::OnItemUnicharPropertyChanged(nsIMsgFolder *item, const nsACString &property, const char16_t *oldValue, const char16_t *newValue)
 {
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsStatusBarBiffManager::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, const nsACString &property, uint32_t oldFlag, uint32_t newFlag)
 {
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsStatusBarBiffManager::OnItemEvent(nsIMsgFolder *item, const nsACString &event)
 {
   return NS_OK;
 }
 
 // nsIObserver implementation
 NS_IMETHODIMP
 nsStatusBarBiffManager::Observe(nsISupports *aSubject,
@@ -239,9 +239,9 @@ nsStatusBarBiffManager::Observe(nsISuppo
 // nsIStatusBarBiffManager method....
 NS_IMETHODIMP
 nsStatusBarBiffManager::GetBiffState(int32_t *aBiffState)
 {
   NS_ENSURE_ARG_POINTER(aBiffState);
   *aBiffState = mCurrentBiffState;
   return NS_OK;
 }
- 
+
--- a/mailnews/base/src/nsStatusBarBiffManager.h
+++ b/mailnews/base/src/nsStatusBarBiffManager.h
@@ -17,17 +17,17 @@ class nsStatusBarBiffManager : public ns
                                public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIFOLDERLISTENER
   NS_DECL_NSISTATUSBARBIFFMANAGER
   NS_DECL_NSIOBSERVER
 
-  nsStatusBarBiffManager(); 
+  nsStatusBarBiffManager();
   nsresult Init();
 
 private:
   virtual ~nsStatusBarBiffManager();
 
   bool     mInitialized;
   int32_t  mCurrentBiffState;
   nsCString mServerType;
--- a/mailnews/base/src/nsSubscribableServer.cpp
+++ b/mailnews/base/src/nsSubscribableServer.cpp
@@ -597,17 +597,17 @@ nsSubscribableServer::FindAndCreateNode(
   delimstr[0] = mDelimiter;
   delimstr[1] = '\0';
 
   *aResult = nullptr;
 
   SubscribeTreeNode *parent = mTreeRoot;
   SubscribeTreeNode *child = nullptr;
 
-  token = NS_strtok(delimstr, &rest); 
+  token = NS_strtok(delimstr, &rest);
   // special case paths that start with the hierarchy delimiter.
   // We want to include that delimiter in the first token name.
   if (token && pathStr[0] == mDelimiter)
     --token;
   while (token && *token) {
     rv = AddChildNode(parent, token, &child);
     if (NS_FAILED(rv))
       return rv;
--- a/mailnews/base/src/nsSubscribableServer.h
+++ b/mailnews/base/src/nsSubscribableServer.h
@@ -39,17 +39,17 @@ class nsSubscribableServer : public nsIS
 {
  public:
   nsSubscribableServer();
 
   nsresult Init();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISUBSCRIBABLESERVER
-  
+
 private:
   virtual ~nsSubscribableServer();
 
   nsresult ConvertNameToUnichar(const char *inStr, char16_t **outStr);
   nsCOMPtr <nsISubscribeListener> mSubscribeListener;
   nsCString mIncomingServerUri;
   nsCOMPtr <nsISubscribeDataSource> mSubscribeDS;
   char mDelimiter;
--- a/mailnews/base/src/nsSubscribeDataSource.cpp
+++ b/mailnews/base/src/nsSubscribeDataSource.cpp
@@ -26,17 +26,17 @@ static NS_DEFINE_CID(kRDFServiceCID, NS_
 nsSubscribeDataSource::nsSubscribeDataSource()
 {
 }
 
 nsSubscribeDataSource::~nsSubscribeDataSource()
 {
 }
 
-NS_IMPL_ISUPPORTS(nsSubscribeDataSource, nsIRDFDataSource, nsISubscribeDataSource) 
+NS_IMPL_ISUPPORTS(nsSubscribeDataSource, nsIRDFDataSource, nsISubscribeDataSource)
 
 nsresult
 nsSubscribeDataSource::Init()
 {
     nsresult rv;
 
     mRDFService = do_GetService(kRDFServiceCID, &rv);
     NS_ASSERTION(NS_SUCCEEDED(rv) && mRDFService, "failed to get rdf service");
@@ -70,26 +70,26 @@ nsSubscribeDataSource::Init()
     rv = mRDFService->GetLiteral(u"true", getter_AddRefs(kTrueLiteral));
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = mRDFService->GetLiteral(u"false", getter_AddRefs(kFalseLiteral));
     NS_ENSURE_SUCCESS(rv,rv);
 	return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsSubscribeDataSource::GetURI(char * *aURI)
 {
   if ((*aURI = strdup("rdf:subscribe")) == nullptr)
     return NS_ERROR_OUT_OF_MEMORY;
   else
     return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsSubscribeDataSource::GetSource(nsIRDFResource *property, nsIRDFNode *target, bool tv, nsIRDFResource **source)
 {
     NS_PRECONDITION(property != nullptr, "null ptr");
     if (! property)
         return NS_ERROR_NULL_POINTER;
 
     NS_PRECONDITION(target != nullptr, "null ptr");
     if (! target)
@@ -148,24 +148,24 @@ nsSubscribeDataSource::GetTarget(nsIRDFR
         nsCString childUri;
         rv = server->GetFirstChildURI(relativePath, childUri);
         if (NS_FAILED(rv)) return NS_RDF_NO_VALUE;
         if (childUri.IsEmpty()) return NS_RDF_NO_VALUE;
 
         nsCOMPtr <nsIRDFResource> childResource;
         rv = mRDFService->GetResource(childUri, getter_AddRefs(childResource));
         NS_ENSURE_SUCCESS(rv,rv);
-        
+
         return childResource->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) target);
     }
     else if (property == kNC_Subscribed.get()) {
         bool isSubscribed;
         rv = server->IsSubscribed(relativePath, &isSubscribed);
         NS_ENSURE_SUCCESS(rv,rv);
-    
+
         NS_IF_ADDREF(*target = isSubscribed ? kTrueLiteral : kFalseLiteral);
         return NS_OK;
     }
     else if (property == kNC_Subscribable.get()) {
         bool isSubscribable;
         rv = server->IsSubscribable(relativePath, &isSubscribable);
         NS_ENSURE_SUCCESS(rv,rv);
 
@@ -179,25 +179,25 @@ nsSubscribeDataSource::GetTarget(nsIRDFR
 
         nsCOMPtr<nsIRDFLiteral> serverType;
         rv = mRDFService->GetLiteral(NS_ConvertASCIItoUTF16(serverTypeStr).get(),
                                      getter_AddRefs(serverType));
         NS_ENSURE_SUCCESS(rv,rv);
 
         if (!serverType)
           rv = NS_RDF_NO_VALUE;
-        if (rv == NS_RDF_NO_VALUE) 
+        if (rv == NS_RDF_NO_VALUE)
           return rv;
         return serverType->QueryInterface(NS_GET_IID(nsIRDFNode), (void**) target);
     }
     else if (property == kNC_LeafName.get()) {
         nsString leafNameStr;
-        rv = server->GetLeafName(relativePath, leafNameStr); 
+        rv = server->GetLeafName(relativePath, leafNameStr);
         NS_ENSURE_SUCCESS(rv,rv);
-   
+
         nsCOMPtr<nsIRDFLiteral> leafName;
         rv = mRDFService->GetLiteral(leafNameStr.get(), getter_AddRefs(leafName));
         NS_ENSURE_SUCCESS(rv,rv);
 
         if (!leafName)
           rv = NS_RDF_NO_VALUE;
         if (rv == NS_RDF_NO_VALUE)
           return rv;
@@ -249,17 +249,17 @@ nsSubscribeDataSource::GetTargets(nsIRDF
             return NS_NewEmptyEnumerator(targets);
         }
         return rv;
     }
     else if (property == kNC_LeafName.get()) {
         nsString leafNameStr;
         rv = server->GetLeafName(relativePath, leafNameStr);
         NS_ENSURE_SUCCESS(rv,rv);
-    
+
         nsCOMPtr<nsIRDFLiteral> leafName;
         rv = mRDFService->GetLiteral(leafNameStr.get(), getter_AddRefs(leafName));
         NS_ENSURE_SUCCESS(rv,rv);
 
         return NS_NewSingletonEnumerator(targets, leafName);
     }
     else if (property == kNC_Subscribed.get()) {
         bool isSubscribed;
@@ -374,22 +374,22 @@ nsSubscribeDataSource::GetServerAndRelat
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = incomingServer->QueryInterface(NS_GET_IID(nsISubscribableServer), (void**)server);
     NS_ENSURE_SUCCESS(rv,rv);
 
     nsCString serverURI;
     rv = incomingServer->GetServerURI(serverURI);
     NS_ENSURE_SUCCESS(rv,rv);
- 
+
     uint32_t serverURILen = serverURI.Length();
     if (serverURILen == strlen(sourceURI))
       *relativePath = nullptr;
     else {
-      // XXX : perhaps, have to unescape before returning 
+      // XXX : perhaps, have to unescape before returning
       *relativePath = strdup(sourceURI + serverURILen + 1);
       if (!*relativePath)
         return NS_ERROR_OUT_OF_MEMORY;
     }
 
     return NS_OK;
 }
 
@@ -460,23 +460,23 @@ nsSubscribeDataSource::HasAssertion(nsIR
     else {
         // do nothing
     }
 
 	return NS_OK;
 }
 
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsSubscribeDataSource::HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *result)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsSubscribeDataSource::HasArcOut(nsIRDFResource *source, nsIRDFResource *aArc, bool *result)
 {
     nsresult rv = NS_OK;
 
     nsCOMPtr<nsISubscribableServer> server;
     nsCString relativePath;
 
     if (aArc == kNC_Child.get()) {
@@ -631,17 +631,17 @@ nsSubscribeDataSource::BeginUpdateBatch(
 NS_IMETHODIMP
 nsSubscribeDataSource::EndUpdateBatch()
 {
         return NS_OK;
 }
 
 
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 nsSubscribeDataSource::GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsISimpleEnumerator **_retval)
 {
   NS_ASSERTION(false, "Not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 #define NOTIFY_SUBSCRIBE_LISTENERS(propertyfunc_, params_) \
   PR_BEGIN_MACRO \
--- a/mailnews/base/src/nsSubscribeDataSource.h
+++ b/mailnews/base/src/nsSubscribeDataSource.h
@@ -27,17 +27,17 @@ public:
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRDFDATASOURCE
   NS_DECL_NSISUBSCRIBEDATASOURCE
 
 private:
   virtual ~nsSubscribeDataSource();
   nsCOMPtr <nsIRDFResource>      kNC_Child;
-  nsCOMPtr <nsIRDFResource>      kNC_Name;    
+  nsCOMPtr <nsIRDFResource>      kNC_Name;
   nsCOMPtr <nsIRDFResource>      kNC_LeafName;
   nsCOMPtr <nsIRDFResource>      kNC_Subscribed;
   nsCOMPtr <nsIRDFResource>      kNC_Subscribable;
   nsCOMPtr <nsIRDFResource>      kNC_ServerType;
   nsCOMPtr <nsIRDFLiteral>       kTrueLiteral;
   nsCOMPtr <nsIRDFLiteral>       kFalseLiteral;
 
   nsCOMPtr <nsIRDFService>       mRDFService;
--- a/mailnews/base/test/TestMsgStripRE.cpp
+++ b/mailnews/base/test/TestMsgStripRE.cpp
@@ -24,17 +24,17 @@ testStripRe(const char *encodedInput, ch
             bool expectedDidModify)
 {
   // call NS_StripRE with the appropriate args
   char *modifiedSubject;
   bool didModify;
   const char *encodedInout = encodedInput;
   uint32_t length = strlen(encodedInout);
   didModify = NS_MsgStripRE(&encodedInout, &length, &modifiedSubject);
-  
+
   // make sure we got the right results
   if (didModify != expectedDidModify)
     return 2;
 
   if (didModify) {
     if (strcmp(expectedOutput, modifiedSubject)) {
       return 3;
     }
@@ -55,42 +55,42 @@ int main(int argc, char** argv)
   if (xpcom.failed())
     return 1;
 
   nsresult rv;
   nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID,
                                      &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // create an nsISupportsString and stuff our literal into it   
-  nsCOMPtr<nsISupportsString> rePrefixes = 
+  // create an nsISupportsString and stuff our literal into it
+  nsCOMPtr<nsISupportsString> rePrefixes =
     do_CreateInstance("@mozilla.org/supports-string;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // portable C++ expression of "SV,ÆØÅ"
   static const unsigned char utf8Prefixes[] =
     {'S', 'V', ',', 0303, 0206, 0303, 0230, 0303, 0205, '\0'};
 
   rv = rePrefixes->SetData(NS_ConvertUTF8toUTF16(utf8Prefixes));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // set localizedRe pref
-  rv = prefBranch->SetComplexValue("mailnews.localizedRe", 
+  rv = prefBranch->SetComplexValue("mailnews.localizedRe",
                                    NS_GET_IID(nsISupportsString), rePrefixes);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // run our tests 
+  // run our tests
   struct testInfo testInfoStructs[] = {
     {"SV: =?ISO-8859-1?Q?=C6blegr=F8d?=", "=?ISO-8859-1?Q?=C6blegr=F8d?=",
      true},
     {"=?ISO-8859-1?Q?SV=3A=C6blegr=F8d?=", "=?ISO-8859-1?Q?=C6blegr=F8d?=",
      true},
 
      // Note that in the next two tests, the only ISO-8859-1 chars are in the
-     // localizedRe piece, so once they've been stripped, the re-encoding process 
+     // localizedRe piece, so once they've been stripped, the re-encoding process
      // simply writes out ASCII rather than an ISO-8859-1 encoded string with
      // no actual ISO-8859-1 special characters, which seems reasonable.
     {"=?ISO-8859-1?Q?=C6=D8=C5=3A_Foo_bar?=", "Foo bar", true},
     {"=?ISO-8859-1?Q?=C6=D8=C5=3AFoo_bar?=", "Foo bar", true}
   };
 
   bool allTestsPassed = true;
   int result;
@@ -103,11 +103,11 @@ int main(int argc, char** argv)
       fail("%s, i=%d | result=%d\n", __FILE__, i, result);
       allTestsPassed = false;
     }
   }
 
   if (allTestsPassed) {
     passed("all tests passed\n");
   }
-  
+
   return allTestsPassed ? 0 : 2;
 }