bug 157624 - prep for freezing nsISupports* primitives by renaming the string classes appropriately

nsISupportsString  -> nsISupportsCString
nsISupportsWString -> nsISupportsString
r=dougt, sr=jag
This commit is contained in:
alecf%netscape.com 2002-08-06 00:53:19 +00:00
Родитель 3c7f281420
Коммит 3703f3c61b
150 изменённых файлов: 491 добавлений и 3656 удалений

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

@ -291,7 +291,7 @@ nsContentAreaDragDrop::ExtractURLFromData(const nsACString & inFlavor, nsISuppor
if ( inFlavor.Equals(kUnicodeMime) ) { if ( inFlavor.Equals(kUnicodeMime) ) {
// the data is regular unicode, just go with what we get. It may be a url, it // the data is regular unicode, just go with what we get. It may be a url, it
// may not be. *shrug* // may not be. *shrug*
nsCOMPtr<nsISupportsWString> stringData(do_QueryInterface(inDataWrapper)); nsCOMPtr<nsISupportsString> stringData(do_QueryInterface(inDataWrapper));
if ( stringData ) { if ( stringData ) {
nsXPIDLString data; nsXPIDLString data;
stringData->GetData(getter_Copies(data)); stringData->GetData(getter_Copies(data));
@ -301,7 +301,7 @@ nsContentAreaDragDrop::ExtractURLFromData(const nsACString & inFlavor, nsISuppor
else if ( inFlavor.Equals(kURLMime) ) { else if ( inFlavor.Equals(kURLMime) ) {
// the data is an internet shortcut of the form <url>\n<title>. Strip // the data is an internet shortcut of the form <url>\n<title>. Strip
// out the url piece and return that. // out the url piece and return that.
nsCOMPtr<nsISupportsWString> stringData(do_QueryInterface(inDataWrapper)); nsCOMPtr<nsISupportsString> stringData(do_QueryInterface(inDataWrapper));
if ( stringData ) { if ( stringData ) {
nsXPIDLString data; nsXPIDLString data;
stringData->GetData(getter_Copies(data)); stringData->GetData(getter_Copies(data));
@ -912,7 +912,7 @@ nsContentAreaDragDrop::CreateTransferable(const nsAString & inURLString, const n
nsAutoString dragData ( inURLString ); nsAutoString dragData ( inURLString );
dragData += NS_LITERAL_STRING("\n"); dragData += NS_LITERAL_STRING("\n");
dragData += inTitleString; dragData += inTitleString;
nsCOMPtr<nsISupportsWString> urlPrimitive(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID)); nsCOMPtr<nsISupportsString> urlPrimitive(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
if ( !urlPrimitive ) if ( !urlPrimitive )
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
urlPrimitive->SetData(dragData.get()); urlPrimitive->SetData(dragData.get());
@ -920,7 +920,7 @@ nsContentAreaDragDrop::CreateTransferable(const nsAString & inURLString, const n
} }
// add the full html // add the full html
nsCOMPtr<nsISupportsWString> htmlPrimitive(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID)); nsCOMPtr<nsISupportsString> htmlPrimitive(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
if ( !htmlPrimitive ) if ( !htmlPrimitive )
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
htmlPrimitive->SetData(PromiseFlatString(inHTMLString).get()); htmlPrimitive->SetData(PromiseFlatString(inHTMLString).get());
@ -929,7 +929,7 @@ nsContentAreaDragDrop::CreateTransferable(const nsAString & inURLString, const n
// add the plain (unicode) text. we use the url for text/unicode data if an anchor // add the plain (unicode) text. we use the url for text/unicode data if an anchor
// is being dragged, rather than the title text of the link or the alt text for // is being dragged, rather than the title text of the link or the alt text for
// an anchor image. // an anchor image.
nsCOMPtr<nsISupportsWString> textPrimitive(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID)); nsCOMPtr<nsISupportsString> textPrimitive(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
if ( !textPrimitive ) if ( !textPrimitive )
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
textPrimitive->SetData(PromiseFlatString(inIsAnchor ? inURLString : inTitleString).get()); textPrimitive->SetData(PromiseFlatString(inIsAnchor ? inURLString : inTitleString).get());

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

@ -78,7 +78,7 @@ nsContentPolicy::nsContentPolicy()
*/ */
nsCOMPtr<nsISupports> item; nsCOMPtr<nsISupports> item;
while (NS_SUCCEEDED(catEnum->GetNext(getter_AddRefs(item)))) { while (NS_SUCCEEDED(catEnum->GetNext(getter_AddRefs(item)))) {
nsCOMPtr<nsISupportsString> string = do_QueryInterface(item, &rv); nsCOMPtr<nsISupportsCString> string = do_QueryInterface(item, &rv);
if (NS_FAILED(rv)) if (NS_FAILED(rv))
continue; continue;

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

@ -195,14 +195,14 @@ nsresult nsCopySupport::HTMLCopy(nsISelection *aSel, nsIDocument *aDoc, PRInt16
} }
// get wStrings to hold clip data // get wStrings to hold clip data
nsCOMPtr<nsISupportsWString> dataWrapper, contextWrapper, infoWrapper; nsCOMPtr<nsISupportsString> dataWrapper, contextWrapper, infoWrapper;
dataWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); dataWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE);
if (bIsHTMLCopy) if (bIsHTMLCopy)
{ {
contextWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); contextWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE);
infoWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); infoWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE);
} }

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

@ -6257,7 +6257,7 @@ DocumentViewerImpl::CheckForPrinters(nsIPrintOptions* aPrintOptions,
aPrintSettings->GetPrinterName(&defPrinterName); aPrintSettings->GetPrinterName(&defPrinterName);
if (!defPrinterName || (defPrinterName && !*defPrinterName)) { if (!defPrinterName || (defPrinterName && !*defPrinterName)) {
if (defPrinterName) nsMemory::Free(defPrinterName); if (defPrinterName) nsMemory::Free(defPrinterName);
nsCOMPtr<nsISupportsWString> wStr = do_QueryInterface(supps); nsCOMPtr<nsISupportsString> wStr = do_QueryInterface(supps);
if (wStr) { if (wStr) {
PRUnichar* defPrinterName; PRUnichar* defPrinterName;
wStr->ToString(&defPrinterName); wStr->ToString(&defPrinterName);

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

@ -1133,10 +1133,10 @@ nsDOMClassInfo::RegisterExternalClasses()
nsCOMPtr<nsISupports> entry; nsCOMPtr<nsISupports> entry;
while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) { while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry)); nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) { if (!category) {
NS_WARNING("Category entry not an nsISupportsString!"); NS_WARNING("Category entry not an nsISupportsCString!");
continue; continue;
} }

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

@ -176,10 +176,10 @@ nsScriptNameSpaceManager::FillHash(nsICategoryManager *aCategoryManager,
nsCOMPtr<nsISupports> entry; nsCOMPtr<nsISupports> entry;
while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) { while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry)); nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) { if (!category) {
NS_WARNING("Category entry not an nsISupportsString!"); NS_WARNING("Category entry not an nsISupportsCString!");
continue; continue;
} }
@ -302,10 +302,10 @@ nsScriptNameSpaceManager::RegisterExternalInterfaces(PRBool aAsProto)
PRBool found_old, dom_prefix; PRBool found_old, dom_prefix;
while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) { while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry)); nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) { if (!category) {
NS_WARNING("Category entry not an nsISupportsString!"); NS_WARNING("Category entry not an nsISupportsCString!");
continue; continue;
} }

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

@ -176,10 +176,10 @@ nsScriptNameSpaceManager::FillHash(nsICategoryManager *aCategoryManager,
nsCOMPtr<nsISupports> entry; nsCOMPtr<nsISupports> entry;
while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) { while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry)); nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) { if (!category) {
NS_WARNING("Category entry not an nsISupportsString!"); NS_WARNING("Category entry not an nsISupportsCString!");
continue; continue;
} }
@ -302,10 +302,10 @@ nsScriptNameSpaceManager::RegisterExternalInterfaces(PRBool aAsProto)
PRBool found_old, dom_prefix; PRBool found_old, dom_prefix;
while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) { while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry)); nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) { if (!category) {
NS_WARNING("Category entry not an nsISupportsString!"); NS_WARNING("Category entry not an nsISupportsCString!");
continue; continue;
} }

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

@ -805,7 +805,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable
#endif #endif
if (flavor.Equals(NS_LITERAL_STRING(kHTMLMime))) if (flavor.Equals(NS_LITERAL_STRING(kHTMLMime)))
{ {
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) ); nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0) if (textDataObj && len > 0)
{ {
PRUnichar* text = nsnull; PRUnichar* text = nsnull;
@ -821,7 +821,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable
} }
else if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime))) else if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))
{ {
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) ); nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0) if (textDataObj && len > 0)
{ {
PRUnichar* text = nsnull; PRUnichar* text = nsnull;
@ -943,7 +943,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromDrop(nsIDOMEvent* aDropEvent)
nsAutoString contextStr, infoStr; nsAutoString contextStr, infoStr;
nsCOMPtr<nsISupports> contextDataObj, infoDataObj; nsCOMPtr<nsISupports> contextDataObj, infoDataObj;
PRUint32 contextLen, infoLen; PRUint32 contextLen, infoLen;
nsCOMPtr<nsISupportsWString> textDataObj; nsCOMPtr<nsISupportsString> textDataObj;
nsCOMPtr<nsITransferable> contextTrans = do_CreateInstance(kCTransferableCID); nsCOMPtr<nsITransferable> contextTrans = do_CreateInstance(kCTransferableCID);
NS_ENSURE_TRUE(contextTrans, NS_ERROR_NULL_POINTER); NS_ENSURE_TRUE(contextTrans, NS_ERROR_NULL_POINTER);
@ -1264,9 +1264,9 @@ NS_IMETHODIMP nsHTMLEditor::DoDrag(nsIDOMEvent *aDragEvent)
// if we have an empty string, we're done; otherwise continue // if we have an empty string, we're done; otherwise continue
if ( !buffer.IsEmpty() ) if ( !buffer.IsEmpty() )
{ {
nsCOMPtr<nsISupportsWString> dataWrapper, contextWrapper, infoWrapper; nsCOMPtr<nsISupportsString> dataWrapper, contextWrapper, infoWrapper;
dataWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); dataWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE);
rv = dataWrapper->SetData( NS_CONST_CAST(PRUnichar*, buffer.get()) ); rv = dataWrapper->SetData( NS_CONST_CAST(PRUnichar*, buffer.get()) );
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
@ -1285,9 +1285,9 @@ NS_IMETHODIMP nsHTMLEditor::DoDrag(nsIDOMEvent *aDragEvent)
} }
else else
{ {
contextWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); contextWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE);
infoWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); infoWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE);
contextWrapper->SetData ( NS_CONST_CAST(PRUnichar*,parents.get()) ); contextWrapper->SetData ( NS_CONST_CAST(PRUnichar*,parents.get()) );
@ -1367,7 +1367,7 @@ NS_IMETHODIMP nsHTMLEditor::Paste(PRInt32 aSelectionType)
nsAutoString contextStr, infoStr; nsAutoString contextStr, infoStr;
nsCOMPtr<nsISupports> contextDataObj, infoDataObj; nsCOMPtr<nsISupports> contextDataObj, infoDataObj;
PRUint32 contextLen, infoLen; PRUint32 contextLen, infoLen;
nsCOMPtr<nsISupportsWString> textDataObj; nsCOMPtr<nsISupportsString> textDataObj;
nsCOMPtr<nsITransferable> contextTrans = do_CreateInstance(kCTransferableCID); nsCOMPtr<nsITransferable> contextTrans = do_CreateInstance(kCTransferableCID);
NS_ENSURE_TRUE(contextTrans, NS_ERROR_NULL_POINTER); NS_ENSURE_TRUE(contextTrans, NS_ERROR_NULL_POINTER);
@ -1437,9 +1437,9 @@ NS_IMETHODIMP nsHTMLEditor::CanPaste(PRInt32 aSelectionType, PRBool *aCanPaste)
// add the flavors for all editors // add the flavors for all editors
for (const char* const* flavor = textEditorFlavors; *flavor; flavor++) for (const char* const* flavor = textEditorFlavors; *flavor; flavor++)
{ {
nsCOMPtr<nsISupportsString> flavorString; nsCOMPtr<nsISupportsCString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull, nsComponentManager::CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsString), getter_AddRefs(flavorString)); NS_GET_IID(nsISupportsCString), getter_AddRefs(flavorString));
if (flavorString) if (flavorString)
{ {
flavorString->SetData(*flavor); flavorString->SetData(*flavor);
@ -1454,9 +1454,9 @@ NS_IMETHODIMP nsHTMLEditor::CanPaste(PRInt32 aSelectionType, PRBool *aCanPaste)
*htmlFlavor; *htmlFlavor;
htmlFlavor++) htmlFlavor++)
{ {
nsCOMPtr<nsISupportsString> flavorString; nsCOMPtr<nsISupportsCString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull, nsComponentManager::CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsString), getter_AddRefs(flavorString)); NS_GET_IID(nsISupportsCString), getter_AddRefs(flavorString));
if (flavorString) if (flavorString)
{ {
flavorString->SetData(*htmlFlavor); flavorString->SetData(*htmlFlavor);
@ -1578,7 +1578,7 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation(PRInt32 aSelectionType)
nsAutoString stuffToPaste; nsAutoString stuffToPaste;
if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime))) if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))
{ {
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) ); nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0) if (textDataObj && len > 0)
{ {
PRUnichar* text = nsnull; PRUnichar* text = nsnull;

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

@ -165,7 +165,7 @@ NS_IMETHODIMP nsPlaintextEditor::InsertTextFromTransferable(nsITransferable *tra
flavor.AssignWithConversion( bestFlavor ); // just so we can use flavor.Equals() flavor.AssignWithConversion( bestFlavor ); // just so we can use flavor.Equals()
if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime))) if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))
{ {
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) ); nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0) if (textDataObj && len > 0)
{ {
PRUnichar* text = nsnull; PRUnichar* text = nsnull;
@ -493,7 +493,7 @@ NS_IMETHODIMP nsPlaintextEditor::DoDrag(nsIDOMEvent *aDragEvent)
// if we have an empty string, we're done; otherwise continue // if we have an empty string, we're done; otherwise continue
if ( !buffer.IsEmpty() ) if ( !buffer.IsEmpty() )
{ {
nsCOMPtr<nsISupportsWString> dataWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); nsCOMPtr<nsISupportsString> dataWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE);
rv = dataWrapper->SetData( NS_CONST_CAST(PRUnichar*, buffer.get()) ); rv = dataWrapper->SetData( NS_CONST_CAST(PRUnichar*, buffer.get()) );
@ -601,9 +601,9 @@ NS_IMETHODIMP nsPlaintextEditor::CanPaste(PRInt32 aSelectionType, PRBool *aCanPa
// add the flavors for text editors // add the flavors for text editors
for (const char* const* flavor = textEditorFlavors; *flavor; flavor++) for (const char* const* flavor = textEditorFlavors; *flavor; flavor++)
{ {
nsCOMPtr<nsISupportsString> flavorString; nsCOMPtr<nsISupportsCString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull, nsComponentManager::CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsString), getter_AddRefs(flavorString)); NS_GET_IID(nsISupportsCString), getter_AddRefs(flavorString));
if (flavorString) if (flavorString)
{ {
flavorString->SetData(*flavor); flavorString->SetData(*flavor);

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

@ -1624,7 +1624,7 @@ nsPlaintextEditor::PasteAsQuotation(PRInt32 aSelectionType)
nsAutoString stuffToPaste; nsAutoString stuffToPaste;
if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime))) if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))
{ {
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) ); nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0) if (textDataObj && len > 0)
{ {
PRUnichar* text = nsnull; PRUnichar* text = nsnull;

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

@ -2280,7 +2280,7 @@ function EditorSetDefaultPrefsAndDoctype()
try try
{ {
prefAuthorString = gPrefs.getComplexValue("editor.author", prefAuthorString = gPrefs.getComplexValue("editor.author",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} }
catch (ex) {} catch (ex) {}
if ( prefAuthorString && prefAuthorString != 0) if ( prefAuthorString && prefAuthorString != 0)

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

@ -260,10 +260,10 @@ function SetUnicharPref(aPrefName, aPrefValue)
if (prefs) if (prefs)
{ {
try { try {
var str = Components.classes["@mozilla.org/supports-wstring;1"] var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsWString); .createInstance(Components.interfaces.nsISupportsString);
str.data = aPrefValue; str.data = aPrefValue;
prefs.setComplexValue(aPrefName, Components.interfaces.nsISupportsWString, str); prefs.setComplexValue(aPrefName, Components.interfaces.nsISupportsString, str);
} }
catch(e) {} catch(e) {}
} }
@ -275,7 +275,7 @@ function GetUnicharPref(aPrefName, aDefVal)
if (prefs) if (prefs)
{ {
try { try {
return prefs.getComplexValue(aPrefName, Components.interfaces.nsISupportsWString).data; return prefs.getComplexValue(aPrefName, Components.interfaces.nsISupportsString).data;
} }
catch(e) {} catch(e) {}
} }

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

@ -764,7 +764,7 @@ function GetPublishStringPref(prefBranch, name)
if (prefBranch && name) if (prefBranch && name)
{ {
try { try {
return prefBranch.getComplexValue(name, Components.interfaces.nsISupportsWString).data; return prefBranch.getComplexValue(name, Components.interfaces.nsISupportsString).data;
} catch (e) {} } catch (e) {}
} }
return ""; return "";
@ -775,10 +775,10 @@ function SetPublishStringPref(prefBranch, name, value)
if (prefBranch && name) if (prefBranch && name)
{ {
try { try {
var str = Components.classes["@mozilla.org/supports-wstring;1"] var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsWString); .createInstance(Components.interfaces.nsISupportsString);
str.data = value; str.data = value;
prefBranch.setComplexValue(name, Components.interfaces.nsISupportsWString, str); prefBranch.setComplexValue(name, Components.interfaces.nsISupportsString, str);
} catch (e) {} } catch (e) {}
} }
} }

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

