Bug 1326433 - Port bug 1323683 to mailnews: Whitespace fixes for modified files. r=jorgk CLOSED TREE

This commit is contained in:
Frank-Rainer Grahl 2016-12-30 22:53:15 +01:00
Родитель cb62e4b657
Коммит cdd2af8e3e
5 изменённых файлов: 70 добавлений и 70 удалений

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

@ -1,5 +1,5 @@
/* -*- 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/. */
@ -126,7 +126,7 @@ nsLDAPURL::SetPathInternal(const nsCString &aPath)
NS_ERROR("nsLDAPURL::SetSpec: out of memory ");
return NS_ERROR_OUT_OF_MEMORY;
case LDAP_URL_ERR_PARAM:
case LDAP_URL_ERR_PARAM:
return NS_ERROR_INVALID_POINTER;
}
@ -134,12 +134,12 @@ nsLDAPURL::SetPathInternal(const nsCString &aPath)
return NS_ERROR_UNEXPECTED;
}
// A string representation of the URI. Setting the spec
// A string representation of the URI. Setting the spec
// causes the new spec to be parsed, initializing the URI. Setting
// the spec (or any of the accessors) causes also any currently
// open streams on the URI's channel to be closed.
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::GetSpec(nsACString &_retval)
{
if (!mBaseURL)
@ -148,7 +148,7 @@ nsLDAPURL::GetSpec(nsACString &_retval)
return mBaseURL->GetSpec(_retval);
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::SetSpec(const nsACString &aSpec)
{
if (!mBaseURL)
@ -202,7 +202,7 @@ NS_IMETHODIMP nsLDAPURL::SetScheme(const nsACString &aScheme)
return mBaseURL->SetScheme(aScheme);
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::GetUserPass(nsACString &_retval)
{
_retval.Truncate();
@ -228,20 +228,20 @@ nsLDAPURL::SetUsername(const nsACString &aUsername)
return NS_OK;
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::GetPassword(nsACString &_retval)
{
_retval.Truncate();
return NS_OK;
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::SetPassword(const nsACString &aPassword)
{
return NS_OK;
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::GetHostPort(nsACString &_retval)
{
if (!mBaseURL)
@ -250,7 +250,7 @@ nsLDAPURL::GetHostPort(nsACString &_retval)
return mBaseURL->GetHostPort(_retval);
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::SetHostPort(const nsACString &aHostPort)
{
if (!mBaseURL)
@ -268,7 +268,7 @@ nsLDAPURL::SetHostAndPort(const nsACString &aHostPort)
return mBaseURL->SetHostAndPort(aHostPort);
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::GetHost(nsACString &_retval)
{
if (!mBaseURL)
@ -277,7 +277,7 @@ nsLDAPURL::GetHost(nsACString &_retval)
return mBaseURL->GetHost(_retval);
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::SetHost(const nsACString &aHost)
{
if (!mBaseURL)
@ -286,7 +286,7 @@ nsLDAPURL::SetHost(const nsACString &aHost)
return mBaseURL->SetHost(aHost);
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::GetPort(int32_t *_retval)
{
if (!mBaseURL)
@ -295,7 +295,7 @@ nsLDAPURL::GetPort(int32_t *_retval)
return mBaseURL->GetPort(_retval);
}
NS_IMETHODIMP
NS_IMETHODIMP
nsLDAPURL::SetPort(int32_t aPort)
{
if (!mBaseURL)

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

@ -18,7 +18,7 @@ nsAddbookUrl::nsAddbookUrl()
{
m_baseURL = do_CreateInstance(NS_SIMPLEURI_CONTRACTID);
mOperationType = nsIAddbookUrlOperation::InvalidUrl;
mOperationType = nsIAddbookUrlOperation::InvalidUrl;
}
nsAddbookUrl::~nsAddbookUrl()
@ -27,7 +27,7 @@ nsAddbookUrl::~nsAddbookUrl()
NS_IMPL_ISUPPORTS(nsAddbookUrl, nsIAddbookUrl, nsIURI)
NS_IMETHODIMP
NS_IMETHODIMP
nsAddbookUrl::SetSpec(const nsACString &aSpec)
{
nsresult rv = m_baseURL->SetSpec(aSpec);
@ -58,92 +58,92 @@ nsresult nsAddbookUrl::ParseUrl()
NS_IMETHODIMP nsAddbookUrl::GetSpec(nsACString &aSpec)
{
return m_baseURL->GetSpec(aSpec);
return m_baseURL->GetSpec(aSpec);
}
NS_IMETHODIMP nsAddbookUrl::GetPrePath(nsACString &aPrePath)
{
return m_baseURL->GetPrePath(aPrePath);
return m_baseURL->GetPrePath(aPrePath);
}
NS_IMETHODIMP nsAddbookUrl::GetScheme(nsACString &aScheme)
{
return m_baseURL->GetScheme(aScheme);
return m_baseURL->GetScheme(aScheme);
}
NS_IMETHODIMP nsAddbookUrl::SetScheme(const nsACString &aScheme)
{
return m_baseURL->SetScheme(aScheme);
return m_baseURL->SetScheme(aScheme);
}
NS_IMETHODIMP nsAddbookUrl::GetUserPass(nsACString &aUserPass)
{
return m_baseURL->GetUserPass(aUserPass);
return m_baseURL->GetUserPass(aUserPass);
}
NS_IMETHODIMP nsAddbookUrl::SetUserPass(const nsACString &aUserPass)
{
return m_baseURL->SetUserPass(aUserPass);
return m_baseURL->SetUserPass(aUserPass);
}
NS_IMETHODIMP nsAddbookUrl::GetUsername(nsACString &aUsername)
{
return m_baseURL->GetUsername(aUsername);
return m_baseURL->GetUsername(aUsername);
}
NS_IMETHODIMP nsAddbookUrl::SetUsername(const nsACString &aUsername)
{
return m_baseURL->SetUsername(aUsername);
return m_baseURL->SetUsername(aUsername);
}
NS_IMETHODIMP nsAddbookUrl::GetPassword(nsACString &aPassword)
{
return m_baseURL->GetPassword(aPassword);
return m_baseURL->GetPassword(aPassword);
}
NS_IMETHODIMP nsAddbookUrl::SetPassword(const nsACString &aPassword)
{
return m_baseURL->SetPassword(aPassword);
return m_baseURL->SetPassword(aPassword);
}
NS_IMETHODIMP nsAddbookUrl::GetHostPort(nsACString &aHostPort)
{
return m_baseURL->GetHostPort(aHostPort);
return m_baseURL->GetHostPort(aHostPort);
}
NS_IMETHODIMP nsAddbookUrl::SetHostPort(const nsACString &aHostPort)
{
return m_baseURL->SetHostPort(aHostPort);
return m_baseURL->SetHostPort(aHostPort);
}
NS_IMETHODIMP nsAddbookUrl::SetHostAndPort(const nsACString &aHostPort)
{
return m_baseURL->SetHostAndPort(aHostPort);
return m_baseURL->SetHostAndPort(aHostPort);
}
NS_IMETHODIMP nsAddbookUrl::GetHost(nsACString &aHost)
{
return m_baseURL->GetHost(aHost);
return m_baseURL->GetHost(aHost);
}
NS_IMETHODIMP nsAddbookUrl::SetHost(const nsACString &aHost)
{
return m_baseURL->SetHost(aHost);
return m_baseURL->SetHost(aHost);
}
NS_IMETHODIMP nsAddbookUrl::GetPort(int32_t *aPort)
{
return m_baseURL->GetPort(aPort);
return m_baseURL->GetPort(aPort);
}
NS_IMETHODIMP nsAddbookUrl::SetPort(int32_t aPort)
{
return m_baseURL->SetPort(aPort);
return m_baseURL->SetPort(aPort);
}
NS_IMETHODIMP nsAddbookUrl::GetPath(nsACString &aPath)
{
return m_baseURL->GetPath(aPath);
return m_baseURL->GetPath(aPath);
}
NS_IMETHODIMP nsAddbookUrl::SetPath(const nsACString &aPath)
@ -154,17 +154,17 @@ NS_IMETHODIMP nsAddbookUrl::SetPath(const nsACString &aPath)
NS_IMETHODIMP nsAddbookUrl::GetAsciiHost(nsACString &aHostA)
{
return m_baseURL->GetAsciiHost(aHostA);
return m_baseURL->GetAsciiHost(aHostA);
}
NS_IMETHODIMP nsAddbookUrl::GetAsciiHostPort(nsACString &aHostPortA)
{
return m_baseURL->GetAsciiHostPort(aHostPortA);
return m_baseURL->GetAsciiHostPort(aHostPortA);
}
NS_IMETHODIMP nsAddbookUrl::GetAsciiSpec(nsACString &aSpecA)
{
return m_baseURL->GetAsciiSpec(aSpecA);
return m_baseURL->GetAsciiSpec(aSpecA);
}
NS_IMETHODIMP nsAddbookUrl::GetOriginCharset(nsACString &aOriginCharset)
@ -174,7 +174,7 @@ NS_IMETHODIMP nsAddbookUrl::GetOriginCharset(nsACString &aOriginCharset)
NS_IMETHODIMP nsAddbookUrl::SchemeIs(const char *aScheme, bool *_retval)
{
return m_baseURL->SchemeIs(aScheme, _retval);
return m_baseURL->SchemeIs(aScheme, _retval);
}
NS_IMETHODIMP nsAddbookUrl::Equals(nsIURI *other, bool *_retval)
@ -230,7 +230,7 @@ nsAddbookUrl::CloneWithNewRef(const nsACString& newRef, nsIURI** _retval)
return CloneInternal(eReplaceRef, newRef, _retval);
}
NS_IMETHODIMP nsAddbookUrl::Resolve(const nsACString &relativePath, nsACString &result)
NS_IMETHODIMP nsAddbookUrl::Resolve(const nsACString &relativePath, nsACString &result)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -298,7 +298,7 @@ nsAddbookUrl::GetHasRef(bool *result)
//
// Specific nsAddbookUrl operations
//
NS_IMETHODIMP
NS_IMETHODIMP
nsAddbookUrl::GetAddbookOperation(int32_t *_retval)
{
*_retval = mOperationType;

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

@ -52,7 +52,7 @@ nsMsgMailNewsUrl::~nsMsgMailNewsUrl()
{
PR_FREEIF(m_errorMessage);
}
NS_IMPL_ISUPPORTS(nsMsgMailNewsUrl, nsIMsgMailNewsUrl, nsIURL, nsIURI)
////////////////////////////////////////////////////////////////////////////////////
@ -74,7 +74,7 @@ nsresult nsMsgMailNewsUrl::SetUrlState(bool aRunningUrl, nsresult aExitCode)
return NS_OK;
m_runningUrl = aRunningUrl;
nsCOMPtr <nsIMsgStatusFeedback> statusFeedback;
// put this back - we need it for urls that don't run through the doc loader
if (NS_SUCCEEDED(GetStatusFeedback(getter_AddRefs(statusFeedback))) && statusFeedback)
{
@ -86,7 +86,7 @@ nsresult nsMsgMailNewsUrl::SetUrlState(bool aRunningUrl, nsresult aExitCode)
statusFeedback->StopMeteors();
}
}
if (m_runningUrl)
{
NOTIFY_URL_LISTENERS(OnStartRunningUrl, (this));
@ -96,7 +96,7 @@ nsresult nsMsgMailNewsUrl::SetUrlState(bool aRunningUrl, nsresult aExitCode)
NOTIFY_URL_LISTENERS(OnStopRunningUrl, (this, aExitCode));
mUrlListeners.Clear();
}
return NS_OK;
}
@ -147,16 +147,16 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServer(nsIMsgIncomingServer ** aIncomingServe
if (scheme.EqualsLiteral("news"))
scheme.Assign("nntp");
url->SetScheme(scheme);
nsCOMPtr<nsIMsgAccountManager> accountManager =
nsCOMPtr<nsIMsgAccountManager> accountManager =
do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIMsgIncomingServer> server;
rv = accountManager->FindServerByURI(url, false,
aIncomingServer);
if (!*aIncomingServer && scheme.EqualsLiteral("imap"))
{
// look for any imap server with this host name so clicking on
// look for any imap server with this host name so clicking on
// other users folder urls will work. We could override this method
// for imap urls, or we could make caching of servers work and
// just set the server in the imap code for this case.
@ -173,7 +173,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetMsgWindow(nsIMsgWindow **aMsgWindow)
{
NS_ENSURE_ARG_POINTER(aMsgWindow);
*aMsgWindow = nullptr;
nsCOMPtr<nsIMsgWindow> msgWindow(do_QueryReferent(m_msgWindowWeak));
msgWindow.swap(*aMsgWindow);
return *aMsgWindow ? NS_OK : NS_ERROR_NULL_POINTER;
@ -264,7 +264,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::SetUpdatingFolder(bool updatingFolder)
NS_IMETHODIMP nsMsgMailNewsUrl::GetMsgIsInLocalCache(bool *aMsgIsInLocalCache)
{
NS_ENSURE_ARG(aMsgIsInLocalCache);
NS_ENSURE_ARG(aMsgIsInLocalCache);
*aMsgIsInLocalCache = m_msgIsInLocalCache;
return NS_OK;
}
@ -277,7 +277,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::SetMsgIsInLocalCache(bool aMsgIsInLocalCache)
NS_IMETHODIMP nsMsgMailNewsUrl::GetSuppressErrorMsgs(bool *aSuppressErrorMsgs)
{
NS_ENSURE_ARG(aSuppressErrorMsgs);
NS_ENSURE_ARG(aSuppressErrorMsgs);
*aSuppressErrorMsgs = m_suppressErrorMsgs;
return NS_OK;
}
@ -560,7 +560,7 @@ nsMsgMailNewsUrl::CloneWithNewRef(const nsACString& newRef, nsIURI** _retval)
return CloneInternal(nsIMsgMailNewsUrl::REPLACE_REF, newRef, _retval);
}
NS_IMETHODIMP nsMsgMailNewsUrl::Resolve(const nsACString &relativePath, nsACString &result)
NS_IMETHODIMP nsMsgMailNewsUrl::Resolve(const nsACString &relativePath, nsACString &result)
{
// only resolve anchor urls....i.e. urls which start with '#' against the mailnews url...
// everything else shouldn't be resolved against mailnews urls.
@ -784,11 +784,11 @@ nsMsgSaveAsListener::OnStopRequest(nsIRequest *request, nsISupports * aCtxt, nsr
m_outputStream->Close();
}
return NS_OK;
}
}
NS_IMETHODIMP nsMsgSaveAsListener::OnDataAvailable(nsIRequest* request,
NS_IMETHODIMP nsMsgSaveAsListener::OnDataAvailable(nsIRequest* request,
nsISupports* aSupport,
nsIInputStream* inStream,
nsIInputStream* inStream,
uint64_t srcOffset,
uint32_t count)
{
@ -806,10 +806,10 @@ NS_IMETHODIMP nsMsgSaveAsListener::OnDataAvailable(nsIRequest* request,
nsCOMPtr <nsIMsgMessageUrl> msgUrl = do_QueryInterface(aSupport);
if (msgUrl)
msgUrl->GetCanonicalLineEnding(&useCanonicalEnding);
const char *lineEnding = (useCanonicalEnding) ? CRLF : MSG_LINEBREAK;
uint32_t lineEndingLength = (useCanonicalEnding) ? 2 : MSG_LINEBREAK_LEN;
uint32_t readCount, maxReadCount = SAVE_BUF_SIZE - m_leftOver;
uint32_t writeCount;
char *start, *end, lastCharInPrevBuf = '\0';
@ -885,7 +885,7 @@ NS_IMETHODIMP nsMsgSaveAsListener::OnDataAvailable(nsIRequest* request,
lastCharInPrevBuf = *end;
}
return rv;
// rv = m_outputStream->WriteFrom(inStream, std::min(available, count), &bytesWritten);
}
@ -931,7 +931,7 @@ nsresult nsMsgSaveAsListener::SetupMsgWriteStream(nsIFile *aFile, bool addDummyE
}
NS_IMETHODIMP nsMsgMailNewsUrl::GetSaveAsListener(bool addDummyEnvelope,
NS_IMETHODIMP nsMsgMailNewsUrl::GetSaveAsListener(bool addDummyEnvelope,
nsIFile *aFile, nsIStreamListener **aSaveListener)
{
NS_ENSURE_ARG_POINTER(aSaveListener);

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

@ -27,7 +27,7 @@
///////////////////////////////////////////////////////////////////////////////////
// Okay, I found that all of the mail and news url interfaces needed to support
// several common interfaces (in addition to those provided through nsIURI).
// several common interfaces (in addition to those provided through nsIURI).
// So I decided to group them all in this implementation so we don't have to
// duplicate the code.
//
@ -64,10 +64,10 @@ protected:
bool m_msgIsInLocalCache;
bool m_suppressErrorMsgs;
// the following field is really a bit of a hack to make
// the following field is really a bit of a hack to make
// open attachments work. The external applications code sometimes tries to figure out the right
// handler to use by looking at the file extension of the url we are trying to load. Unfortunately,
// the attachment file name really isn't part of the url string....so we'll store it here...and if
// the attachment file name really isn't part of the url string....so we'll store it here...and if
// the url we are running is an attachment url, we'll set it here. Then when the helper apps code
// asks us for it, we'll return the right value.
nsCString mAttachmentFileName;

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

@ -97,7 +97,7 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
switch (NS_ToUpper(decodedName.First()))
{
/* DO NOT support attachment= in mailto urls. This poses a security fire hole!!!
/* DO NOT support attachment= in mailto urls. This poses a security fire hole!!!
case 'A':
if (!PL_strcasecmp (token, "attachment"))
m_attachmentPart = value;
@ -112,7 +112,7 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
escapedBccPart += value;
}
else
escapedBccPart = value;
escapedBccPart = value;
}
else if (decodedName.LowerCaseEqualsLiteral("body"))
{
@ -125,7 +125,7 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
escapedBodyPart = value;
}
break;
case 'C':
case 'C':
if (decodedName.LowerCaseEqualsLiteral("cc"))
{
if (!escapedCcPart.IsEmpty())
@ -137,7 +137,7 @@ nsresult nsMailtoUrl::ParseMailtoUrl(char * searchPart)
escapedCcPart = value;
}
break;
case 'F':
case 'F':
if (decodedName.LowerCaseEqualsLiteral("followup-to"))
escapedFollowUpToPart = value;
else if (decodedName.LowerCaseEqualsLiteral("from"))
@ -271,7 +271,7 @@ nsresult nsMailtoUrl::CleanupMailtoState()
m_ccPart = "";
m_subjectPart = "";
m_newsgroupPart = "";
m_newsHostPart = "";
m_newsHostPart = "";
m_referencePart = "";
m_bodyPart = "";
m_bccPart = "";
@ -638,12 +638,12 @@ nsSmtpUrl::nsSmtpUrl() : nsMsgMailNewsUrl()
m_requestDSN = false;
m_verifyLogon = false;
}
nsSmtpUrl::~nsSmtpUrl()
{
}
NS_IMPL_ISUPPORTS_INHERITED(nsSmtpUrl, nsMsgMailNewsUrl, nsISmtpUrl)
NS_IMPL_ISUPPORTS_INHERITED(nsSmtpUrl, nsMsgMailNewsUrl, nsISmtpUrl)
////////////////////////////////////////////////////////////////////////////////////
// Begin nsISmtpUrl specific support
@ -695,7 +695,7 @@ NS_IMETHODIMP nsSmtpUrl::GetPostMessageFile(nsIFile ** aFile)
NS_IMPL_GETSET(nsSmtpUrl, RequestDSN, bool, m_requestDSN)
NS_IMETHODIMP
NS_IMETHODIMP
nsSmtpUrl::SetDsnEnvid(const nsACString &aDsnEnvid)
{
m_dsnEnvid = aDsnEnvid;