making string conversions explicit

git-svn-id: svn://10.0.0.236/trunk@66103 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%netscape.com
2000-04-15 21:18:29 +00:00
parent 4f247b2dba
commit b5432ec86e
57 changed files with 1153 additions and 1170 deletions

View File

@@ -105,7 +105,7 @@ nsFileControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
// create text field
nsIAtom* tag = NS_NewAtom("input");
if (NS_OK == NS_NewHTMLInputElement(&mTextContent, tag)) {
mTextContent->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, nsAutoString("text"), PR_FALSE);
mTextContent->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertASCIItoUCS2("text"), PR_FALSE);
if (nsFormFrame::GetDisabled(this)) {
nsCOMPtr<nsIDOMHTMLInputElement> textControl = do_QueryInterface(mTextContent);
if (textControl) {
@@ -119,7 +119,7 @@ nsFileControlFrame::CreateAnonymousContent(nsIPresContext* aPresContext,
nsIHTMLContent* browse = nsnull;
tag = NS_NewAtom("input");
if (NS_OK == NS_NewHTMLInputElement(&browse, tag)) {
browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, nsAutoString("button"), PR_FALSE);
browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertASCIItoUCS2("button"), PR_FALSE);
//browse->SetAttribute(kNameSpaceID_None, nsHTMLAtoms::value, nsAutoString("browse..."), PR_FALSE);
aChildList.AppendElement(browse);
@@ -245,7 +245,7 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
nsIFileWidget *fileWidget = nsnull;
nsString title("File Upload");
nsString title; title.AssignWithConversion("File Upload");
nsComponentManager::CreateInstance(kCFileWidgetCID, nsnull, kIFileWidgetIID, (void**)&fileWidget);
if (fileWidget) {
@@ -607,7 +607,7 @@ nsFileControlFrame::SaveState(nsIPresContext* aPresContext, nsIPresState** aStat
// This string will hold a single item, whether or not we're checked.
nsAutoString stateString;
GetProperty(nsHTMLAtoms::value, stateString);
(*aState)->SetStateProperty("checked", stateString);
(*aState)->SetStateProperty(NS_ConvertASCIItoUCS2("checked"), stateString);
return NS_OK;
}
@@ -616,7 +616,7 @@ NS_IMETHODIMP
nsFileControlFrame::RestoreState(nsIPresContext* aPresContext, nsIPresState* aState)
{
nsAutoString string;
aState->GetStateProperty("checked", string);
aState->GetStateProperty(NS_ConvertASCIItoUCS2("checked"), string);
SetProperty(aPresContext, nsHTMLAtoms::value, string);
return NS_OK;