From e425259e0db80c895afca852887c3e694468e3cc Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 4 Jan 2005 19:31:31 +0000 Subject: [PATCH] Make people that want empty strings use EmptyC?String(). Bug 232691, patch by Daniel Kraft , r=jst, sr=bzbarsky --- accessible/src/xul/nsXULTreeAccessible.cpp | 2 +- .../src/nsNetscapeProfileMigratorBase.cpp | 2 +- .../components/shell/src/nsGNOMEShellService.cpp | 2 +- content/html/content/src/nsFormSubmission.cpp | 2 +- editor/libeditor/html/TypeInState.cpp | 4 ++-- .../browser/powerplant/source/CBrowserShell.cpp | 6 +++--- extensions/sql/base/src/mozSqlResult.cpp | 2 +- extensions/sroaming/src/Stream.cpp | 2 +- extensions/xforms/nsXFormsSetValueElement.cpp | 2 +- extensions/xforms/nsXFormsUtils.cpp | 4 ++-- gfx/src/windows/nsFontMetricsWin.cpp | 2 +- layout/xul/base/src/nsXULTooltipListener.cpp | 2 +- .../src/nsNetscapeProfileMigratorBase.cpp | 2 +- .../migration/src/nsSeamonkeyProfileMigrator.cpp | 2 +- mailnews/base/util/nsMsgMailNewsUrl.cpp | 2 +- mailnews/imap/src/nsImapService.cpp | 2 +- netwerk/base/src/nsURLHelperOSX.cpp | 2 +- profile/src/nsProfileAccess.cpp | 2 +- .../satchel/src/nsFormFillController.cpp | 2 +- toolkit/components/startup/src/nsAppStartup.cpp | 2 +- widget/src/mac/nsFilePicker.cpp | 6 +++--- xpcom/build/dlldeps.cpp | 4 ++-- xpcom/io/nsLocalFileMac.cpp | 6 +++--- xpcom/io/nsLocalFileOS2.cpp | 14 +++++++------- xpcom/io/nsLocalFileWin.cpp | 12 ++++++------ .../search/src/nsInternetSearchService.cpp | 2 +- 26 files changed, 46 insertions(+), 46 deletions(-) diff --git a/accessible/src/xul/nsXULTreeAccessible.cpp b/accessible/src/xul/nsXULTreeAccessible.cpp index 09867e14903..a8a646d46c0 100644 --- a/accessible/src/xul/nsXULTreeAccessible.cpp +++ b/accessible/src/xul/nsXULTreeAccessible.cpp @@ -662,7 +662,7 @@ NS_IMETHODIMP nsXULTreeitemAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE); // This Bounds are based on Tree's coord - mTree->GetCoordsForCellItem(mRow, mColumn, NS_LITERAL_CSTRING(""), x, y, width, height); + mTree->GetCoordsForCellItem(mRow, mColumn, EmptyCString(), x, y, width, height); // Get treechildren's BoxObject to adjust the Bounds' upper left corner // XXXvarga consider using mTree->GetTreeBody() diff --git a/browser/components/migration/src/nsNetscapeProfileMigratorBase.cpp b/browser/components/migration/src/nsNetscapeProfileMigratorBase.cpp index 0c915f4d97f..5e51864a201 100644 --- a/browser/components/migration/src/nsNetscapeProfileMigratorBase.cpp +++ b/browser/components/migration/src/nsNetscapeProfileMigratorBase.cpp @@ -126,7 +126,7 @@ nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry(nsILocalFile* aRegistr nsCOMPtr dir; #ifdef XP_MACOSX - rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(dir)); + rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(dir)); if (NS_FAILED(rv)) return rv; dir->SetPersistentDescriptor(NS_LossyConvertUCS2toASCII(directory)); #else diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp index 12789a788ed..454a127c186 100644 --- a/browser/components/shell/src/nsGNOMEShellService.cpp +++ b/browser/components/shell/src/nsGNOMEShellService.cpp @@ -539,7 +539,7 @@ nsGNOMEShellService::SetDesktopBackground(nsIDOMElement* aElement, // (since we could be writing a new image on top of an existing // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes) gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), - NS_LITERAL_CSTRING("")); + EmptyCString()); gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), filePath); gconf->SetBool(NS_LITERAL_CSTRING(kDesktopDrawBGKey), PR_TRUE); diff --git a/content/html/content/src/nsFormSubmission.cpp b/content/html/content/src/nsFormSubmission.cpp index ecaf98832fb..6c4f94ce476 100644 --- a/content/html/content/src/nsFormSubmission.cpp +++ b/content/html/content/src/nsFormSubmission.cpp @@ -1109,7 +1109,7 @@ SendJSWarning(nsIHTMLContent* aContent, aWarningName, aWarningArgs, aWarningArgsLen, documentURI, - NS_LITERAL_STRING(""), 0, 0, + EmptyString(), 0, 0, nsIScriptError::warningFlag, "HTML"); } diff --git a/editor/libeditor/html/TypeInState.cpp b/editor/libeditor/html/TypeInState.cpp index cd8c339bb3e..ed27e0cf87b 100644 --- a/editor/libeditor/html/TypeInState.cpp +++ b/editor/libeditor/html/TypeInState.cpp @@ -223,7 +223,7 @@ nsresult TypeInState::ClearProp(nsIAtom *aProp, const nsString &aAttr) if (IsPropCleared(aProp,aAttr)) return NS_OK; // make a new propitem - PropItem *item = new PropItem(aProp,aAttr,nsAutoString()); + PropItem *item = new PropItem(aProp,aAttr,EmptyString()); if (!item) return NS_ERROR_OUT_OF_MEMORY; // remove it from the list of set properties, if we have a match @@ -413,7 +413,7 @@ PRBool TypeInState::IsPropCleared(nsIAtom *aProp, { if (FindPropInList(aProp, aAttr, nsnull, mClearedArray, outIndex)) return PR_TRUE; - if (FindPropInList(0, nsAutoString(), nsnull, mClearedArray, outIndex)) + if (FindPropInList(0, EmptyString(), nsnull, mClearedArray, outIndex)) { // special case for all props cleared outIndex = -1; diff --git a/embedding/browser/powerplant/source/CBrowserShell.cpp b/embedding/browser/powerplant/source/CBrowserShell.cpp index 3bad537558b..4b342ce4ca7 100644 --- a/embedding/browser/powerplant/source/CBrowserShell.cpp +++ b/embedding/browser/powerplant/source/CBrowserShell.cpp @@ -619,7 +619,7 @@ Boolean CBrowserShell::ObeyCommand(PP_PowerPlant::CommandT inCommand, void* ioPa rv = GetCurrentURL(currentURL); ThrowIfError_(rv); currentURL.Insert("view-source:", 0); - PostOpenURLEvent(currentURL, nsCString()); + PostOpenURLEvent(currentURL, EmptyCString()); } break; @@ -661,7 +661,7 @@ Boolean CBrowserShell::ObeyCommand(PP_PowerPlant::CommandT inCommand, void* ioPa rv = imgURI->GetSpec(temp); ThrowIfError_(rv); if (inCommand == cmd_ViewImage) - PostOpenURLEvent(temp, nsCString()); + PostOpenURLEvent(temp, EmptyCString()); else UScrap::SetData(kScrapFlavorTypeText, temp.get(), temp.Length()); } @@ -676,7 +676,7 @@ Boolean CBrowserShell::ObeyCommand(PP_PowerPlant::CommandT inCommand, void* ioPa nsCAutoString temp; rv = uri->GetSpec(temp); ThrowIfError_(rv); - PostOpenURLEvent(temp, nsCString()); + PostOpenURLEvent(temp, EmptyCString()); } break; diff --git a/extensions/sql/base/src/mozSqlResult.cpp b/extensions/sql/base/src/mozSqlResult.cpp index 537ba80b8e8..b3a7f489fc7 100644 --- a/extensions/sql/base/src/mozSqlResult.cpp +++ b/extensions/sql/base/src/mozSqlResult.cpp @@ -92,7 +92,7 @@ mozSqlResult::Init() rv = gRDFService->GetLiteral(NS_LITERAL_STRING("null").get(), &kNullLiteral); if (NS_FAILED(rv)) return rv; - rv = gRDFService->GetLiteral(NS_LITERAL_STRING("").get(), &kEmptyLiteral); + rv = gRDFService->GetLiteral(EmptyString().get(), &kEmptyLiteral); if (NS_FAILED(rv)) return rv; rv = gRDFService->GetLiteral(NS_LITERAL_STRING("true").get(), &kTrueLiteral); if (NS_FAILED(rv)) return rv; diff --git a/extensions/sroaming/src/Stream.cpp b/extensions/sroaming/src/Stream.cpp index f26409578d4..3b9889c3fa4 100644 --- a/extensions/sroaming/src/Stream.cpp +++ b/extensions/sroaming/src/Stream.cpp @@ -255,7 +255,7 @@ nsresult Stream::DownUpLoad(PRBool download) ioParamBlock->SetString(2, NS_ConvertUTF8toUTF16(mRemoteBaseUrl).get()); ioParamBlock->SetString(3, mSavePassword ? mPassword.get() - : NS_LITERAL_STRING("").get()); + : EmptyString().get()); // filenames for (PRInt32 i = files->Count() - 1; i >= 0; i--) diff --git a/extensions/xforms/nsXFormsSetValueElement.cpp b/extensions/xforms/nsXFormsSetValueElement.cpp index 754d181eb1e..e4b4f44130b 100644 --- a/extensions/xforms/nsXFormsSetValueElement.cpp +++ b/extensions/xforms/nsXFormsSetValueElement.cpp @@ -81,7 +81,7 @@ nsXFormsSetValueElement::HandleAction(nsIDOMEvent* aEvent, // XXXfixme when xpath extensions are implemented (instance()) nsCOMPtr instanceDoc; - model->GetInstanceDocument(NS_LITERAL_STRING(""), + model->GetInstanceDocument(EmptyString(), getter_AddRefs(instanceDoc)); if (!instanceDoc) return NS_OK; diff --git a/extensions/xforms/nsXFormsUtils.cpp b/extensions/xforms/nsXFormsUtils.cpp index 4fa884d2618..b19b49a343c 100644 --- a/extensions/xforms/nsXFormsUtils.cpp +++ b/extensions/xforms/nsXFormsUtils.cpp @@ -351,7 +351,7 @@ nsXFormsUtils::FindBindContext(nsIDOMElement *aElement, if (parentNode == modelNode) { // This is the outermost bind. nsCOMPtr instanceDoc; - aModel->GetInstanceDocument(NS_LITERAL_STRING(""), + aModel->GetInstanceDocument(EmptyString(), getter_AddRefs(instanceDoc)); if (!instanceDoc) return nsnull; @@ -471,7 +471,7 @@ nsXFormsUtils::EvaluateNodeBinding(nsIDOMElement *aElement, return nsnull; } - model->GetInstanceDocument(NS_LITERAL_STRING(""), + model->GetInstanceDocument(EmptyString(), getter_AddRefs(instanceDoc)); if (!instanceDoc) diff --git a/gfx/src/windows/nsFontMetricsWin.cpp b/gfx/src/windows/nsFontMetricsWin.cpp index 6217ded6569..424f9806757 100644 --- a/gfx/src/windows/nsFontMetricsWin.cpp +++ b/gfx/src/windows/nsFontMetricsWin.cpp @@ -2738,7 +2738,7 @@ nsFontMetricsWin::FindSubstituteFont(HDC aDC, PRUint32 c) // We are running out of resources if we reach here... Try a stock font NS_ASSERTION(::GetMapMode(aDC) == MM_TEXT, "mapping mode needs to be MM_TEXT"); - nsFontWin* font = LoadSubstituteFont(aDC, nsString()); + nsFontWin* font = LoadSubstituteFont(aDC, EmptyString()); if (font) { ((nsFontWinSubstitute*)font)->SetRepresentable(c); mSubstituteFont = font; diff --git a/layout/xul/base/src/nsXULTooltipListener.cpp b/layout/xul/base/src/nsXULTooltipListener.cpp index 97039b416ec..a0a707839af 100644 --- a/layout/xul/base/src/nsXULTooltipListener.cpp +++ b/layout/xul/base/src/nsXULTooltipListener.cpp @@ -420,7 +420,7 @@ GetTreeCellCoords(nsITreeBoxObject* aTreeBox, nsIContent* aSourceNode, PRInt32 aRow, nsITreeColumn* aCol, PRInt32* aX, PRInt32* aY) { PRInt32 junk; - aTreeBox->GetCoordsForCellItem(aRow, aCol, NS_LITERAL_CSTRING(""), aX, aY, &junk, &junk); + aTreeBox->GetCoordsForCellItem(aRow, aCol, EmptyCString(), aX, aY, &junk, &junk); nsCOMPtr xulEl(do_QueryInterface(aSourceNode)); nsCOMPtr bx; xulEl->GetBoxObject(getter_AddRefs(bx)); diff --git a/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp b/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp index 4fed3a059db..7a4ef7cc6ac 100644 --- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp +++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp @@ -125,7 +125,7 @@ nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry(nsILocalFile* aRegistr nsCOMPtr dir; #ifdef XP_MACOSX - rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(dir)); + rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(dir)); if (NS_FAILED(rv)) return rv; dir->SetPersistentDescriptor(NS_LossyConvertUCS2toASCII(directory)); #else diff --git a/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp b/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp index 42ff5cf3a74..23204d0c6ae 100644 --- a/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp +++ b/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp @@ -119,7 +119,7 @@ void nsSeamonkeyProfileMigrator::CopyNextFolder() fileTransactionEntry* fileTransaction = (fileTransactionEntry*) mFileCopyTransactions->SafeElementAt(mFileCopyTransactionIndex++); if (fileTransaction) // copy the file { - fileTransaction->srcFile->CopyTo(fileTransaction->destFile, nsString()); + fileTransaction->srcFile->CopyTo(fileTransaction->destFile, EmptyString()); // add to our current progress PRInt64 fileSize; diff --git a/mailnews/base/util/nsMsgMailNewsUrl.cpp b/mailnews/base/util/nsMsgMailNewsUrl.cpp index bf8ab0deb4f..a642545c743 100644 --- a/mailnews/base/util/nsMsgMailNewsUrl.cpp +++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp @@ -203,7 +203,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServer(nsIMsgIncomingServer ** aIncomingServe // 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. - url->SetUserPass(NS_LITERAL_CSTRING("")); + url->SetUserPass(EmptyCString()); rv = accountManager->FindServerByURI(url, PR_FALSE, aIncomingServer); } diff --git a/mailnews/imap/src/nsImapService.cpp b/mailnews/imap/src/nsImapService.cpp index e991799a2f4..ddfe7bf5ca0 100644 --- a/mailnews/imap/src/nsImapService.cpp +++ b/mailnews/imap/src/nsImapService.cpp @@ -2675,7 +2675,7 @@ nsresult nsImapService::GetServerFromUrl(nsIImapUrl *aImapUrl, nsIMsgIncomingSer rv = url->SetSpec(turl); if (NS_FAILED(rv)) return rv; - url->SetUserPass(NS_LITERAL_CSTRING("")); + url->SetUserPass(EmptyCString()); rv = accountManager->FindServerByURI(url, PR_FALSE, aServer); if (*aServer) aImapUrl->SetExternalLinkUrl(PR_TRUE); diff --git a/netwerk/base/src/nsURLHelperOSX.cpp b/netwerk/base/src/nsURLHelperOSX.cpp index cdb97602b57..906f93d79bd 100644 --- a/netwerk/base/src/nsURLHelperOSX.cpp +++ b/netwerk/base/src/nsURLHelperOSX.cpp @@ -181,7 +181,7 @@ net_GetFileFromURLSpec(const nsACString &aURL, nsIFile **result) nsresult rv; nsCOMPtr localFile; - rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(localFile)); + rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(localFile)); if (NS_FAILED(rv)) return rv; diff --git a/profile/src/nsProfileAccess.cpp b/profile/src/nsProfileAccess.cpp index eaea4679b58..10e389ac6aa 100644 --- a/profile/src/nsProfileAccess.cpp +++ b/profile/src/nsProfileAccess.cpp @@ -1471,7 +1471,7 @@ nsresult ProfileStruct::InternalizeMigratedFromLocation(nsIRegistry *aRegistry, if (NS_SUCCEEDED(rv)) { #if defined(XP_MAC) || defined(XP_MACOSX) - rv = NS_NewLocalFile(nsString(), PR_TRUE, getter_AddRefs(tempLocal)); + rv = NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(tempLocal)); if (NS_SUCCEEDED(rv)) { // The persistent desc on Mac is base64 encoded so plain ASCII diff --git a/toolkit/components/satchel/src/nsFormFillController.cpp b/toolkit/components/satchel/src/nsFormFillController.cpp index e252b063c83..7f3d5d110ee 100644 --- a/toolkit/components/satchel/src/nsFormFillController.cpp +++ b/toolkit/components/satchel/src/nsFormFillController.cpp @@ -732,7 +732,7 @@ nsFormFillController::MouseClick(nsIDOMEvent* aMouseEvent) input->GetTextValue(value); if (value.Length() > 0) { // Show the popup with a filtered result set - mController->SetSearchString(NS_LITERAL_STRING("")); + mController->SetSearchString(EmptyString()); mController->HandleText(PR_TRUE); } else { // Show the popup with the complete result set. Can't use HandleText() diff --git a/toolkit/components/startup/src/nsAppStartup.cpp b/toolkit/components/startup/src/nsAppStartup.cpp index 014aa0b8b4b..f9ccd4c5766 100644 --- a/toolkit/components/startup/src/nsAppStartup.cpp +++ b/toolkit/components/startup/src/nsAppStartup.cpp @@ -531,7 +531,7 @@ nsAppStartup::LaunchTask(const char *aParam, PRInt32 height, PRInt32 width, PRBo #endif } else { - rv = OpenWindow(chromeUrlForTask, nsString(), width, height); + rv = OpenWindow(chromeUrlForTask, EmptyString(), width, height); } // If we get here without an error, then a window was opened OK. diff --git a/widget/src/mac/nsFilePicker.cpp b/widget/src/mac/nsFilePicker.cpp index 86c0666d9e2..de996a1682c 100644 --- a/widget/src/mac/nsFilePicker.cpp +++ b/widget/src/mac/nsFilePicker.cpp @@ -431,7 +431,7 @@ nsFilePicker::GetLocalFiles(const nsString& inTitle, PRBool inAllowMultiple, nsC if (anErr == noErr) { nsCOMPtr localFile; - NS_NewLocalFile(nsString(), PR_TRUE, getter_AddRefs(localFile)); + NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile)); nsCOMPtr macLocalFile = do_QueryInterface(localFile); if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithFSRef(&theFSRef))) outFiles.AppendObject(localFile); @@ -525,7 +525,7 @@ nsFilePicker::GetLocalFolder(const nsString& inTitle, nsILocalFile** outFile) if (anErr == noErr) { nsCOMPtr localFile; - NS_NewLocalFile(nsString(), PR_TRUE, getter_AddRefs(localFile)); + NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile)); nsCOMPtr macLocalFile = do_QueryInterface(localFile); if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithFSRef(&theFSRef))) { @@ -634,7 +634,7 @@ nsFilePicker::PutLocalFile(const nsString& inTitle, const nsString& inDefaultNam if (fileURL) { nsCOMPtr localFile; - NS_NewLocalFile(nsString(), PR_TRUE, getter_AddRefs(localFile)); + NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile)); nsCOMPtr macLocalFile = do_QueryInterface(localFile); if (macLocalFile && NS_SUCCEEDED(macLocalFile->InitWithCFURL(fileURL))) { diff --git a/xpcom/build/dlldeps.cpp b/xpcom/build/dlldeps.cpp index 7df355ebf63..b07134798a9 100644 --- a/xpcom/build/dlldeps.cpp +++ b/xpcom/build/dlldeps.cpp @@ -147,8 +147,8 @@ void XXXNeverCalled() nsPrintfCString bar(""); nsLinebreakConverter::ConvertStringLineBreaks(foo, nsLinebreakConverter::eLinebreakAny, nsLinebreakConverter::eLinebreakContent); - NS_NewLocalFile(nsString(), PR_FALSE, nsnull); - NS_NewNativeLocalFile(nsCString(), PR_FALSE, nsnull); + NS_NewLocalFile(EmptyString(), PR_FALSE, nsnull); + NS_NewNativeLocalFile(EmptyCString(), PR_FALSE, nsnull); new nsProcess(); nsStaticCaseInsensitiveNameTable(); nsAutoString str1; diff --git a/xpcom/io/nsLocalFileMac.cpp b/xpcom/io/nsLocalFileMac.cpp index bebc76c1106..9d0e0e03929 100644 --- a/xpcom/io/nsLocalFileMac.cpp +++ b/xpcom/io/nsLocalFileMac.cpp @@ -1705,7 +1705,7 @@ NS_IMETHODIMP nsLocalFile::CopyTo(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return CopyToNative(newParentDir, nsCString()); + return CopyToNative(newParentDir, EmptyCString()); nsresult rv; nsCAutoString fsStr; @@ -1724,7 +1724,7 @@ NS_IMETHODIMP nsLocalFile::CopyToFollowingLinks(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return CopyToFollowingLinksNative(newParentDir, nsCString()); + return CopyToFollowingLinksNative(newParentDir, EmptyCString()); nsresult rv; nsCAutoString fsStr; @@ -1743,7 +1743,7 @@ NS_IMETHODIMP nsLocalFile::MoveTo(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return MoveToNative(newParentDir, nsCString()); + return MoveToNative(newParentDir, EmptyCString()); nsresult rv; nsCAutoString fsStr; diff --git a/xpcom/io/nsLocalFileOS2.cpp b/xpcom/io/nsLocalFileOS2.cpp index 7d80ac40a3b..0dec82c3966 100644 --- a/xpcom/io/nsLocalFileOS2.cpp +++ b/xpcom/io/nsLocalFileOS2.cpp @@ -732,11 +732,11 @@ nsLocalFile::CopyMove(nsIFile *aParentDir, const nsACString &newName, PRBool mov if (move) { - rv = file->MoveToNative(target, nsCString()); + rv = file->MoveToNative(target, EmptyCString()); } else { - rv = file->CopyToNative(target, nsCString()); + rv = file->CopyToNative(target, EmptyCString()); } iterator->HasMoreElements(&more); @@ -1582,7 +1582,7 @@ NS_IMETHODIMP nsLocalFile::InitWithPath(const nsAString &filePath) { if (filePath.IsEmpty()) - return InitWithNativePath(nsCString()); + return InitWithNativePath(EmptyCString()); nsCAutoString tmp; nsresult rv = NS_CopyUnicodeToNative(filePath, tmp); @@ -1639,7 +1639,7 @@ NS_IMETHODIMP nsLocalFile::SetLeafName(const nsAString &aLeafName) { if (aLeafName.IsEmpty()) - return SetNativeLeafName(nsCString()); + return SetNativeLeafName(EmptyCString()); nsCAutoString tmp; nsresult rv = NS_CopyUnicodeToNative(aLeafName, tmp); @@ -1660,7 +1660,7 @@ NS_IMETHODIMP nsLocalFile::CopyTo(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return CopyToNative(newParentDir, nsCString()); + return CopyToNative(newParentDir, EmptyCString()); nsCAutoString tmp; nsresult rv = NS_CopyUnicodeToNative(newName, tmp); @@ -1675,7 +1675,7 @@ NS_IMETHODIMP nsLocalFile::CopyToFollowingLinks(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return CopyToFollowingLinksNative(newParentDir, nsCString()); + return CopyToFollowingLinksNative(newParentDir, EmptyCString()); nsCAutoString tmp; nsresult rv = NS_CopyUnicodeToNative(newName, tmp); @@ -1690,7 +1690,7 @@ NS_IMETHODIMP nsLocalFile::MoveTo(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return MoveToNative(newParentDir, nsCString()); + return MoveToNative(newParentDir, EmptyCString()); nsCAutoString tmp; nsresult rv = NS_CopyUnicodeToNative(newName, tmp); diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 9d6e266688f..aa21433d927 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -1250,15 +1250,15 @@ nsLocalFile::CopyMove(nsIFile *aParentDir, const nsACString &newName, PRBool fol if (followSymlinks) return NS_ERROR_FAILURE; - rv = file->MoveToNative(target, nsCString()); + rv = file->MoveToNative(target, EmptyCString()); NS_ENSURE_SUCCESS(rv,rv); } else { if (followSymlinks) - rv = file->CopyToFollowingLinksNative(target, nsCString()); + rv = file->CopyToFollowingLinksNative(target, EmptyCString()); else - rv = file->CopyToNative(target, nsCString()); + rv = file->CopyToNative(target, EmptyCString()); NS_ENSURE_SUCCESS(rv,rv); } } @@ -2310,7 +2310,7 @@ nsresult nsLocalFile::CopyTo(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return CopyToNative(newParentDir, nsCString()); + return CopyToNative(newParentDir, EmptyCString()); nsCAutoString tmp; nsresult rv = NS_CopyUnicodeToNative(newName, tmp); @@ -2324,7 +2324,7 @@ nsresult nsLocalFile::CopyToFollowingLinks(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return CopyToFollowingLinksNative(newParentDir, nsCString()); + return CopyToFollowingLinksNative(newParentDir, EmptyCString()); nsCAutoString tmp; nsresult rv = NS_CopyUnicodeToNative(newName, tmp); @@ -2338,7 +2338,7 @@ nsresult nsLocalFile::MoveTo(nsIFile *newParentDir, const nsAString &newName) { if (newName.IsEmpty()) - return MoveToNative(newParentDir, nsCString()); + return MoveToNative(newParentDir, EmptyCString()); nsCAutoString tmp; nsresult rv = NS_CopyUnicodeToNative(newName, tmp); diff --git a/xpfe/components/search/src/nsInternetSearchService.cpp b/xpfe/components/search/src/nsInternetSearchService.cpp index 6261f21d7da..ca07a69ab9b 100755 --- a/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/xpfe/components/search/src/nsInternetSearchService.cpp @@ -2845,7 +2845,7 @@ InternetSearchDataSource::FindInternetSearchResults(const char *url, PRBool *sea nsAutoString userVar, inputUnused, engineNameStr; GetData(dataUni, "search", 0, "name", engineNameStr); - if (NS_FAILED(rv = GetInputs(dataUni, engineNameStr, userVar, nsAutoString(), inputUnused, 0, 0, 0))) return(rv); + if (NS_FAILED(rv = GetInputs(dataUni, engineNameStr, userVar, EmptyString(), inputUnused, 0, 0, 0))) return(rv); if (userVar.IsEmpty()) return(NS_RDF_NO_VALUE); nsAutoString queryStr;