@ -72,7 +72,7 @@ NS_IMETHODIMP nsAppStartupNotifier::Observe(nsISupports *aSubject, const char *a
nsCOMPtr<nsISupports> entry; nsCOMPtr<nsISupports> entry;
while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) { while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category = do_QueryInterface(entry, &rv); nsCOMPtr<nsISupportsCString> category = do_QueryInterface(entry, &rv);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
nsXPIDLCString categoryEntry; nsXPIDLCString categoryEntry;

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

@ -126,7 +126,7 @@ nsGroupsEnumerator::GetNext(nsISupports **_retval)
char *thisGroupName = mGroupNames[mIndex]; char *thisGroupName = mGroupNames[mIndex];
nsCOMPtr<nsISupportsString> supportsString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv); nsCOMPtr<nsISupportsCString> supportsString = do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
supportsString->SetData(thisGroupName); supportsString->SetData(thisGroupName);
@ -222,7 +222,7 @@ nsNamedGroupEnumerator::GetNext(nsISupports **_retval)
PRUnichar *thisGroupName = (PRUnichar *)mGroupArray->ElementAt(mIndex); PRUnichar *thisGroupName = (PRUnichar *)mGroupArray->ElementAt(mIndex);
nsresult rv; nsresult rv;
nsCOMPtr<nsISupportsWString> supportsString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv); nsCOMPtr<nsISupportsString> supportsString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
supportsString->SetData(thisGroupName); supportsString->SetData(thisGroupName);

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

