From fce6160b8130b41e12444f84f3ca7a7b0c7d6b4a Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Wed, 12 Jul 2000 01:00:58 +0000 Subject: [PATCH] Fixed build bustage for linux (why can't Linus do NS_LITERAL_STRING correctly!) --- editor/base/nsEditorShell.cpp | 15 +++++++++------ editor/composer/src/nsEditorShell.cpp | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/editor/base/nsEditorShell.cpp b/editor/base/nsEditorShell.cpp index 89eb64297d6..05f13ba9a87 100644 --- a/editor/base/nsEditorShell.cpp +++ b/editor/base/nsEditorShell.cpp @@ -1386,9 +1386,11 @@ NS_IMETHODIMP nsEditorShell::FinishHTMLSource(void) { if (mHTMLSourceMode) + { // Call the JS command to convert and switch to previous edit mode - return DoControllerCommand(NS_LITERAL_STRING("cmd_FinishHTMLSource")); - + nsAutoString command(NS_LITERAL_STRING("cmd_FinishHTMLSource")); + return DoControllerCommand(command); + } return NS_OK; } @@ -1648,8 +1650,9 @@ nsEditorShell::CheckAndSaveDocument(const PRUnichar *reasonToSave, PRBool *_retv } else if (mHTMLSourceMode) // result == eNo { - // User doesn't want to save document, so we just cancel source mode - rv = DoControllerCommand(NS_LITERAL_STRING("cmd_CancelHTMLSource")); + // User doesn't want to save document, so we just cancel source mode + nsAutoString command(NS_LITERAL_STRING("cmd_CancelHTMLSource")); + rv = DoControllerCommand(command); } } } @@ -5211,9 +5214,9 @@ nsEditorShell::HandleMouseClickOnElement(nsIDOMElement *aElement, PRInt32 aClick // In "All Tags" mode, use AdvancedProperties, // in others use appriate object property dialog if (mDisplayMode != eDisplayModeAllTags) - commandName = NS_ConvertASCIItoUCS2("cmd_objectProperties"); + commandName = NS_LITERAL_STRING("cmd_objectProperties"); else - commandName = NS_ConvertASCIItoUCS2("cmd_advancedProperties"); + commandName = NS_LITERAL_STRING("cmd_advancedProperties"); rv = DoControllerCommand(commandName); diff --git a/editor/composer/src/nsEditorShell.cpp b/editor/composer/src/nsEditorShell.cpp index 89eb64297d6..05f13ba9a87 100644 --- a/editor/composer/src/nsEditorShell.cpp +++ b/editor/composer/src/nsEditorShell.cpp @@ -1386,9 +1386,11 @@ NS_IMETHODIMP nsEditorShell::FinishHTMLSource(void) { if (mHTMLSourceMode) + { // Call the JS command to convert and switch to previous edit mode - return DoControllerCommand(NS_LITERAL_STRING("cmd_FinishHTMLSource")); - + nsAutoString command(NS_LITERAL_STRING("cmd_FinishHTMLSource")); + return DoControllerCommand(command); + } return NS_OK; } @@ -1648,8 +1650,9 @@ nsEditorShell::CheckAndSaveDocument(const PRUnichar *reasonToSave, PRBool *_retv } else if (mHTMLSourceMode) // result == eNo { - // User doesn't want to save document, so we just cancel source mode - rv = DoControllerCommand(NS_LITERAL_STRING("cmd_CancelHTMLSource")); + // User doesn't want to save document, so we just cancel source mode + nsAutoString command(NS_LITERAL_STRING("cmd_CancelHTMLSource")); + rv = DoControllerCommand(command); } } } @@ -5211,9 +5214,9 @@ nsEditorShell::HandleMouseClickOnElement(nsIDOMElement *aElement, PRInt32 aClick // In "All Tags" mode, use AdvancedProperties, // in others use appriate object property dialog if (mDisplayMode != eDisplayModeAllTags) - commandName = NS_ConvertASCIItoUCS2("cmd_objectProperties"); + commandName = NS_LITERAL_STRING("cmd_objectProperties"); else - commandName = NS_ConvertASCIItoUCS2("cmd_advancedProperties"); + commandName = NS_LITERAL_STRING("cmd_advancedProperties"); rv = DoControllerCommand(commandName);