@ -1736,8 +1736,8 @@ nsWindowWatcher::AddSupportsTojsvals(nsISupports *aArg,
argPrimitive->GetType(&type); argPrimitive->GetType(&type);
switch(type) { switch(type) {
case nsISupportsPrimitive::TYPE_STRING : { case nsISupportsPrimitive::TYPE_CSTRING : {
nsCOMPtr<nsISupportsString> p(do_QueryInterface(argPrimitive)); nsCOMPtr<nsISupportsCString> p(do_QueryInterface(argPrimitive));
NS_ENSURE_TRUE(p, NS_ERROR_UNEXPECTED); NS_ENSURE_TRUE(p, NS_ERROR_UNEXPECTED);
char *data; char *data;
@ -1751,8 +1751,8 @@ nsWindowWatcher::AddSupportsTojsvals(nsISupports *aArg,
break; break;
} }
case nsISupportsPrimitive::TYPE_WSTRING : { case nsISupportsPrimitive::TYPE_STRING : {
nsCOMPtr<nsISupportsWString> p(do_QueryInterface(argPrimitive)); nsCOMPtr<nsISupportsString> p(do_QueryInterface(argPrimitive));
NS_ENSURE_TRUE(p, NS_ERROR_UNEXPECTED); NS_ENSURE_TRUE(p, NS_ERROR_UNEXPECTED);
PRUnichar *data; PRUnichar *data;

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

@ -154,7 +154,7 @@ function constructFontList(fontList)
while (fontEnumerator.hasMoreElements()) while (fontEnumerator.hasMoreElements())
{ {
var fontName = fontEnumerator.getNext(); var fontName = fontEnumerator.getNext();
fontName = fontName.QueryInterface(Components.interfaces.nsISupportsWString); fontName = fontName.QueryInterface(Components.interfaces.nsISupportsString);
var fontNameStr = fontName.toString(); var fontNameStr = fontName.toString();
if (fontEnumerator.hasMoreElements()) if (fontEnumerator.hasMoreElements())
tempres = tempres + fontNameStr + ", "; tempres = tempres + fontNameStr + ", ";

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

@ -307,8 +307,8 @@
<parameter name="aFlavor"/> <parameter name="aFlavor"/>
<body><![CDATA[ <body><![CDATA[
if (aFlavor == "text/unicode") { if (aFlavor == "text/unicode") {
var iid = Components.interfaces.nsISupportsWString; var iid = Components.interfaces.nsISupportsString;
var cid = "@mozilla.org/supports-wstring;1"; var cid = "@mozilla.org/supports-string;1";
data = Components.classes[cid].createInstance(iid); data = Components.classes[cid].createInstance(iid);
data.data = aObject; data.data = aObject;

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

@ -87,10 +87,10 @@ var PrefUtils =
var type = this.mPrefs.getPrefType(aName); var type = this.mPrefs.getPrefType(aName);
try { try {
if (type == nsIPrefBranch.PREF_STRING) { if (type == nsIPrefBranch.PREF_STRING) {
var str = Components.classes["@mozilla.org/supports-wstring;1"] var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsWString); .createInstance(Components.interfaces.nsISupportsString);
str.data = aValue; str.data = aValue;
this.mPrefs.setComplexValue(aName, Components.interfaces.nsISupportsWString, str); this.mPrefs.setComplexValue(aName, Components.interfaces.nsISupportsString, str);
} else if (type == nsIPrefBranch.PREF_BOOL) { } else if (type == nsIPrefBranch.PREF_BOOL) {
this.mPrefs.setBoolPref(aName, aValue); this.mPrefs.setBoolPref(aName, aValue);
} else if (type == nsIPrefBranch.PREF_INT) { } else if (type == nsIPrefBranch.PREF_INT) {
@ -108,7 +108,7 @@ var PrefUtils =
var type = this.mPrefs.getPrefType(aName); var type = this.mPrefs.getPrefType(aName);
try { try {
if (type == nsIPrefBranch.PREF_STRING) { if (type == nsIPrefBranch.PREF_STRING) {
return this.mPrefs.getComplexValue(aName, Components.interfaces.nsISupportsWString).data; return this.mPrefs.getComplexValue(aName, Components.interfaces.nsISupportsString).data;
} else if (type == nsIPrefBranch.PREF_BOOL) { } else if (type == nsIPrefBranch.PREF_BOOL) {
return this.mPrefs.getBoolPref(aName); return this.mPrefs.getBoolPref(aName);
} else if (type == nsIPrefBranch.PREF_INT) { } else if (type == nsIPrefBranch.PREF_INT) {

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

@ -76,7 +76,7 @@ var DNDUtils =
{ {
var obj = {}; var obj = {};
if (typeof(aValue) == "string") { if (typeof(aValue) == "string") {
obj.data = XPCU.createInstance("@mozilla.org/supports-wstring;1", "nsISupportsWString"); obj.data = XPCU.createInstance("@mozilla.org/supports-string;1", "nsISupportsString");
obj.data.data = aValue; obj.data.data = aValue;
obj.size = aValue.length*2; obj.size = aValue.length*2;
} else if (false) { } else if (false) {

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

@ -326,7 +326,7 @@ inTreeBuilder.prototype =
var data = {}; var data = {};
trans.getAnyTransferData ({}, data, {}); trans.getAnyTransferData ({}, data, {});
var string = XPCU.QI(data.value, "nsISupportsWString"); var string = XPCU.QI(data.value, "nsISupportsString");
this.insertColumn(this.mColumnInsertIndex, this.insertColumn(this.mColumnInsertIndex,
{ {

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

@ -211,7 +211,7 @@ ColumnsDialog.prototype =
onDragDropIn: function(aEvent) onDragDropIn: function(aEvent)
{ {
var data = DNDUtils.getData("TreeBuilder/column-remove", 0); var data = DNDUtils.getData("TreeBuilder/column-remove", 0);
var string = XPCU.QI(data, "nsISupportsWString"); var string = XPCU.QI(data, "nsISupportsString");
this.addItem(string.data); this.addItem(string.data);
}, },

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

@ -20,7 +20,7 @@ import new
from xpcom import xpt, COMException, nsError from xpcom import xpt, COMException, nsError
# Suck in stuff from _xpcom we use regularly to prevent a module lookup # Suck in stuff from _xpcom we use regularly to prevent a module lookup
from xpcom._xpcom import IID_nsISupports, IID_nsIClassInfo, IID_nsISupportsString, IID_nsISupportsWeakReference, \ from xpcom._xpcom import IID_nsISupports, IID_nsIClassInfo, IID_nsISupportsCString, IID_nsISupportsWeakReference, \
IID_nsIWeakReference, XPTI_GetInterfaceInfoManager, NS_GetGlobalComponentManager, XPTC_InvokeByIndex IID_nsIWeakReference, XPTI_GetInterfaceInfoManager, NS_GetGlobalComponentManager, XPTC_InvokeByIndex
# Attribute names we may be __getattr__'d for, but know we don't want to delegate # Attribute names we may be __getattr__'d for, but know we don't want to delegate
@ -159,7 +159,7 @@ class _XPCOMBase:
# See if the object support strings. # See if the object support strings.
def __str__(self): def __str__(self):
try: try:
self._comobj_.QueryInterface(IID_nsISupportsString, 0) self._comobj_.QueryInterface(IID_nsISupportsCString, 0)
return str(self._comobj_) return str(self._comobj_)
except COMException: except COMException:
return self.__repr__() return self.__repr__()

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

@ -40,7 +40,7 @@ object, thereby allowing explicit control over the type of variant created.</p>
term collectively the <i>nsISupports Primitives Interfaces</i>.&nbsp; These term collectively the <i>nsISupports Primitives Interfaces</i>.&nbsp; These
are a set of interfaces a component can support to allow automatic conversion to are a set of interfaces a component can support to allow automatic conversion to
and from many basic types.&nbsp; For example, an interface can define that it and from many basic types.&nbsp; For example, an interface can define that it
supports the <i>nsISupportsString</i> interface, and this could be used by any supports the <i>nsISupportsCString</i> interface, and this could be used by any
program that wishes to get a string representation of the object.&nbsp; If an program that wishes to get a string representation of the object.&nbsp; If an
interface wishes to expose itself as a &quot;boolean value&quot;, it may choose interface wishes to expose itself as a &quot;boolean value&quot;, it may choose
to support the <i>nsISupportsPRBool</i> interface.</p> to support the <i>nsISupportsPRBool</i> interface.</p>
@ -48,8 +48,8 @@ to support the <i>nsISupportsPRBool</i> interface.</p>
calling), you can use calling), you can use
the builtin functions <i>str()</i>, <i>int()</i>, <i>long()</i> etc., on the the builtin functions <i>str()</i>, <i>int()</i>, <i>long()</i> etc., on the
object<i>.</i>&nbsp; In the object<i>.</i>&nbsp; In the
case of <i>str()</i>, if the object does not support the <i>nsISupportsString</i> case of <i>str()</i>, if the object does not support the <i>nsISupportsCString</i>
or <i>nsISupportsWString</i> interfaces, the default string <i>str()</i> for the or <i>nsISupportsString</i> interfaces, the default string <i>str()</i> for the
object will be returned (i.e., what is normally returned for most XPCOM objects - object will be returned (i.e., what is normally returned for most XPCOM objects -
support for these interface is not very common!).&nbsp; In the case of the numeric functions, a <i>ValueError</i> support for these interface is not very common!).&nbsp; In the case of the numeric functions, a <i>ValueError</i>
exception will be raised if the objects do not support any interface that can be exception will be raised if the objects do not support any interface that can be
@ -71,8 +71,8 @@ of these interfaces:</p>
</li> </li>
<li>If your class does not define support for these interfaces, the framework <li>If your class does not define support for these interfaces, the framework
will use standard Python class semantics to implement them - i.e., if your will use standard Python class semantics to implement them - i.e., if your
class provides a <i>__str__</i> method, it will be used to implement <i>nsISupportsString</i> class provides a <i>__str__</i> method, it will be used to implement <i>nsISupportsCString</i>
and <i>nsISupportsWString</i>, if you provide <i>__int__</i>, <i>__long__</i>, and <i>nsISupportsString</i>, if you provide <i>__int__</i>, <i>__long__</i>,
<i>__float__</i> etc., methods, they will be used to implement the numeric <i>__float__</i> etc., methods, they will be used to implement the numeric
interfaces.&nbsp; If your class defines no such special methods, then the <i> interfaces.&nbsp; If your class defines no such special methods, then the <i>
QueryInterface()</i> for those interfaces fails (rather than the QI succeeding QueryInterface()</i> for those interfaces fails (rather than the QI succeeding
@ -83,7 +83,7 @@ of these interfaces:</p>
possible.&nbsp; Consider Python code that does a <i>str()</i> on an&nbsp; XPCOM possible.&nbsp; Consider Python code that does a <i>str()</i> on an&nbsp; XPCOM
interface, and where the XPCOM interface itself is implemented in Python and interface, and where the XPCOM interface itself is implemented in Python and
provides a <i>__str__</i> method.&nbsp; The <i>str()</i> on the original provides a <i>__str__</i> method.&nbsp; The <i>str()</i> on the original
interface queries for the <i>nsISupportsString</i> interface.&nbsp; The interface queries for the <i>nsISupportsCString</i> interface.&nbsp; The
Python implemented object responds to this interface and delegates to the <i>__str__</i> Python implemented object responds to this interface and delegates to the <i>__str__</i>
method. At the end of all this, <i>str()</i> returns the same result method. At the end of all this, <i>str()</i> returns the same result
as if the objects were native Python objects with no XPCOM layer in between.</p> as if the objects were native Python objects with no XPCOM layer in between.</p>

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

@ -294,8 +294,8 @@ class DefaultPolicy:
return self._doHandleException(name, exc_info) return self._doHandleException(name, exc_info)
_supports_primitives_data_ = [ _supports_primitives_data_ = [
("nsISupportsCString", "__str__", str),
("nsISupportsString", "__str__", str), ("nsISupportsString", "__str__", str),
("nsISupportsWString", "__str__", str),
("nsISupportsPRUint64", "__long__", long), ("nsISupportsPRUint64", "__long__", long),
("nsISupportsPRInt64", "__long__", long), ("nsISupportsPRInt64", "__long__", long),
("nsISupportsPRUint32", "__int__", int), ("nsISupportsPRUint32", "__int__", int),

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

@ -143,7 +143,7 @@ PyXPCOM_TypeObject::Py_str(PyObject *self)
char *val = NULL; char *val = NULL;
Py_BEGIN_ALLOW_THREADS; Py_BEGIN_ALLOW_THREADS;
{ // scope to kill pointer while thread-lock released. { // scope to kill pointer while thread-lock released.
nsCOMPtr<nsISupportsString> ss( do_QueryInterface(pis->m_obj, &rv )); nsCOMPtr<nsISupportsCString> ss( do_QueryInterface(pis->m_obj, &rv ));
if (NS_SUCCEEDED(rv)) if (NS_SUCCEEDED(rv))
rv = ss->ToString(&val); rv = ss->ToString(&val);
} // end-scope } // end-scope

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

@ -579,7 +579,7 @@ init_xpcom() {
Py_XDECREF(obFuncPtr); Py_XDECREF(obFuncPtr);
REGISTER_IID(nsISupports); REGISTER_IID(nsISupports);
REGISTER_IID(nsISupportsString); REGISTER_IID(nsISupportsCString);
REGISTER_IID(nsIModule); REGISTER_IID(nsIModule);
REGISTER_IID(nsIFactory); REGISTER_IID(nsIFactory);
REGISTER_IID(nsIWeakReference); REGISTER_IID(nsIWeakReference);

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

@ -17,7 +17,7 @@
# Test our support for the interfaces defined in nsISupportsPrimitives.idl # Test our support for the interfaces defined in nsISupportsPrimitives.idl
# #
# The framework supports nsISupportsString and nsISupportsWString, but # The framework supports nsISupportsCString and nsISupportsString, but
# only if our class doesnt provide explicit support. # only if our class doesnt provide explicit support.
from xpcom import components from xpcom import components
@ -32,7 +32,7 @@ class ImplicitSupportsString:
return "<MyImplicitStrObject>" return "<MyImplicitStrObject>"
class ExplicitSupportsString: class ExplicitSupportsString:
_com_interfaces_ = [components.interfaces.nsISupports, components.interfaces.nsISupportsString] _com_interfaces_ = [components.interfaces.nsISupports, components.interfaces.nsISupportsCString]
# __str__ will be ignored by XPCOM, as we have _explicit_ support. # __str__ will be ignored by XPCOM, as we have _explicit_ support.
def __str__(self): def __str__(self):
return "<MyImplicitStrObject>" return "<MyImplicitStrObject>"

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

@ -18,9 +18,9 @@
/* /*
* XPCOM XML-RPC Client, interface definition. * XPCOM XML-RPC Client, interface definition.
* Version: $Revision: 1.4 $ * Version: $Revision: 1.5 $
* *
* $Id: nsIXmlRpcClient.idl,v 1.4 2002-02-12 23:57:08 samuel%sieb.net Exp $ * $Id: nsIXmlRpcClient.idl,v 1.5 2002-08-06 00:52:08 alecf%netscape.com Exp $
*/ */
#include "nsISupports.idl" #include "nsISupports.idl"
@ -69,7 +69,7 @@ interface nsIXmlRpcClient: nsISupports {
* nsISupportsPRUint8, nsISupportsPRUint16, * nsISupportsPRUint8, nsISupportsPRUint16,
* nsISupportsPRInt16, nsISupportsPRInt32: <i4> * nsISupportsPRInt16, nsISupportsPRInt32: <i4>
* nsISupportsPRBool: <boolean> * nsISupportsPRBool: <boolean>
* nsISupportsChar, nsISupportsString: <string> * nsISupportsChar, nsISupportsCString: <string>
* nsISupportsFloat, nsISupportsDouble: <double> * nsISupportsFloat, nsISupportsDouble: <double>
* nsISupportsPRTime: <dateTime.iso8601> * nsISupportsPRTime: <dateTime.iso8601>
* nsIInputStream: <base64> * nsIInputStream: <base64>
@ -82,10 +82,10 @@ interface nsIXmlRpcClient: nsISupports {
* Return value will be converted as follows: * Return value will be converted as follows:
* <i4> or <int>: nsISupportsPRInt32 * <i4> or <int>: nsISupportsPRInt32
* <boolean>: nsISupportsPRBool * <boolean>: nsISupportsPRBool
* <string>: nsISupportsString * <string>: nsISupportsCString
* <double>: nsISupportsDouble * <double>: nsISupportsDouble
* <dateTime.iso8601>: nsISupportsPRTime * <dateTime.iso8601>: nsISupportsPRTime
* <base64>: nsISupportsString * <base64>: nsISupportsCString
* <array>: nsISupportsArray * <array>: nsISupportsArray
* <struct>: nsIDictionary * <struct>: nsIDictionary
* *
@ -144,7 +144,7 @@ interface nsIXmlRpcClient: nsISupports {
[iid_is(uuid),retval] out nsQIResult result); [iid_is(uuid),retval] out nsQIResult result);
const unsigned long INT = 1; // nsISupportsPRInt32 const unsigned long INT = 1; // nsISupportsPRInt32
const unsigned long BOOLEAN = 2; // nsISupportsPRBool const unsigned long BOOLEAN = 2; // nsISupportsPRBool
const unsigned long STRING = 3; // nsISupportsString const unsigned long STRING = 3; // nsISupportsCString
const unsigned long DOUBLE = 4; // nsISupportsDouble const unsigned long DOUBLE = 4; // nsISupportsDouble
const unsigned long DATETIME = 5; // nsISupportsPRTime const unsigned long DATETIME = 5; // nsISupportsPRTime
const unsigned long ARRAY = 6; // nsISupportsArray const unsigned long ARRAY = 6; // nsISupportsArray

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

@ -20,9 +20,9 @@
/* /*
* nsXmlRpcClient XPCOM component * nsXmlRpcClient XPCOM component
* Version: $Revision: 1.26 $ * Version: $Revision: 1.27 $
* *
* $Id: nsXmlRpcClient.js,v 1.26 2002-06-16 06:17:54 samuel%sieb.net Exp $ * $Id: nsXmlRpcClient.js,v 1.27 2002-08-06 00:52:09 alecf%netscape.com Exp $
*/ */
/* /*
@ -360,9 +360,9 @@ nsXmlRpcClient.prototype = {
'nsISupportsPRBool'); 'nsISupportsPRBool');
case this.STRING: case this.STRING:
uuid.value = Components.interfaces.nsISupportsString uuid.value = Components.interfaces.nsISupportsCString
return createInstance(SUPPORTSID + 'string;1', return createInstance(SUPPORTSID + 'string;1',
'nsISupportsString'); 'nsISupportsCString');
case this.DOUBLE: case this.DOUBLE:
uuid.value = Components.interfaces.nsISupportsDouble uuid.value = Components.interfaces.nsISupportsDouble
@ -585,7 +585,7 @@ nsXmlRpcClient.prototype = {
} catch(e) {} } catch(e) {}
try { try {
obj.QueryInterface(Components.interfaces.nsISupportsString); obj.QueryInterface(Components.interfaces.nsISupportsCString);
return 'String'; return 'String';
} catch(e) {} } catch(e) {}

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

@ -30,7 +30,7 @@ function callAsync() {
var Listener = { var Listener = {
onResult: function(client, ctxt, result) { onResult: function(client, ctxt, result) {
result = result.QueryInterface(Components.interfaces.nsISupportsString); result = result.QueryInterface(Components.interfaces.nsISupportsCString);
document.getElementById('statename').setAttribute('value', result.data); document.getElementById('statename').setAttribute('value', result.data);
}, },

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

@ -194,7 +194,7 @@ interface nsIXMLHttpRequest : nsISupports {
* returns only after the response has been received. * returns only after the response has been received.
* *
* @param body Either an instance of nsIDOMDocument, nsIInputStream * @param body Either an instance of nsIDOMDocument, nsIInputStream
* or a string (nsISupportsWString in the native calling * or a string (nsISupportsString in the native calling
* case). This is used to populate the body of the * case). This is used to populate the body of the
* HTTP request if the HTTP request method is "POST". * HTTP request if the HTTP request method is "POST".
* If the parameter is a nsIDOMDocument, it is serialized. * If the parameter is a nsIDOMDocument, it is serialized.

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

@ -1057,8 +1057,8 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} else { } else {
// nsISupportsWString? // nsISupportsString?
nsCOMPtr<nsISupportsWString> wstr(do_QueryInterface(supports)); nsCOMPtr<nsISupportsString> wstr(do_QueryInterface(supports));
if (wstr) { if (wstr) {
wstr->GetData(getter_Copies(serial)); wstr->GetData(getter_Copies(serial));
} else { } else {

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

@ -15,7 +15,7 @@ pre {
} }
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
const WSTRING_CONTRACTID = "@mozilla.org/supports-wstring;1"; const WSTRING_CONTRACTID = "@mozilla.org/supports-string;1";
// You can only create the text string if you can bybass security, like in chrome // You can only create the text string if you can bybass security, like in chrome
var sendPlainTextData = false; var sendPlainTextData = false;
@ -59,7 +59,7 @@ p.open("POST", "http://green/cgi-bin/this.handler.does.not.exist.xgfrsjfrsgdfr.c
if (!sendPlainTextData) { if (!sendPlainTextData) {
p.send(x); p.send(x);
} else { } else {
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsWString); var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsString);
mystr.data = "Heikki's data"; mystr.data = "Heikki's data";
p.send(mystr); p.send(mystr);
} }

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

@ -15,7 +15,7 @@ pre {
} }
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
const WSTRING_CONTRACTID = "@mozilla.org/supports-wstring;1"; const WSTRING_CONTRACTID = "@mozilla.org/supports-string;1";
// You can only create the text string if you can bybass security, like in chrome // You can only create the text string if you can bybass security, like in chrome
var sendPlainTextData = false; var sendPlainTextData = false;
@ -59,7 +59,7 @@ p.open("POST", "http://green/cgi-bin/echo_xml.cgi");
if (!sendPlainTextData) { if (!sendPlainTextData) {
p.send(x); p.send(x);
} else { } else {
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsWString); var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsString);
mystr.data = "Heikki's data"; mystr.data = "Heikki's data";
p.send(mystr); p.send(mystr);
} }

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

@ -3,7 +3,7 @@
<h1>Posting test</h1> <h1>Posting test</h1>
<script> <script>
<![CDATA[ <![CDATA[
const WSTRING_CONTRACTID = "@mozilla.org/supports-wstring;1"; const WSTRING_CONTRACTID = "@mozilla.org/supports-string;1";
var sendPlainTextData = false; // you can only create the text string if you can bybass security var sendPlainTextData = false; // you can only create the text string if you can bybass security
@ -38,7 +38,7 @@ p.open("POST", "http://green/cgi-bin/echo_xml.cgi");
if (!sendPlainTextData) { if (!sendPlainTextData) {
p.send(x); p.send(x);
} else { } else {
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsWString); var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsString);
mystr.data = "Heikki's data"; mystr.data = "Heikki's data";
p.send(mystr); p.send(mystr);
} }

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

@ -104,8 +104,8 @@ if (!sendPlainTextData) {
} else { } else {
var mystr; var mystr;
try { try {
var WSTRING_CONTRACTID = "@mozilla.org/supports-wstring;1"; var WSTRING_CONTRACTID = "@mozilla.org/supports-string;1";
mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsWString); mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsString);
mystr.data = "Heikki's data"; mystr.data = "Heikki's data";
} catch (e) { } catch (e) {
mystr = "Heikki's data"; mystr = "Heikki's data";

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

@ -790,7 +790,7 @@ NS_IMETHODIMP mozXMLTerminal::Paste()
nsMemory::Free(temCStr); nsMemory::Free(temCStr);
if (flavor.EqualsWithConversion(kHTMLMime) || flavor.EqualsWithConversion(kUnicodeMime)) { if (flavor.EqualsWithConversion(kHTMLMime) || flavor.EqualsWithConversion(kUnicodeMime)) {
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) ); nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && objLen > 0) { if (textDataObj && objLen > 0) {
PRUnichar* text = nsnull; PRUnichar* text = nsnull;
textDataObj->ToString ( &text ); textDataObj->ToString ( &text );

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

@ -128,10 +128,10 @@ nsFontListEnumerator::GetNext(nsISupports **aFont)
return NS_ERROR_UNEXPECTED; return NS_ERROR_UNEXPECTED;
} }
PRUnichar *fontName = mFonts[mIndex++]; PRUnichar *fontName = mFonts[mIndex++];
nsCOMPtr<nsISupportsWString> fontNameWrapper; nsCOMPtr<nsISupportsString> fontNameWrapper;
nsresult rv; nsresult rv;
rv = nsComponentManager::CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, nsnull, rv = nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsWString), getter_AddRefs(fontNameWrapper)); NS_GET_IID(nsISupportsString), getter_AddRefs(fontNameWrapper));
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(fontNameWrapper, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(fontNameWrapper, NS_ERROR_OUT_OF_MEMORY);
fontNameWrapper->SetData(NS_CONST_CAST(PRUnichar*, fontName)); fontNameWrapper->SetData(NS_CONST_CAST(PRUnichar*, fontName));

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

@ -206,11 +206,11 @@ NS_IMETHODIMP nsPrinterListEnumerator::GetNext(nsISupports **aPrinter)
} }
PRUnichar *printerName = mPrinters[mIndex++]; PRUnichar *printerName = mPrinters[mIndex++];
nsCOMPtr<nsISupportsWString> printerNameWrapper; nsCOMPtr<nsISupportsString> printerNameWrapper;
nsresult rv; nsresult rv;
rv = nsComponentManager::CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, nsnull, rv = nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsWString), getter_AddRefs(printerNameWrapper)); NS_GET_IID(nsISupportsString), getter_AddRefs(printerNameWrapper));
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(printerNameWrapper, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(printerNameWrapper, NS_ERROR_OUT_OF_MEMORY);
printerNameWrapper->SetData(NS_CONST_CAST(PRUnichar*, printerName)); printerNameWrapper->SetData(NS_CONST_CAST(PRUnichar*, printerName));

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

@ -503,7 +503,7 @@ nsExtensibleStringBundle::Init(const char * aCategory,
if (NS_FAILED(rv)) if (NS_FAILED(rv))
continue; continue;
nsCOMPtr<nsISupportsString> supStr = do_QueryInterface(supports, &rv); nsCOMPtr<nsISupportsCString> supStr = do_QueryInterface(supports, &rv);
if (NS_FAILED(rv)) if (NS_FAILED(rv))
continue; continue;

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

@ -297,7 +297,7 @@ nsCharsetConverterManager::GetList(const nsACString& aCategory,
if (NS_FAILED(enumerator->GetNext(getter_AddRefs(supports)))) if (NS_FAILED(enumerator->GetNext(getter_AddRefs(supports))))
continue; continue;
nsCOMPtr<nsISupportsString> supStr = do_QueryInterface(supports); nsCOMPtr<nsISupportsCString> supStr = do_QueryInterface(supports);
if (!supStr) if (!supStr)
continue; continue;

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

@ -389,7 +389,7 @@ nsXPCComponents_Classes::NewEnumerate(nsIXPConnectWrappedNative *wrapper,
if(NS_SUCCEEDED(e->HasMoreElements(&hasMore)) && hasMore && if(NS_SUCCEEDED(e->HasMoreElements(&hasMore)) && hasMore &&
NS_SUCCEEDED(e->GetNext(getter_AddRefs(isup))) && isup) NS_SUCCEEDED(e->GetNext(getter_AddRefs(isup))) && isup)
{ {
nsCOMPtr<nsISupportsString> holder(do_QueryInterface(isup)); nsCOMPtr<nsISupportsCString> holder(do_QueryInterface(isup));
if(holder) if(holder)
{ {
char* name; char* name;

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

@ -33,8 +33,8 @@ var same = Object;
// 6) function to use for comparing strings (null means use default compare) // 6) function to use for comparing strings (null means use default compare)
var data = [ var data = [
["supports-id" ,"nsISupportsID" ,iface_test,i_str ,eqfn , null], ["supports-id" ,"nsISupportsID" ,iface_test,i_str ,eqfn , null],
["supports-string" ,"nsISupportsString" ,"foo" ,same ,null , null], ["supports-cstring" ,"nsISupportsCString" ,"foo" ,same ,null , null],
["supports-wstring" ,"nsISupportsWString" ,"bar" ,same ,null , null], ["supports-string" ,"nsISupportsString" ,"bar" ,same ,null , null],
["supports-PRBool" ,"nsISupportsPRBool" ,true ,same ,null , null], ["supports-PRBool" ,"nsISupportsPRBool" ,true ,same ,null , null],
["supports-PRBool" ,"nsISupportsPRBool" ,false ,same ,null , null], ["supports-PRBool" ,"nsISupportsPRBool" ,false ,same ,null , null],
["supports-PRUint8" ,"nsISupportsPRUint8" ,7 ,same ,null , null], ["supports-PRUint8" ,"nsISupportsPRUint8" ,7 ,same ,null , null],

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

@ -70,8 +70,8 @@ var same = Object;
var data = [ var data = [
["supports-id" ,"nsISupportsID" ,iface_test,i_str ,eqfn , null], ["supports-id" ,"nsISupportsID" ,iface_test,i_str ,eqfn , null],
["supports-string" ,"nsISupportsString" ,"foo" ,same ,null , null], ["supports-cstring" ,"nsISupportsCString" ,"foo" ,same ,null , null],
["supports-wstring" ,"nsISupportsWString" ,"bar" ,same ,null , null], ["supports-string" ,"nsISupportsString" ,"bar" ,same ,null , null],
["supports-PRBool" ,"nsISupportsPRBool" ,true ,same ,null , null], ["supports-PRBool" ,"nsISupportsPRBool" ,true ,same ,null , null],
["supports-PRBool" ,"nsISupportsPRBool" ,false ,same ,null , null], ["supports-PRBool" ,"nsISupportsPRBool" ,false ,same ,null , null],
["supports-PRUint8" ,"nsISupportsPRUint8" ,7 ,same ,null , null], ["supports-PRUint8" ,"nsISupportsPRUint8" ,7 ,same ,null , null],

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

@ -100,7 +100,7 @@ nsAutoCopyService::Listen(nsISelection *aDomSelection)
/* /*
* What we do now: * What we do now:
* On every selection change, we copy to the clipboard anew, creating a * On every selection change, we copy to the clipboard anew, creating a
* HTML buffer, a transferable, an nsISupportsWString and * HTML buffer, a transferable, an nsISupportsString and
* a huge mess every time. This is basically what nsPresShell::DoCopy does * a huge mess every time. This is basically what nsPresShell::DoCopy does
* to move the selection into the clipboard for Edit->Copy. * to move the selection into the clipboard for Edit->Copy.
* *

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

@ -6257,7 +6257,7 @@ DocumentViewerImpl::CheckForPrinters(nsIPrintOptions* aPrintOptions,
aPrintSettings->GetPrinterName(&defPrinterName); aPrintSettings->GetPrinterName(&defPrinterName);
if (!defPrinterName || (defPrinterName && !*defPrinterName)) { if (!defPrinterName || (defPrinterName && !*defPrinterName)) {
if (defPrinterName) nsMemory::Free(defPrinterName); if (defPrinterName) nsMemory::Free(defPrinterName);
nsCOMPtr<nsISupportsWString> wStr = do_QueryInterface(supps); nsCOMPtr<nsISupportsString> wStr = do_QueryInterface(supps);
if (wStr) { if (wStr) {
PRUnichar* defPrinterName; PRUnichar* defPrinterName;
wStr->ToString(&defPrinterName); wStr->ToString(&defPrinterName);

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

@ -69,8 +69,8 @@ nsPresState::GetStateProperty(const nsAString& aName,
const nsPromiseFlatString& flatString = PromiseFlatString(aName); const nsPromiseFlatString& flatString = PromiseFlatString(aName);
nsStringKey key(flatString); nsStringKey key(flatString);
nsCOMPtr<nsISupportsString> supportsStr = nsCOMPtr<nsISupportsCString> supportsStr =
dont_AddRef(NS_STATIC_CAST(nsISupportsString*, dont_AddRef(NS_STATIC_CAST(nsISupportsCString*,
mPropertyTable->Get(&key))); mPropertyTable->Get(&key)));
if (supportsStr) { if (supportsStr) {
@ -96,7 +96,7 @@ nsPresState::SetStateProperty(const nsAString& aName, const nsAString& aValue)
const nsPromiseFlatString& flatString = PromiseFlatString(aName); const nsPromiseFlatString& flatString = PromiseFlatString(aName);
nsStringKey key(flatString); nsStringKey key(flatString);
nsCOMPtr<nsISupportsString> supportsStr(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); nsCOMPtr<nsISupportsCString> supportsStr(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
NS_ENSURE_TRUE(supportsStr, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(supportsStr, NS_ERROR_OUT_OF_MEMORY);
supportsStr->SetData(NS_ConvertUCS2toUTF8(aValue).get()); supportsStr->SetData(NS_ConvertUCS2toUTF8(aValue).get());

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

@ -100,7 +100,7 @@ nsAutoCopyService::Listen(nsISelection *aDomSelection)
/* /*
* What we do now: * What we do now:
* On every selection change, we copy to the clipboard anew, creating a * On every selection change, we copy to the clipboard anew, creating a
* HTML buffer, a transferable, an nsISupportsWString and * HTML buffer, a transferable, an nsISupportsString and
* a huge mess every time. This is basically what nsPresShell::DoCopy does * a huge mess every time. This is basically what nsPresShell::DoCopy does
* to move the selection into the clipboard for Edit->Copy. * to move the selection into the clipboard for Edit->Copy.
* *

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

@ -195,14 +195,14 @@ nsresult nsCopySupport::HTMLCopy(nsISelection *aSel, nsIDocument *aDoc, PRInt16
} }
// get wStrings to hold clip data // get wStrings to hold clip data
nsCOMPtr<nsISupportsWString> dataWrapper, contextWrapper, infoWrapper; nsCOMPtr<nsISupportsString> dataWrapper, contextWrapper, infoWrapper;
dataWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); dataWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE);
if (bIsHTMLCopy) if (bIsHTMLCopy)
{ {
contextWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); contextWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE);
infoWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID); infoWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE); NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE);
} }

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

@ -69,8 +69,8 @@ nsPresState::GetStateProperty(const nsAString& aName,
const nsPromiseFlatString& flatString = PromiseFlatString(aName); const nsPromiseFlatString& flatString = PromiseFlatString(aName);
nsStringKey key(flatString); nsStringKey key(flatString);
nsCOMPtr<nsISupportsString> supportsStr = nsCOMPtr<nsISupportsCString> supportsStr =
dont_AddRef(NS_STATIC_CAST(nsISupportsString*, dont_AddRef(NS_STATIC_CAST(nsISupportsCString*,
mPropertyTable->Get(&key))); mPropertyTable->Get(&key)));
if (supportsStr) { if (supportsStr) {
@ -96,7 +96,7 @@ nsPresState::SetStateProperty(const nsAString& aName, const nsAString& aValue)
const nsPromiseFlatString& flatString = PromiseFlatString(aName); const nsPromiseFlatString& flatString = PromiseFlatString(aName);
nsStringKey key(flatString); nsStringKey key(flatString);
nsCOMPtr<nsISupportsString> supportsStr(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); nsCOMPtr<nsISupportsCString> supportsStr(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
NS_ENSURE_TRUE(supportsStr, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(supportsStr, NS_ERROR_OUT_OF_MEMORY);
supportsStr->SetData(NS_ConvertUCS2toUTF8(aValue).get()); supportsStr->SetData(NS_ConvertUCS2toUTF8(aValue).get());

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

@ -49,7 +49,7 @@ function fillSettings()
try { try {
var prefValue = var prefValue =
gPrefInt.getComplexValue(gCurrentDirectoryString + ".description", gPrefInt.getComplexValue(gCurrentDirectoryString + ".description",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch(ex) { } catch(ex) {
prefValue=""; prefValue="";
} }
@ -57,7 +57,7 @@ function fillSettings()
document.getElementById("description").value = prefValue; document.getElementById("description").value = prefValue;
ldapUrl.spec = gPrefInt.getComplexValue(gCurrentDirectoryString +".uri", ldapUrl.spec = gPrefInt.getComplexValue(gCurrentDirectoryString +".uri",
Components.interfaces. Components.interfaces.
nsISupportsWString).data; nsISupportsString).data;
document.getElementById("hostname").value = ldapUrl.host; document.getElementById("hostname").value = ldapUrl.host;
document.getElementById("port").value = ldapUrl.port; document.getElementById("port").value = ldapUrl.port;
@ -91,7 +91,7 @@ function fillSettings()
try { try {
prefValue = prefValue =
gPrefInt.getComplexValue(gCurrentDirectoryString + ".auth.dn", gPrefInt.getComplexValue(gCurrentDirectoryString + ".auth.dn",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch(ex) { } catch(ex) {
prefValue=""; prefValue="";
} }
@ -180,7 +180,7 @@ function createUniqueServername()
temp = ""; temp = "";
try{ try{
temp = gPrefInt.getComplexValue(gPrefstring+gPref_string_desc+".description", temp = gPrefInt.getComplexValue(gPrefstring+gPref_string_desc+".description",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch(e){} } catch(e){}
if (temp) if (temp)
gPref_string_desc += str[0]; gPref_string_desc += str[0];
@ -252,11 +252,11 @@ function onAccept()
} }
pref_string_title = gPref_string_desc + "." + "description"; pref_string_title = gPref_string_desc + "." + "description";
var str = Components.classes["@mozilla.org/supports-wstring;1"] var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsWString); .createInstance(Components.interfaces.nsISupportsString);
str.data = pref_string_content; str.data = pref_string_content;
gPrefInt.setComplexValue(pref_string_title, gPrefInt.setComplexValue(pref_string_title,
Components.interfaces.nsISupportsWString, str); Components.interfaces.nsISupportsString, str);
ldapUrl.host = hostname; ldapUrl.host = hostname;
pref_string_content = gLdapService. pref_string_content = gLdapService.
@ -282,11 +282,11 @@ function onAccept()
ldapUrl.options |= ldapUrl.OPT_SECURE; ldapUrl.options |= ldapUrl.OPT_SECURE;
pref_string_title = gPref_string_desc + ".uri"; pref_string_title = gPref_string_desc + ".uri";
var uri = Components.classes["@mozilla.org/supports-wstring;1"] var uri = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsWString); .createInstance(Components.interfaces.nsISupportsString);
uri.data = ldapUrl.spec; uri.data = ldapUrl.spec;
gPrefInt.setComplexValue(pref_string_title, gPrefInt.setComplexValue(pref_string_title,
Components.interfaces.nsISupportsWString, uri); Components.interfaces.nsISupportsString, uri);
pref_string_content = results; pref_string_content = results;
pref_string_title = gPref_string_desc + ".maxHits"; pref_string_title = gPref_string_desc + ".maxHits";
@ -300,11 +300,11 @@ function onAccept()
} }
pref_string_title = gPref_string_desc + ".auth.dn"; pref_string_title = gPref_string_desc + ".auth.dn";
var dnWString = Components.classes["@mozilla.org/supports-wstring;1"] var dnWString = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsWString); .createInstance(Components.interfaces.nsISupportsString);
dnWString.data = dn; dnWString.data = dn;
gPrefInt.setComplexValue(pref_string_title, gPrefInt.setComplexValue(pref_string_title,
Components.interfaces.nsISupportsWString, Components.interfaces.nsISupportsString,
dnWString); dnWString);
// We don't actually allow the password to be saved in the preferences; // We don't actually allow the password to be saved in the preferences;

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

@ -89,7 +89,7 @@ function setupDirectoriesList()
document.getElementById("identity.directoryServer").getAttribute('value'); document.getElementById("identity.directoryServer").getAttribute('value');
try { try {
var directoryServerString = gPrefInt.getComplexValue(directoryServer + ".description", var directoryServerString = gPrefInt.getComplexValue(directoryServer + ".description",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} }
catch(ex) {} catch(ex) {}
if (directoryServerFlag || !directoryServerString) { if (directoryServerFlag || !directoryServerString) {
@ -163,7 +163,7 @@ function LoadDirectories(popup)
if ((position != 0) && (dirType == 1)) { if ((position != 0) && (dirType == 1)) {
try{ try{
description = gPrefInt.getComplexValue(arrayOfDirectories[i]+".description", description = gPrefInt.getComplexValue(arrayOfDirectories[i]+".description",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} }
catch(ex){ catch(ex){
description=""; description="";
@ -199,7 +199,7 @@ function LoadDirectories(popup)
try { try {
directoryDescription = gPrefInt. directoryDescription = gPrefInt.
getComplexValue(directoriesList.value + ".description", getComplexValue(directoriesList.value + ".description",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} }
catch (ex) {} catch (ex) {}
} }
@ -227,7 +227,7 @@ function LoadDirectories(popup)
try { try {
directoryDescription = gPrefInt. directoryDescription = gPrefInt.
getComplexValue(directoriesList.value + ".description", getComplexValue(directoriesList.value + ".description",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} }
catch (ex) {} catch (ex) {}
} }
@ -266,7 +266,7 @@ function LoadDirectories(popup)
pref_string_title = directoryServer + ".description"; pref_string_title = directoryServer + ".description";
try { try {
description = gPrefInt.getComplexValue(pref_string_title, description = gPrefInt.getComplexValue(pref_string_title,
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} }
catch (ex) { catch (ex) {
description = ""; description = "";

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

@ -545,7 +545,7 @@ function DropOnAddressListTree(event)
var bestFlavor = new Object(); var bestFlavor = new Object();
var len = new Object(); var len = new Object();
trans.getAnyTransferData ( bestFlavor, dataObj, len ); trans.getAnyTransferData ( bestFlavor, dataObj, len );
if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString); if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if ( !dataObj ) continue; if ( !dataObj ) continue;
// pull the URL out of the data object // pull the URL out of the data object

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

@ -365,7 +365,7 @@ function DropOnBucketPane(event)
var len = new Object(); var len = new Object();
trans.getAnyTransferData ( bestFlavor, dataObj, len ); trans.getAnyTransferData ( bestFlavor, dataObj, len );
if ( dataObj ) if ( dataObj )
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString); dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if ( !dataObj ) if ( !dataObj )
continue; continue;

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

@ -320,12 +320,12 @@ nsAbLDAPAutoCompFormatter::FormatException(PRInt32 aState,
// pass the alert message in as the param; if that fails, proceed anyway // pass the alert message in as the param; if that fails, proceed anyway
// //
nsCOMPtr<nsISupportsWString> alert(do_CreateInstance( nsCOMPtr<nsISupportsString> alert(do_CreateInstance(
NS_SUPPORTS_WSTRING_CONTRACTID, NS_SUPPORTS_STRING_CONTRACTID,
&rv)); &rv));
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
NS_WARNING("nsAbLDAPAutoCompFormatter::FormatException(): " NS_WARNING("nsAbLDAPAutoCompFormatter::FormatException(): "
"could not create nsISupportsWString"); "could not create nsISupportsString");
} else { } else {
rv = alert->SetData(alertMsg.get()); rv = alert->SetData(alertMsg.get());
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {

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

@ -149,13 +149,13 @@ nsresult nsAbLDAPDirectory::InitiateConnection ()
// get the login information, if there is any // get the login information, if there is any
// //
nsCOMPtr<nsISupportsWString> login; nsCOMPtr<nsISupportsString> login;
rv = prefs->GetComplexValue( rv = prefs->GetComplexValue(
PromiseFlatCString( PromiseFlatCString(
Substring(mURINoQuery, kLDAPDirectoryRootLen, Substring(mURINoQuery, kLDAPDirectoryRootLen,
mURINoQuery.Length() - kLDAPDirectoryRootLen) mURINoQuery.Length() - kLDAPDirectoryRootLen)
+ NS_LITERAL_CSTRING(".auth.dn")).get(), + NS_LITERAL_CSTRING(".auth.dn")).get(),
NS_GET_IID(nsISupportsWString), getter_AddRefs(login)); NS_GET_IID(nsISupportsString), getter_AddRefs(login));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
rv = login->ToString(getter_Copies(mLogin)); rv = login->ToString(getter_Copies(mLogin));
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {

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

@ -1206,7 +1206,7 @@ NS_IMETHODIMP nsAbView::GetSelectedAddresses(nsISupportsArray **_retval)
NS_ENSURE_SUCCESS(rv,rv); NS_ENSURE_SUCCESS(rv,rv);
if (!primaryEmail.IsEmpty()) { if (!primaryEmail.IsEmpty()) {
nsCOMPtr<nsISupportsString> supportsEmail(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); nsCOMPtr<nsISupportsCString> supportsEmail(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
supportsEmail->SetDataWithLength(primaryEmail.Length(), ToNewCString(primaryEmail)); supportsEmail->SetDataWithLength(primaryEmail.Length(), ToNewCString(primaryEmail));
addresses->AppendElement(supportsEmail); addresses->AppendElement(supportsEmail);
} }
@ -1217,7 +1217,7 @@ NS_IMETHODIMP nsAbView::GetSelectedAddresses(nsISupportsArray **_retval)
NS_ENSURE_SUCCESS(rv,rv); NS_ENSURE_SUCCESS(rv,rv);
if (!primaryEmail.IsEmpty()) { if (!primaryEmail.IsEmpty()) {
nsCOMPtr<nsISupportsString> supportsEmail(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); nsCOMPtr<nsISupportsCString> supportsEmail(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
supportsEmail->SetDataWithLength(primaryEmail.Length(), ToNewCString(primaryEmail)); supportsEmail->SetDataWithLength(primaryEmail.Length(), ToNewCString(primaryEmail));
addresses->AppendElement(supportsEmail); addresses->AppendElement(supportsEmail);
} }

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

@ -80,7 +80,7 @@ function nsLDAPPrefsService() {
if ((position != 0) && (dirType == 1)) { if ((position != 0) && (dirType == 1)) {
try{ try{
description = gPrefInt.getComplexValue(arrayOfDirectories[i]+".description", description = gPrefInt.getComplexValue(arrayOfDirectories[i]+".description",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} }
catch(ex){ catch(ex){
description = null; description = null;
@ -219,7 +219,7 @@ function () {
ldapUrl.host = host; ldapUrl.host = host;
try{ try{
dn = gPrefInt.getComplexValue(pref_string + ".searchBase", dn = gPrefInt.getComplexValue(pref_string + ".searchBase",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} }
catch (ex) { catch (ex) {
dn = null; dn = null;
@ -248,10 +248,10 @@ function () {
ldapUrl.port = port; ldapUrl.port = port;
ldapUrl.scope = 2; ldapUrl.scope = 2;
var uri = Components.classes["@mozilla.org/supports-wstring;1"] var uri = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsWString); .createInstance(Components.interfaces.nsISupportsString);
uri.data = ldapUrl.spec; uri.data = ldapUrl.spec;
gPrefInt.setComplexValue(pref_string + ".uri", Components.interfaces.nsISupportsWString, uri); gPrefInt.setComplexValue(pref_string + ".uri", Components.interfaces.nsISupportsString, uri);
/* is this server selected for autocompletion? /* is this server selected for autocompletion?
if yes, convert the preference to mozilla format. if yes, convert the preference to mozilla format.

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

@ -223,7 +223,7 @@ function NewMessageToSelectedAddresses(type, format, identity) {
if (composeFields) { if (composeFields) {
var addressList = ""; var addressList = "";
for (var i = 0; i < addresses.Count(); i++) { for (var i = 0; i < addresses.Count(); i++) {
addressList = addressList + (i > 0 ? ",":"") + addresses.GetElementAt(i).QueryInterface(Components.interfaces.nsISupportsString).data; addressList = addressList + (i > 0 ? ",":"") + addresses.GetElementAt(i).QueryInterface(Components.interfaces.nsISupportsCString).data;
} }
composeFields.to = addressList; composeFields.to = addressList;
params.composeFields = composeFields; params.composeFields = composeFields;

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

@ -91,7 +91,7 @@ function CanDropOnFolderTree(index)
continue; //no data so continue; continue; //no data so continue;
} }
if (dataObj) if (dataObj)
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString); dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if (! dataObj) if (! dataObj)
continue; continue;
@ -235,7 +235,7 @@ function DropOnFolderTree(row, orientation)
var len = new Object(); var len = new Object();
trans.getAnyTransferData(bestFlavor, dataObj, len); trans.getAnyTransferData(bestFlavor, dataObj, len);
if (dataObj) if (dataObj)
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString); dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if (! dataObj) if (! dataObj)
continue; continue;
@ -420,7 +420,7 @@ function BeginDragTree(event, tree, selArray, flavor)
if (!trans) if (!trans)
return false; return false;
var genTextData = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(Components.interfaces.nsISupportsWString); var genTextData = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
if (!genTextData) if (!genTextData)
return false; return false;

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

@ -112,7 +112,7 @@ NS_IMETHODIMP nsMessengerBootstrap::OpenMessengerWindowWithUri(const char *windo
// create scriptable versions of our strings that we can store in our nsISupportsArray.... // create scriptable versions of our strings that we can store in our nsISupportsArray....
if (aFolderURI) if (aFolderURI)
{ {
nsCOMPtr<nsISupportsString> scriptableFolderURI (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); nsCOMPtr<nsISupportsCString> scriptableFolderURI (do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
NS_ENSURE_TRUE(scriptableFolderURI, NS_ERROR_FAILURE); NS_ENSURE_TRUE(scriptableFolderURI, NS_ERROR_FAILURE);
scriptableFolderURI->SetData(aFolderURI); scriptableFolderURI->SetData(aFolderURI);

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

@ -655,7 +655,7 @@ nsMsgAccountManagerDataSource::appendGenericSettingsResources(nsIMsgIncomingServ
rv = catman->EnumerateCategory(MAILNEWS_ACCOUNTMANAGER_EXTENSIONS, getter_AddRefs(e)); rv = catman->EnumerateCategory(MAILNEWS_ACCOUNTMANAGER_EXTENSIONS, getter_AddRefs(e));
if(NS_SUCCEEDED(rv) && e) { if(NS_SUCCEEDED(rv) && e) {
while (PR_TRUE) { while (PR_TRUE) {
nsCOMPtr<nsISupportsString> catEntry; nsCOMPtr<nsISupportsCString> catEntry;
rv = e->GetNext(getter_AddRefs(catEntry)); rv = e->GetNext(getter_AddRefs(catEntry));
if (NS_FAILED(rv) || !catEntry) if (NS_FAILED(rv) || !catEntry)
break; break;

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

@ -885,7 +885,7 @@ function setupLdapAutocompleteSession()
try { try {
serverURL.spec = sPrefs.getComplexValue(autocompleteDirectory +".uri", serverURL.spec = sPrefs.getComplexValue(autocompleteDirectory +".uri",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch (ex) { } catch (ex) {
dump("ERROR: " + ex + "\n"); dump("ERROR: " + ex + "\n");
} }
@ -897,7 +897,7 @@ function setupLdapAutocompleteSession()
try { try {
login = sPrefs.getComplexValue( login = sPrefs.getComplexValue(
autocompleteDirectory + ".auth.dn", autocompleteDirectory + ".auth.dn",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch (ex) { } catch (ex) {
// if we don't have this pref, no big deal // if we don't have this pref, no big deal
} }
@ -952,7 +952,7 @@ function setupLdapAutocompleteSession()
ldapFormatter.nameFormat = ldapFormatter.nameFormat =
sPrefs.getComplexValue(autocompleteDirectory + sPrefs.getComplexValue(autocompleteDirectory +
".autoComplete.nameFormat", ".autoComplete.nameFormat",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch (ex) { } catch (ex) {
// if this pref isn't there, no big deal. just let // if this pref isn't there, no big deal. just let
// nsAbLDAPAutoCompFormatter use its default. // nsAbLDAPAutoCompFormatter use its default.
@ -964,7 +964,7 @@ function setupLdapAutocompleteSession()
ldapFormatter.addressFormat = ldapFormatter.addressFormat =
sPrefs.getComplexValue(autocompleteDirectory + sPrefs.getComplexValue(autocompleteDirectory +
".autoComplete.addressFormat", ".autoComplete.addressFormat",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch (ex) { } catch (ex) {
// if this pref isn't there, no big deal. just let // if this pref isn't there, no big deal. just let
// nsAbLDAPAutoCompFormatter use its default. // nsAbLDAPAutoCompFormatter use its default.
@ -988,7 +988,7 @@ function setupLdapAutocompleteSession()
// //
ldapFormatter.commentFormat = sPrefs.getComplexValue( ldapFormatter.commentFormat = sPrefs.getComplexValue(
autocompleteDirectory + ".description", autocompleteDirectory + ".description",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
break; break;
case 2: case 2:
@ -998,7 +998,7 @@ function setupLdapAutocompleteSession()
ldapFormatter.commentFormat = ldapFormatter.commentFormat =
sPrefs.getComplexValue(autocompleteDirectory + sPrefs.getComplexValue(autocompleteDirectory +
".autoComplete.commentFormat", ".autoComplete.commentFormat",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch (innerException) { } catch (innerException) {
// if nothing has been specified, use the ldap // if nothing has been specified, use the ldap
// organization field // organization field
@ -1028,7 +1028,7 @@ function setupLdapAutocompleteSession()
LDAPSession.outputFormat = LDAPSession.outputFormat =
sPrefs.getComplexValue(autocompleteDirectory + sPrefs.getComplexValue(autocompleteDirectory +
".autoComplete.outputFormat", ".autoComplete.outputFormat",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch (ex) { } catch (ex) {
// if this pref isn't there, no big deal. just let // if this pref isn't there, no big deal. just let
@ -1040,7 +1040,7 @@ function setupLdapAutocompleteSession()
try { try {
LDAPSession.filterTemplate = sPrefs.getComplexValue( LDAPSession.filterTemplate = sPrefs.getComplexValue(
autocompleteDirectory + ".autoComplete.filterTemplate", autocompleteDirectory + ".autoComplete.filterTemplate",
Components.interfaces.nsISupportsWString).data; Components.interfaces.nsISupportsString).data;
} catch (ex) { } catch (ex) {
// if this pref isn't there, no big deal. just let // if this pref isn't there, no big deal. just let

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

@ -770,7 +770,7 @@ function DropOnAddressingWidget(event)
var len = new Object(); var len = new Object();
trans.getAnyTransferData ( bestFlavor, dataObj, len ); trans.getAnyTransferData ( bestFlavor, dataObj, len );
if ( dataObj ) if ( dataObj )
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString); dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if ( !dataObj ) if ( !dataObj )
continue; continue;
@ -834,14 +834,14 @@ function awRecipientErrorCommand(errItem, element)
// try and get the string of the specific error to contruct the complete // try and get the string of the specific error to contruct the complete
// err msg, otherwise fall back to something generic. This message is // err msg, otherwise fall back to something generic. This message is
// handed to us as an nsISupportsWString in the param slot of the // handed to us as an nsISupportsString in the param slot of the
// autocomplete error item, by agreement documented in // autocomplete error item, by agreement documented in
// nsILDAPAutoCompFormatter.idl // nsILDAPAutoCompFormatter.idl
// //
var specificErrString = ""; var specificErrString = "";
try { try {
var specificError = errItem.param.QueryInterface( var specificError = errItem.param.QueryInterface(
Components.interfaces.nsISupportsWString); Components.interfaces.nsISupportsString);
specificErrString = specificError.data; specificErrString = specificError.data;
} catch (ex) { } catch (ex) {
} }

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

@ -81,8 +81,8 @@ nsMsgComposeProgress::OpenProgress(nsIDOMWindowInternal *parent,
rv = NS_NewISupportsArray(getter_AddRefs(array)); rv = NS_NewISupportsArray(getter_AddRefs(array));
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsISupportsWString> strptr = nsCOMPtr<nsISupportsString> strptr =
do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv); do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
strptr->SetData(subject); strptr->SetData(subject);

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

@ -160,7 +160,7 @@ NS_IMETHODIMP nsComm4xMailImport::GetImportInterface(const char *pImportType, ns
nsXPIDLString name; nsXPIDLString name;
rv = m_pBundle->GetStringFromID( COMM4XMAILIMPORT_NAME, getter_Copies(name)); rv = m_pBundle->GetStringFromID( COMM4XMAILIMPORT_NAME, getter_Copies(name));
nsCOMPtr<nsISupportsWString> nameString (do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv)); nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv,rv); NS_ENSURE_SUCCESS(rv,rv);
nameString->SetData(name.get()); nameString->SetData(name.get());
pGeneric->SetData("name", nameString); pGeneric->SetData("name", nameString);

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

@ -287,7 +287,7 @@ NS_IMETHODIMP nsEudoraImport::GetImportInterface( const char *pImportType, nsISu
pGeneric->SetData( "mailInterface", pMail); pGeneric->SetData( "mailInterface", pMail);
nsString name; nsString name;
nsEudoraStringBundle::GetStringByID( EUDORAIMPORT_NAME, name); nsEudoraStringBundle::GetStringByID( EUDORAIMPORT_NAME, name);
nsCOMPtr<nsISupportsWString> nameString (do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv)); nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
nameString->SetData(name.get()); nameString->SetData(name.get());
pGeneric->SetData( "name", nameString); pGeneric->SetData( "name", nameString);

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

@ -267,7 +267,7 @@ NS_IMETHODIMP nsOEImport::GetImportInterface( const char *pImportType, nsISuppor
pGeneric->SetData( "mailInterface", pMail); pGeneric->SetData( "mailInterface", pMail);
nsString name; nsString name;
nsOEStringBundle::GetStringByID( OEIMPORT_NAME, name); nsOEStringBundle::GetStringByID( OEIMPORT_NAME, name);
nsCOMPtr<nsISupportsWString> nameString (do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv)); nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
nameString->SetData(name.get()); nameString->SetData(name.get());
pGeneric->SetData( "name", nameString); pGeneric->SetData( "name", nameString);

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

@ -267,7 +267,7 @@ NS_IMETHODIMP nsOutlookImport::GetImportInterface( const char *pImportType, nsIS
pGeneric->SetData( "mailInterface", pMail); pGeneric->SetData( "mailInterface", pMail);
nsString name; nsString name;
nsOutlookStringBundle::GetStringByID( OUTLOOKIMPORT_NAME, name); nsOutlookStringBundle::GetStringByID( OUTLOOKIMPORT_NAME, name);
nsCOMPtr<nsISupportsWString> nameString (do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv)); nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
nameString->SetData(name.get()); nameString->SetData(name.get());
pGeneric->SetData( "name", nameString); pGeneric->SetData( "name", nameString);

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

@ -44,7 +44,7 @@
#include "nsISupports.idl" #include "nsISupports.idl"
interface nsIDOMWindowInternal; interface nsIDOMWindowInternal;
interface nsISupportsWString; interface nsISupportsString;
[scriptable, uuid(9b5c20c0-2348-11d3-a206-00a0cc26da63)] [scriptable, uuid(9b5c20c0-2348-11d3-a206-00a0cc26da63)]
interface nsIImportGeneric : nsISupports interface nsIImportGeneric : nsISupports
@ -95,7 +95,7 @@ interface nsIImportGeneric : nsISupports
failure of the import. Failure can be reported even if WantsProgress failure of the import. Failure can be reported even if WantsProgress
returned TRUE. returned TRUE.
*/ */
boolean BeginImport( in nsISupportsWString successLog, in nsISupportsWString errorLog, in boolean isAddrLocHome); boolean BeginImport( in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome);
/* /*
If WantsProgress returned TRUE then this will indicate if the import should If WantsProgress returned TRUE then this will indicate if the import should
continue. If this returns FALSE then no other methods should be called continue. If this returns FALSE then no other methods should be called

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

@ -220,7 +220,7 @@ function FetchSampleData()
var data = top.addInterface.GetData( "sampleData-"+num); var data = top.addInterface.GetData( "sampleData-"+num);
var result = false; var result = false;
if (data != null) { if (data != null) {
data = data.QueryInterface( Components.interfaces.nsISupportsWString); data = data.QueryInterface( Components.interfaces.nsISupportsString);
if (data != null) { if (data != null) {
ShowSampleData( data.data); ShowSampleData( data.data);
result = true; result = true;

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

@ -164,13 +164,13 @@ function ImportDialogOKButton()
{ {
case "mail": case "mail":
top.successStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(); top.successStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.successStr) { if (top.successStr) {
top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsWString); top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsString);
} }
top.errorStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(); top.errorStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.errorStr) if (top.errorStr)
top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsWString); top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsString);
if (ImportMail( module, top.successStr, top.errorStr) == true) if (ImportMail( module, top.successStr, top.errorStr) == true)
{ {
@ -206,15 +206,15 @@ function ImportDialogOKButton()
break; break;
case "addressbook": case "addressbook":
top.successStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(); top.successStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.successStr) if (top.successStr)
top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsWString); top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsString);
top.errorStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(); top.errorStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.errorStr) if (top.errorStr)
top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsWString); top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsString);
top.inputStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(); top.inputStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.inputStr) if (top.inputStr)
top.inputStr = top.inputStr.QueryInterface( Components.interfaces.nsISupportsWString); top.inputStr = top.inputStr.QueryInterface( Components.interfaces.nsISupportsString);
if (ImportAddress( module, top.successStr, top.errorStr) == true) { if (ImportAddress( module, top.successStr, top.errorStr) == true) {
// We think it was a success, either, we need to // We think it was a success, either, we need to
@ -376,7 +376,7 @@ function ContinueImport( info) {
if (isMail) { if (isMail) {
var mailName = info.importInterface.GetData( "currentMailbox"); var mailName = info.importInterface.GetData( "currentMailbox");
if (mailName) { if (mailName) {
mailName = mailName.QueryInterface( Components.interfaces.nsISupportsWString); mailName = mailName.QueryInterface( Components.interfaces.nsISupportsString);
if (mailName) if (mailName)
SetStatusText( mailName.data); SetStatusText( mailName.data);
} }

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

@ -72,7 +72,7 @@ static NS_DEFINE_CID(kAbDirectoryCID, NS_ABDIRECTORY_CID);
static NS_DEFINE_CID(kStandardUrlCID, NS_STANDARDURL_CID); static NS_DEFINE_CID(kStandardUrlCID, NS_STANDARDURL_CID);
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID); static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_WSTRING_CID); static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_STRING_CID);
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID); static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
@ -102,8 +102,8 @@ public:
/* boolean WantsProgress (); */ /* boolean WantsProgress (); */
NS_IMETHOD WantsProgress(PRBool *_retval); NS_IMETHOD WantsProgress(PRBool *_retval);
/* boolean BeginImport (in nsISupportsWString successLog, in nsISupportsWString errorLog, in boolean isAddrLocHome); */ /* boolean BeginImport (in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome); */
NS_IMETHOD BeginImport(nsISupportsWString *successLog, nsISupportsWString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ; NS_IMETHOD BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ;
/* boolean ContinueImport (); */ /* boolean ContinueImport (); */
NS_IMETHOD ContinueImport(PRBool *_retval); NS_IMETHOD ContinueImport(PRBool *_retval);
@ -120,7 +120,7 @@ private:
void GetDefaultFieldMap( void); void GetDefaultFieldMap( void);
public: public:
static void SetLogs( nsString& success, nsString& error, nsISupportsWString *pSuccess, nsISupportsWString *pError); static void SetLogs( nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError);
static void ReportError( PRUnichar *pName, nsString *pStream); static void ReportError( PRUnichar *pName, nsString *pStream);
private: private:
@ -133,8 +133,8 @@ private:
PRBool m_gotLocation; PRBool m_gotLocation;
PRBool m_found; PRBool m_found;
PRBool m_userVerify; PRBool m_userVerify;
nsISupportsWString * m_pSuccessLog; nsISupportsString * m_pSuccessLog;
nsISupportsWString * m_pErrorLog; nsISupportsString * m_pErrorLog;
PRUint32 m_totalSize; PRUint32 m_totalSize;
PRBool m_doImport; PRBool m_doImport;
AddressThreadData * m_pThreadData; AddressThreadData * m_pThreadData;
@ -152,8 +152,8 @@ public:
nsISupportsArray * books; nsISupportsArray * books;
nsIImportAddressBooks * addressImport; nsIImportAddressBooks * addressImport;
nsIImportFieldMap * fieldMap; nsIImportFieldMap * fieldMap;
nsISupportsWString * successLog; nsISupportsString * successLog;
nsISupportsWString * errorLog; nsISupportsString * errorLog;
char * pDestinationUri; char * pDestinationUri;
PRBool bAddrLocInput ; PRBool bAddrLocInput ;
@ -303,8 +303,8 @@ NS_IMETHODIMP nsImportGenericAddressBooks::GetData(const char *dataId, nsISuppor
} }
IMPORT_LOG1( "Requesting sample data #: %ld\n", (long)rNum); IMPORT_LOG1( "Requesting sample data #: %ld\n", (long)rNum);
if (m_pInterface) { if (m_pInterface) {
nsCOMPtr<nsISupportsWString> data; nsCOMPtr<nsISupportsString> data;
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsWString), getter_AddRefs( data)); rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsString), getter_AddRefs( data));
if (NS_FAILED( rv)) if (NS_FAILED( rv))
return( rv); return( rv);
PRUnichar * pData = nsnull; PRUnichar * pData = nsnull;
@ -541,7 +541,7 @@ NS_IMETHODIMP nsImportGenericAddressBooks::WantsProgress(PRBool *_retval)
return( NS_OK); return( NS_OK);
} }
void nsImportGenericAddressBooks::SetLogs( nsString& success, nsString& error, nsISupportsWString *pSuccess, nsISupportsWString *pError) void nsImportGenericAddressBooks::SetLogs( nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError)
{ {
nsString str; nsString str;
PRUnichar * pStr = nsnull; PRUnichar * pStr = nsnull;
@ -572,7 +572,7 @@ void nsImportGenericAddressBooks::SetLogs( nsString& success, nsString& error, n
} }
} }
NS_IMETHODIMP nsImportGenericAddressBooks::BeginImport(nsISupportsWString *successLog, nsISupportsWString *errorLog, PRBool isAddrLocHome, PRBool *_retval) NS_IMETHODIMP nsImportGenericAddressBooks::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval)
{ {
NS_PRECONDITION(_retval != nsnull, "null ptr"); NS_PRECONDITION(_retval != nsnull, "null ptr");
if (!_retval) if (!_retval)

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

@ -77,7 +77,7 @@ static NS_DEFINE_CID(kMsgAccountCID, NS_MSGACCOUNT_CID);
static NS_DEFINE_CID(kMsgIdentityCID, NS_MSGIDENTITY_CID); static NS_DEFINE_CID(kMsgIdentityCID, NS_MSGIDENTITY_CID);
static NS_DEFINE_CID(kMsgBiffManagerCID, NS_MSGBIFFMANAGER_CID); static NS_DEFINE_CID(kMsgBiffManagerCID, NS_MSGBIFFMANAGER_CID);
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID); static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_WSTRING_CID); static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_STRING_CID);
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
@ -106,8 +106,8 @@ public:
/* boolean WantsProgress (); */ /* boolean WantsProgress (); */
NS_IMETHOD WantsProgress(PRBool *_retval); NS_IMETHOD WantsProgress(PRBool *_retval);
/* boolean BeginImport (in nsISupportsWString successLog, in nsISupportsWString errorLog, in boolean isAddrLocHome); */ /* boolean BeginImport (in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome); */
NS_IMETHODIMP BeginImport(nsISupportsWString *successLog, nsISupportsWString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ; NS_IMETHODIMP BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ;
/* boolean ContinueImport (); */ /* boolean ContinueImport (); */
NS_IMETHOD ContinueImport(PRBool *_retval); NS_IMETHOD ContinueImport(PRBool *_retval);
@ -123,10 +123,10 @@ private:
void GetDefaultMailboxes( void); void GetDefaultMailboxes( void);
void GetDefaultLocation( void); void GetDefaultLocation( void);
void GetDefaultDestination( void); void GetDefaultDestination( void);
void GetMailboxName( PRUint32 index, nsISupportsWString *pStr); void GetMailboxName( PRUint32 index, nsISupportsString *pStr);
public: public:
static void SetLogs( nsString& success, nsString& error, nsISupportsWString *pSuccess, nsISupportsWString *pError); static void SetLogs( nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError);
static void ReportError( PRInt32 id, const PRUnichar *pName, nsString *pStream); static void ReportError( PRInt32 id, const PRUnichar *pName, nsString *pStream);
private: private:
@ -140,8 +140,8 @@ private:
PRBool m_userVerify; PRBool m_userVerify;
nsIImportMail * m_pInterface; nsIImportMail * m_pInterface;
nsISupportsArray * m_pMailboxes; nsISupportsArray * m_pMailboxes;
nsISupportsWString *m_pSuccessLog; nsISupportsString *m_pSuccessLog;
nsISupportsWString *m_pErrorLog; nsISupportsString *m_pErrorLog;
PRUint32 m_totalSize; PRUint32 m_totalSize;
PRBool m_doImport; PRBool m_doImport;
ImportThreadData * m_pThreadData; ImportThreadData * m_pThreadData;
@ -159,8 +159,8 @@ public:
PRBool ownsDestRoot; PRBool ownsDestRoot;
nsISupportsArray * boxes; nsISupportsArray * boxes;
nsIImportMail * mailImport; nsIImportMail * mailImport;
nsISupportsWString * successLog; nsISupportsString * successLog;
nsISupportsWString * errorLog; nsISupportsString * errorLog;
PRUint32 currentMailbox; PRUint32 currentMailbox;
ImportThreadData(); ImportThreadData();
@ -271,10 +271,10 @@ NS_IMETHODIMP nsImportGenericMail::GetData(const char *dataId, nsISupports **_re
} }
if (!nsCRT::strcasecmp( dataId, "currentMailbox")) { if (!nsCRT::strcasecmp( dataId, "currentMailbox")) {
// create an nsISupportsWString, get the current mailbox // create an nsISupportsString, get the current mailbox
// name being imported and put it in the string // name being imported and put it in the string
nsCOMPtr<nsISupportsWString> data; nsCOMPtr<nsISupportsString> data;
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsWString), getter_AddRefs( data)); rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsString), getter_AddRefs( data));
if (NS_FAILED( rv)) if (NS_FAILED( rv))
return( rv); return( rv);
if (m_pThreadData) { if (m_pThreadData) {
@ -323,9 +323,9 @@ NS_IMETHODIMP nsImportGenericMail::SetData( const char *dataId, nsISupports *ite
if (m_pName) if (m_pName)
nsCRT::free( m_pName); nsCRT::free( m_pName);
m_pName = nsnull; m_pName = nsnull;
nsCOMPtr<nsISupportsWString> nameString; nsCOMPtr<nsISupportsString> nameString;
if (item) { if (item) {
item->QueryInterface( NS_GET_IID(nsISupportsWString), getter_AddRefs(nameString)); item->QueryInterface( NS_GET_IID(nsISupportsString), getter_AddRefs(nameString));
rv = nameString->GetData(&m_pName); rv = nameString->GetData(&m_pName);
} }
} }
@ -463,7 +463,7 @@ NS_IMETHODIMP nsImportGenericMail::WantsProgress(PRBool *_retval)
return( NS_OK); return( NS_OK);
} }
void nsImportGenericMail::GetMailboxName( PRUint32 index, nsISupportsWString *pStr) void nsImportGenericMail::GetMailboxName( PRUint32 index, nsISupportsString *pStr)
{ {
if (m_pMailboxes) { if (m_pMailboxes) {
nsISupports *pSupports = m_pMailboxes->ElementAt( index); nsISupports *pSupports = m_pMailboxes->ElementAt( index);
@ -482,7 +482,7 @@ void nsImportGenericMail::GetMailboxName( PRUint32 index, nsISupportsWString *pS
} }
} }
NS_IMETHODIMP nsImportGenericMail::BeginImport(nsISupportsWString *successLog, nsISupportsWString *errorLog, PRBool isAddrLocHome, PRBool *_retval) NS_IMETHODIMP nsImportGenericMail::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval)
{ {
NS_PRECONDITION(_retval != nsnull, "null ptr"); NS_PRECONDITION(_retval != nsnull, "null ptr");
if (!_retval) if (!_retval)
@ -639,7 +639,7 @@ void nsImportGenericMail::ReportError( PRInt32 id, const PRUnichar *pName, nsStr
} }
void nsImportGenericMail::SetLogs( nsString& success, nsString& error, nsISupportsWString *pSuccess, nsISupportsWString *pError) void nsImportGenericMail::SetLogs( nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError)
{ {
nsString str; nsString str;
PRUnichar * pStr = nsnull; PRUnichar * pStr = nsnull;

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

@ -615,7 +615,7 @@ nsresult nsImportService::DoDiscover( void)
nsCOMPtr<nsISimpleEnumerator> e; nsCOMPtr<nsISimpleEnumerator> e;
rv = catMan->EnumerateCategory( "mailnewsimport", getter_AddRefs( e)); rv = catMan->EnumerateCategory( "mailnewsimport", getter_AddRefs( e));
if (NS_FAILED( rv)) return( rv); if (NS_FAILED( rv)) return( rv);
nsCOMPtr<nsISupportsString> contractid; nsCOMPtr<nsISupportsCString> contractid;
rv = e->GetNext( getter_AddRefs( contractid)); rv = e->GetNext( getter_AddRefs( contractid));
while (NS_SUCCEEDED( rv) && contractid) { while (NS_SUCCEEDED( rv) && contractid) {
nsXPIDLCString contractIdStr; nsXPIDLCString contractIdStr;

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

@ -64,7 +64,7 @@ static void PrintImageDecoders()
do { do {
enumer->CurrentItem(getter_AddRefs(s)); enumer->CurrentItem(getter_AddRefs(s));
if (s) { if (s) {
nsCOMPtr<nsISupportsString> ss(do_QueryInterface(s)); nsCOMPtr<nsISupportsCString> ss(do_QueryInterface(s));
nsXPIDLCString xcs; nsXPIDLCString xcs;
ss->GetData(getter_Copies(xcs)); ss->GetData(getter_Copies(xcs));

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

@ -168,7 +168,7 @@ interface nsIPrefBranch : nsISupports
* @param aType The XPCOM interface that this complex preference * @param aType The XPCOM interface that this complex preference
* represents. Interfaces currently supported are: * represents. Interfaces currently supported are:
* - nsILocalFile * - nsILocalFile
* - nsISupportsWString (UniChar) * - nsISupportsString (UniChar)
* - nsIPrefLocalizedString (Localized UniChar) * - nsIPrefLocalizedString (Localized UniChar)
* - nsIFileSpec (deprecated - to be removed eventually) * - nsIFileSpec (deprecated - to be removed eventually)
* @param aValue The XPCOM object into which to the complex preference * @param aValue The XPCOM object into which to the complex preference
@ -191,7 +191,7 @@ interface nsIPrefBranch : nsISupports
* @param aType The XPCOM interface that this complex preference * @param aType The XPCOM interface that this complex preference
* represents. Interfaces currently supported are: * represents. Interfaces currently supported are:
* - nsILocalFile * - nsILocalFile
* - nsISupportsWString (UniChar) * - nsISupportsString (UniChar)
* - nsIPrefLocalizedString (Localized UniChar) * - nsIPrefLocalizedString (Localized UniChar)
* - nsIFileSpec (deprecated - to be removed eventually) * - nsIFileSpec (deprecated - to be removed eventually)
* @param aValue The XPCOM object from which to set the complex preference * @param aValue The XPCOM object from which to set the complex preference

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

@ -41,13 +41,13 @@
/** /**
* The nsIPrefLocalizedString interface is simply a wrapper interface for * The nsIPrefLocalizedString interface is simply a wrapper interface for
* nsISupportsWString so the preferences service can have a unique identifier * nsISupportsString so the preferences service can have a unique identifier
* to distinguish between requests for normal wide strings (nsISupportsWString) * to distinguish between requests for normal wide strings (nsISupportsString)
* and "localized" wide strings, which get their default values from properites * and "localized" wide strings, which get their default values from properites
* files. * files.
* *
* @see nsIPrefBranch * @see nsIPrefBranch
* @see nsISupportsWString * @see nsISupportsString
* *
* @status FROZEN * @status FROZEN
*/ */

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

@ -390,8 +390,8 @@ NS_IMETHODIMP nsPref::CopyUnicharPref(const char *pref, PRUnichar **_retval)
nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv); nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsISupportsWString> theString; nsCOMPtr<nsISupportsString> theString;
rv = prefBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsWString), rv = prefBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsString),
getter_AddRefs(theString)); getter_AddRefs(theString));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
rv = theString->GetData(_retval); rv = theString->GetData(_retval);
@ -403,9 +403,9 @@ NS_IMETHODIMP nsPref::CopyUnicharPref(const char *pref, PRUnichar **_retval)
NS_IMETHODIMP nsPref::CopyDefaultUnicharPref(const char *pref, PRUnichar **_retval) NS_IMETHODIMP nsPref::CopyDefaultUnicharPref(const char *pref, PRUnichar **_retval)
{ {
nsresult rv; nsresult rv;
nsCOMPtr<nsISupportsWString> theString; nsCOMPtr<nsISupportsString> theString;
rv = mDefaultBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsWString), rv = mDefaultBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsString),
getter_AddRefs(theString)); getter_AddRefs(theString));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
rv = theString->GetData(_retval); rv = theString->GetData(_retval);
@ -419,10 +419,10 @@ NS_IMETHODIMP nsPref::SetUnicharPref(const char *pref, const PRUnichar *value)
nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv); nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsISupportsWString> theString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv); nsCOMPtr<nsISupportsString> theString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
theString->SetData(value); theString->SetData(value);
rv = prefBranch->SetComplexValue(pref, NS_GET_IID(nsISupportsWString), theString); rv = prefBranch->SetComplexValue(pref, NS_GET_IID(nsISupportsString), theString);
} }
} }
return rv; return rv;
@ -432,10 +432,10 @@ NS_IMETHODIMP nsPref::SetDefaultUnicharPref(const char *pref, const PRUnichar *v
{ {
nsresult rv; nsresult rv;
nsCOMPtr<nsISupportsWString> theString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv); nsCOMPtr<nsISupportsString> theString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
theString->SetData(value); theString->SetData(value);
rv = mDefaultBranch->SetComplexValue(pref, NS_GET_IID(nsISupportsWString), theString); rv = mDefaultBranch->SetComplexValue(pref, NS_GET_IID(nsISupportsString), theString);
} }
return rv; return rv;
} }

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

@ -373,13 +373,13 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
return NS_OK; return NS_OK;
} }
if (aType.Equals(NS_GET_IID(nsISupportsWString))) { if (aType.Equals(NS_GET_IID(nsISupportsString))) {
nsCOMPtr<nsISupportsWString> theString(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv)); nsCOMPtr<nsISupportsString> theString(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
rv = theString->SetData(NS_ConvertUTF8toUCS2(utf8String).get()); rv = theString->SetData(NS_ConvertUTF8toUCS2(utf8String).get());
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
nsISupportsWString *temp = theString; nsISupportsString *temp = theString;
NS_ADDREF(temp); NS_ADDREF(temp);
*_retval = (void *)temp; *_retval = (void *)temp;
@ -462,8 +462,8 @@ NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID &
return SetCharPref(aPrefName, descriptorString.get()); return SetCharPref(aPrefName, descriptorString.get());
} }
if (aType.Equals(NS_GET_IID(nsISupportsWString))) { if (aType.Equals(NS_GET_IID(nsISupportsString))) {
nsCOMPtr<nsISupportsWString> theString = do_QueryInterface(aValue); nsCOMPtr<nsISupportsString> theString = do_QueryInterface(aValue);
if (theString) { if (theString) {
nsXPIDLString wideString; nsXPIDLString wideString;
@ -969,7 +969,7 @@ nsPrefLocalizedString::nsPrefLocalizedString()
NS_INIT_REFCNT(); NS_INIT_REFCNT();
mUnicodeString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv); mUnicodeString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
} }
nsPrefLocalizedString::~nsPrefLocalizedString() nsPrefLocalizedString::~nsPrefLocalizedString()
@ -987,13 +987,13 @@ NS_IMPL_THREADSAFE_RELEASE(nsPrefLocalizedString)
NS_INTERFACE_MAP_BEGIN(nsPrefLocalizedString) NS_INTERFACE_MAP_BEGIN(nsPrefLocalizedString)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrefLocalizedString) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrefLocalizedString)
NS_INTERFACE_MAP_ENTRY(nsIPrefLocalizedString) NS_INTERFACE_MAP_ENTRY(nsIPrefLocalizedString)
NS_INTERFACE_MAP_ENTRY(nsISupportsWString) NS_INTERFACE_MAP_ENTRY(nsISupportsString)
NS_INTERFACE_MAP_END NS_INTERFACE_MAP_END
nsresult nsPrefLocalizedString::Init() nsresult nsPrefLocalizedString::Init()
{ {
nsresult rv; nsresult rv;
mUnicodeString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv); mUnicodeString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
return rv; return rv;
} }

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

@ -89,20 +89,20 @@ private:
class nsPrefLocalizedString : public nsIPrefLocalizedString, class nsPrefLocalizedString : public nsIPrefLocalizedString,
public nsISupportsWString public nsISupportsString
{ {
public: public:
nsPrefLocalizedString(); nsPrefLocalizedString();
virtual ~nsPrefLocalizedString(); virtual ~nsPrefLocalizedString();
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_FORWARD_NSISUPPORTSWSTRING(mUnicodeString->) NS_FORWARD_NSISUPPORTSSTRING(mUnicodeString->)
NS_FORWARD_NSISUPPORTSPRIMITIVE(mUnicodeString->) NS_FORWARD_NSISUPPORTSPRIMITIVE(mUnicodeString->)
nsresult Init(); nsresult Init();
private: private:
nsCOMPtr<nsISupportsWString> mUnicodeString; nsCOMPtr<nsISupportsString> mUnicodeString;
}; };

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

@ -509,7 +509,7 @@ nsIOService::GetParserForScheme(const char *scheme, nsIURLParser **_retval)
rv = catmgr->EnumerateCategory(NS_IURLPARSER_KEY, getter_AddRefs(parserList)); rv = catmgr->EnumerateCategory(NS_IURLPARSER_KEY, getter_AddRefs(parserList));
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsISupportsString> entry; nsCOMPtr<nsISupportsCString> entry;
// Walk the list of parsers... // Walk the list of parsers...
while (1) { while (1) {

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

@ -100,7 +100,7 @@ interface nsIHttpChannel : nsIChannel
/** /**
* This attribute holds the MIME types corresponding to the content * This attribute holds the MIME types corresponding to the content
* encodings on the channel. The enumerator returns nsISupportsString * encodings on the channel. The enumerator returns nsISupportsCString
* objects. The first one corresponds to the outermost encoding on the * objects. The first one corresponds to the outermost encoding on the
* channel and then we work our way inward. "identity" is skipped and not * channel and then we work our way inward. "identity" is skipped and not
* represented on the list. Unknown encodings make the enumeration stop. * represented on the list. Unknown encodings make the enumeration stop.

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

@ -3271,8 +3271,8 @@ nsHttpChannel::nsContentEncodings::GetNext(nsISupports** aNextEncoding)
encoding.BeginReading(start); encoding.BeginReading(start);
encoding.EndReading(end); encoding.EndReading(end);
nsCOMPtr<nsISupportsString> str; nsCOMPtr<nsISupportsCString> str;
str = do_CreateInstance("@mozilla.org/supports-string;1"); str = do_CreateInstance("@mozilla.org/supports-cstring;1");
if (!str) if (!str)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;

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

@ -111,7 +111,7 @@ nsStreamConverterService::BuildGraph() {
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
// go through each entry to build the graph // go through each entry to build the graph
nsCOMPtr<nsISupportsString> entry; nsCOMPtr<nsISupportsCString> entry;
rv = entries->GetNext(getter_AddRefs(entry)); rv = entries->GetNext(getter_AddRefs(entry));
while (NS_SUCCEEDED(rv)) { while (NS_SUCCEEDED(rv)) {

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

@ -113,8 +113,8 @@ TestMemoryObjectCache()
goto error_exit; goto error_exit;
} }
nsCOMPtr<nsISupportsString> foo = nsCOMPtr<nsISupportsCString> foo =
do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv); do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, &rv);
foo->SetData("hello world"); foo->SetData("hello world");
@ -134,7 +134,7 @@ TestMemoryObjectCache()
goto error_exit; goto error_exit;
} }
nsCOMPtr<nsISupportsString> bar; nsCOMPtr<nsISupportsCString> bar;
descriptor->GetCacheElement(getter_AddRefs(bar)); descriptor->GetCacheElement(getter_AddRefs(bar));
if (foo.get() != bar.get()) { if (foo.get() != bar.get()) {
printf("cache elements not the same\n"); printf("cache elements not the same\n");

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

@ -29,9 +29,9 @@ function openCacheEntry(clientID, url)
function wrapString(str) function wrapString(str)
{ {
var nsISupportsString = Components.interfaces.nsISupportsString; var nsISupportsCString = Components.interfaces.nsISupportsCString;
var factory = Components.classes["@mozilla.org/supports-string;1"]; var factory = Components.classes["@mozilla.org/supports-cstring;1"];
var wrapper = factory.createInstance(nsISupportsString); var wrapper = factory.createInstance(nsISupportsCString);
wrapper.data = str; wrapper.data = str;
return wrapper; return wrapper;
} }

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

@ -613,7 +613,7 @@ nsProfile::LoadDefaultProfileDir(nsCString & profileURLStr, PRBool canInteract)
{ {
while (PR_TRUE) while (PR_TRUE)
{ {
nsCOMPtr<nsISupportsString> contractid; nsCOMPtr<nsISupportsCString> contractid;
rv = enumItem->GetNext(getter_AddRefs(contractid)); rv = enumItem->GetNext(getter_AddRefs(contractid));
if (NS_FAILED(rv) || !contractid) break; if (NS_FAILED(rv) || !contractid) break;

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

@ -316,12 +316,12 @@ GetFileLocation(const char* aPrefName,
If we have an env var we should check whether the pref is a user If we have an env var we should check whether the pref is a user
pref. If we do not, we don't care. pref. If we do not, we don't care.
*/ */
nsCOMPtr<nsISupportsWString> prefFileName; nsCOMPtr<nsISupportsString> prefFileName;
PRBool isUserPref = PR_FALSE; PRBool isUserPref = PR_FALSE;
prefBranch->PrefHasUserValue(aPrefName, &isUserPref); prefBranch->PrefHasUserValue(aPrefName, &isUserPref);
if (isUserPref) { if (isUserPref) {
rv = prefBranch->GetComplexValue(aPrefName, rv = prefBranch->GetComplexValue(aPrefName,
NS_GET_IID(nsISupportsWString), NS_GET_IID(nsISupportsString),
getter_AddRefs(prefFileName)); getter_AddRefs(prefFileName));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
return prefFileName->GetData(aFileLocation); return prefFileName->GetData(aFileLocation);
@ -353,7 +353,7 @@ GetFileLocation(const char* aPrefName,
} }
rv = prefBranch->GetComplexValue(aPrefName, rv = prefBranch->GetComplexValue(aPrefName,
NS_GET_IID(nsISupportsWString), NS_GET_IID(nsISupportsString),
getter_AddRefs(prefFileName)); getter_AddRefs(prefFileName));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
return prefFileName->GetData(aFileLocation); return prefFileName->GetData(aFileLocation);

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

@ -82,7 +82,7 @@ interface nsIClipboard : nsISupports
* inexpensive call. All it does is check if there is data on the clipboard matching * inexpensive call. All it does is check if there is data on the clipboard matching
* any of the flavors in the given list. * any of the flavors in the given list.
* *
* @aFlavorList - nsISupportsString's in a nsISupportsArray (for JavaScript). * @aFlavorList - nsISupportsCString's in a nsISupportsArray (for JavaScript).
* @param aWhichClipboard Specifies the clipboard to which this operation applies. * @param aWhichClipboard Specifies the clipboard to which this operation applies.
* @outResult - if data is present matching one of * @outResult - if data is present matching one of
* @result NS_OK if successful. * @result NS_OK if successful.

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

@ -43,14 +43,14 @@
interface nsIFormatConverter : nsISupports interface nsIFormatConverter : nsISupports
{ {
/** /**
* Get the list of the "input" data flavors (mime types as nsISupportsString), * Get the list of the "input" data flavors (mime types as nsISupportsCString),
* in otherwords, the flavors that this converter can convert "from" (the * in otherwords, the flavors that this converter can convert "from" (the
* incoming data to the converter). * incoming data to the converter).
*/ */
nsISupportsArray getInputDataFlavors ( ) ; nsISupportsArray getInputDataFlavors ( ) ;
/** /**
* Get the list of the "output" data flavors (mime types as nsISupportsString), * Get the list of the "output" data flavors (mime types as nsISupportsCString),
* in otherwords, the flavors that this converter can convert "to" (the * in otherwords, the flavors that this converter can convert "to" (the
* outgoing data to the converter). * outgoing data to the converter).
* *

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

@ -48,7 +48,7 @@
interface nsITransferable : nsISupports interface nsITransferable : nsISupports
{ {
/** /**
* Computes a list of flavors (mime types as nsISupportsString) that the transferable * Computes a list of flavors (mime types as nsISupportsCString) that the transferable
* can export, either through intrinsic knowledge or output data converters. * can export, either through intrinsic knowledge or output data converters.
* *
* @param aDataFlavorList fills list with supported flavors. This is a copy of * @param aDataFlavorList fills list with supported flavors. This is a copy of
@ -86,7 +86,7 @@ interface nsITransferable : nsISupports
/////////////////////////////// ///////////////////////////////
/** /**
* Computes a list of flavors (mime types as nsISupportsString) that the transferable can * Computes a list of flavors (mime types as nsISupportsCString) that the transferable can
* accept into it, either through intrinsic knowledge or input data converters. * accept into it, either through intrinsic knowledge or input data converters.
* *
* @param outFlavorList fills list with supported flavors. This is a copy of * @param outFlavorList fills list with supported flavors. This is a copy of

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

@ -150,7 +150,7 @@ NS_IMETHODIMP nsClipboard::SetNativeClipboardData(PRInt32 aWhichClipboard)
for (i = 0; i < cnt && rv == NS_OK; i++) { for (i = 0; i < cnt && rv == NS_OK; i++) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
dfList->GetElementAt(i, getter_AddRefs(genericFlavor)); dfList->GetElementAt(i, getter_AddRefs(genericFlavor));
nsCOMPtr<nsISupportsString> currentFlavor (do_QueryInterface(genericFlavor)); nsCOMPtr<nsISupportsCString> currentFlavor (do_QueryInterface(genericFlavor));
if (currentFlavor) { if (currentFlavor) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString(getter_Copies(flavorStr)); currentFlavor->ToString(getter_Copies(flavorStr));
@ -277,7 +277,7 @@ nsClipboard::GetNativeClipboardData(nsITransferable * aTransferable, PRInt32 aWh
for (PRUint32 i = 0; i < cnt; i++) { for (PRUint32 i = 0; i < cnt; i++) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt(i, getter_AddRefs(genericFlavor)); flavorList->GetElementAt(i, getter_AddRefs(genericFlavor));
nsCOMPtr<nsISupportsString> currentFlavor(do_QueryInterface(genericFlavor)); nsCOMPtr<nsISupportsCString> currentFlavor(do_QueryInterface(genericFlavor));
if (currentFlavor) { if (currentFlavor) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString(getter_Copies(flavorStr)); currentFlavor->ToString(getter_Copies(flavorStr));

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

@ -129,7 +129,7 @@ nsClipboard :: SetNativeClipboardData ( PRInt32 aWhichClipboard )
for ( PRUint32 i = 0; i < cnt; ++i ) { for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) { if ( currentFlavor ) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString( getter_Copies(flavorStr) ); currentFlavor->ToString( getter_Copies(flavorStr) );
@ -272,7 +272,7 @@ nsClipboard :: GetNativeClipboardData ( nsITransferable * aTransferable, PRInt32
for ( PRUint32 i = 0; i < cnt; ++i ) { for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) { if ( currentFlavor ) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString ( getter_Copies(flavorStr) ); currentFlavor->ToString ( getter_Copies(flavorStr) );
@ -426,7 +426,7 @@ nsClipboard :: GetDataOffClipboard ( ResType inMacFlavor, void** outData, PRInt3
// HasDataMatchingFlavors // HasDataMatchingFlavors
// //
// Check the clipboard to see if we have any data that matches the given flavors. This // Check the clipboard to see if we have any data that matches the given flavors. This
// does NOT actually fetch the data. The items in the flavor list are nsISupportsString's. // does NOT actually fetch the data. The items in the flavor list are nsISupportsCString's.
// //
// Handle the case where we ask for unicode and it's not there, but plain text is. We // Handle the case where we ask for unicode and it's not there, but plain text is. We
// say "yes" in that case, knowing that we will have to perform a conversion when we actually // say "yes" in that case, knowing that we will have to perform a conversion when we actually
@ -452,7 +452,7 @@ nsClipboard :: HasDataMatchingFlavors ( nsISupportsArray* aFlavorList, PRInt32 a
for ( PRUint32 i = 0; i < length; ++i ) { for ( PRUint32 i = 0; i < length; ++i ) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> flavorWrapper ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> flavorWrapper ( do_QueryInterface(genericFlavor) );
if ( flavorWrapper ) { if ( flavorWrapper ) {
nsXPIDLCString flavor; nsXPIDLCString flavor;
flavorWrapper->ToString ( getter_Copies(flavor) ); flavorWrapper->ToString ( getter_Copies(flavor) );

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

@ -391,7 +391,7 @@ nsDragService :: RegisterDragItemsAndFlavors ( nsISupportsArray * inArray )
nsCOMPtr<nsISupports> genericWrapper; nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt ( flavorIndex, getter_AddRefs(genericWrapper) ); flavorList->GetElementAt ( flavorIndex, getter_AddRefs(genericWrapper) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericWrapper) ); nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericWrapper) );
if ( currentFlavor ) { if ( currentFlavor ) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString ( getter_Copies(flavorStr) ); currentFlavor->ToString ( getter_Copies(flavorStr) );
@ -444,7 +444,7 @@ nsDragService :: GetData ( nsITransferable * aTransferable, PRUint32 aItemIndex
return NS_ERROR_INVALID_ARG; return NS_ERROR_INVALID_ARG;
// get flavor list that includes all acceptable flavors (including ones obtained through // get flavor list that includes all acceptable flavors (including ones obtained through
// conversion). Flavors are nsISupportsStrings so that they can be seen from JS. // conversion). Flavors are nsISupportsCStrings so that they can be seen from JS.
nsCOMPtr<nsISupportsArray> flavorList; nsCOMPtr<nsISupportsArray> flavorList;
errCode = aTransferable->FlavorsTransferableCanImport ( getter_AddRefs(flavorList) ); errCode = aTransferable->FlavorsTransferableCanImport ( getter_AddRefs(flavorList) );
if ( NS_FAILED(errCode) ) if ( NS_FAILED(errCode) )
@ -468,7 +468,7 @@ nsDragService :: GetData ( nsITransferable * aTransferable, PRUint32 aItemIndex
for ( int i = 0; i < cnt; ++i ) { for ( int i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericWrapper; nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt ( i, getter_AddRefs(genericWrapper) ); flavorList->GetElementAt ( i, getter_AddRefs(genericWrapper) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericWrapper) ); nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericWrapper) );
if ( currentFlavor ) { if ( currentFlavor ) {
// find MacOS flavor (but don't add it if it's not there) // find MacOS flavor (but don't add it if it's not there)
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;

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

@ -338,7 +338,7 @@ NS_IMETHODIMP nsClipboard::SetNativeClipboardData(PRInt32 aWhichClipboard)
{ {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) { if ( currentFlavor ) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString(getter_Copies(flavorStr)); currentFlavor->ToString(getter_Copies(flavorStr));
@ -440,7 +440,7 @@ nsClipboard::GetNativeClipboardData(nsITransferable * aTransferable,
for ( PRUint32 i = 0; i < cnt; ++i ) { for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) { if ( currentFlavor ) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString ( getter_Copies(flavorStr) ); currentFlavor->ToString ( getter_Copies(flavorStr) );
@ -768,7 +768,7 @@ nsClipboard::HasDataMatchingFlavors(nsISupportsArray* aFlavorList,
for ( PRUint32 i = 0; i < length; ++i ) { for ( PRUint32 i = 0; i < length; ++i ) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> flavorWrapper ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> flavorWrapper ( do_QueryInterface(genericFlavor) );
if ( flavorWrapper ) { if ( flavorWrapper ) {
nsCAutoString flavorStr; nsCAutoString flavorStr;
nsXPIDLCString myStr; nsXPIDLCString myStr;

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

@ -320,7 +320,7 @@ nsDragService::GetData (nsITransferable * aTransferable,
return NS_ERROR_INVALID_ARG; return NS_ERROR_INVALID_ARG;
// get flavor list that includes all acceptable flavors (including // get flavor list that includes all acceptable flavors (including
// ones obtained through conversion). Flavors are nsISupportsStrings // ones obtained through conversion). Flavors are nsISupportsCStrings
// so that they can be seen from JS. // so that they can be seen from JS.
nsresult rv = NS_ERROR_FAILURE; nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsISupportsArray> flavorList; nsCOMPtr<nsISupportsArray> flavorList;
@ -341,7 +341,7 @@ nsDragService::GetData (nsITransferable * aTransferable,
nsCOMPtr<nsISupports> genericWrapper; nsCOMPtr<nsISupports> genericWrapper;
// there is always one element if it's a list // there is always one element if it's a list
flavorList->GetElementAt(0, getter_AddRefs(genericWrapper)); flavorList->GetElementAt(0, getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor; nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper); currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) { if (currentFlavor) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
@ -381,7 +381,7 @@ nsDragService::GetData (nsITransferable * aTransferable,
for ( i = 0; i < cnt; ++i ) { for ( i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericWrapper; nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt(i,getter_AddRefs(genericWrapper)); flavorList->GetElementAt(i,getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor; nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper); currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) { if (currentFlavor) {
// find our gtk flavor // find our gtk flavor
@ -557,7 +557,7 @@ nsDragService::IsDataFlavorSupported (const char *aDataFlavor,
for ( PRUint32 flavorIndex = 0; flavorIndex < numFlavors ; ++flavorIndex ) { for ( PRUint32 flavorIndex = 0; flavorIndex < numFlavors ; ++flavorIndex ) {
nsCOMPtr<nsISupports> genericWrapper; nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt (flavorIndex, getter_AddRefs(genericWrapper)); flavorList->GetElementAt (flavorIndex, getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor; nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper); currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) { if (currentFlavor) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
@ -811,7 +811,7 @@ nsDragService::GetSourceList(void)
++flavorIndex ) { ++flavorIndex ) {
nsCOMPtr<nsISupports> genericWrapper; nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt(flavorIndex, getter_AddRefs(genericWrapper)); flavorList->GetElementAt(flavorIndex, getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor; nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper); currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) { if (currentFlavor) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
@ -848,7 +848,7 @@ nsDragService::GetSourceList(void)
++flavorIndex ) { ++flavorIndex ) {
nsCOMPtr<nsISupports> genericWrapper; nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt(flavorIndex, getter_AddRefs(genericWrapper)); flavorList->GetElementAt(flavorIndex, getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor; nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper); currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) { if (currentFlavor) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;

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

@ -141,7 +141,7 @@ nsClipboard::SetData(nsITransferable *aTransferable,
for (PRUint32 i=0; i < count; i++) { for (PRUint32 i=0; i < count; i++) {
nsCOMPtr<nsISupports> tastesLike; nsCOMPtr<nsISupports> tastesLike;
flavors->GetElementAt(i, getter_AddRefs(tastesLike)); flavors->GetElementAt(i, getter_AddRefs(tastesLike));
nsCOMPtr<nsISupportsString> flavor = do_QueryInterface(tastesLike); nsCOMPtr<nsISupportsCString> flavor = do_QueryInterface(tastesLike);
if (flavor) { if (flavor) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
@ -196,7 +196,7 @@ nsClipboard::GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard)
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
flavors->GetElementAt(i, getter_AddRefs(genericFlavor)); flavors->GetElementAt(i, getter_AddRefs(genericFlavor));
nsCOMPtr<nsISupportsString> currentFlavor; nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericFlavor); currentFlavor = do_QueryInterface(genericFlavor);
if (currentFlavor) { if (currentFlavor) {
@ -316,7 +316,7 @@ nsClipboard::HasDataMatchingFlavors(nsISupportsArray *aFlavorList,
for (PRUint32 i = 0; i < length && !*_retval; i++) { for (PRUint32 i = 0; i < length && !*_retval; i++) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
aFlavorList->GetElementAt(i, getter_AddRefs(genericFlavor)); aFlavorList->GetElementAt(i, getter_AddRefs(genericFlavor));
nsCOMPtr<nsISupportsString> flavorWrapper; nsCOMPtr<nsISupportsCString> flavorWrapper;
flavorWrapper = do_QueryInterface(genericFlavor); flavorWrapper = do_QueryInterface(genericFlavor);
if (flavorWrapper) { if (flavorWrapper) {
@ -436,7 +436,7 @@ nsClipboard::SelectionGetEvent (GtkWidget *aWidget,
if (!item || NS_FAILED(rv)) if (!item || NS_FAILED(rv))
return; return;
nsCOMPtr<nsISupportsWString> wideString; nsCOMPtr<nsISupportsString> wideString;
wideString = do_QueryInterface(item); wideString = do_QueryInterface(item);
if (!wideString) if (!wideString)
return; return;

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

@ -133,7 +133,7 @@ nsClipboard :: SetNativeClipboardData ( PRInt32 aWhichClipboard )
for ( PRUint32 i = 0; i < cnt; ++i ) { for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) { if ( currentFlavor ) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString( getter_Copies(flavorStr) ); currentFlavor->ToString( getter_Copies(flavorStr) );
@ -290,7 +290,7 @@ nsClipboard :: GetNativeClipboardData ( nsITransferable * aTransferable, PRInt32
for ( PRUint32 i = 0; i < cnt; ++i ) { for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) { if ( currentFlavor ) {
nsXPIDLCString flavorStr; nsXPIDLCString flavorStr;
currentFlavor->ToString ( getter_Copies(flavorStr) ); currentFlavor->ToString ( getter_Copies(flavorStr) );
@ -478,7 +478,7 @@ nsClipboard :: GetDataOffClipboard ( ResType inMacFlavor, void** outData, PRInt3
// HasDataMatchingFlavors // HasDataMatchingFlavors
// //
// Check the clipboard to see if we have any data that matches the given flavors. This // Check the clipboard to see if we have any data that matches the given flavors. This
// does NOT actually fetch the data. The items in the flavor list are nsISupportsString's. // does NOT actually fetch the data. The items in the flavor list are nsISupportsCString's.
// //
// Handle the case where we ask for unicode and it's not there, but plain text is. We // Handle the case where we ask for unicode and it's not there, but plain text is. We
// say "yes" in that case, knowing that we will have to perform a conversion when we actually // say "yes" in that case, knowing that we will have to perform a conversion when we actually
@ -504,7 +504,7 @@ nsClipboard :: HasDataMatchingFlavors ( nsISupportsArray* aFlavorList, PRInt32 a
for ( PRUint32 i = 0; i < length; ++i ) { for ( PRUint32 i = 0; i < length; ++i ) {
nsCOMPtr<nsISupports> genericFlavor; nsCOMPtr<nsISupports> genericFlavor;
aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) ); aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> flavorWrapper ( do_QueryInterface(genericFlavor) ); nsCOMPtr<nsISupportsCString> flavorWrapper ( do_QueryInterface(genericFlavor) );
if ( flavorWrapper ) { if ( flavorWrapper ) {
nsXPIDLCString flavor; nsXPIDLCString flavor;
flavorWrapper->ToString ( getter_Copies(flavor) ); flavorWrapper->ToString ( getter_Copies(flavor) );

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше