nsCOMPtr<nsIPref> prefs(do_GetService(kPrefServiceCID, &rv));
nsCOMPtr<nsIPref> prefs(do_GetService(NS_PREF_CONTRACTID, &rv));
void ImportAddressImpl::SaveFieldMap( nsIImportFieldMap *pMap){	if (!pMap)		return;	int			size;	int			index;	PRBool		active;	nsCString	str;	pMap->GetMapSize( &size);	for (long i = 0; i < size; i++) {		index = i;		active = PR_FALSE;		pMap->GetFieldMap( i, &index);		pMap->GetFieldActive( i, &active);		if (active)			str.Append( '+');		else			str.Append( '-');		str.AppendInt( index);		str.Append( ',');	}	PRBool	done = PR_FALSE;	nsresult rv;	// NS_WITH_PROXIED_SERVICE( nsIPref, prefs, kPrefServiceCID, NS_UI_THREAD_EVENTQ, &rv);	nsCOMPtr<nsIPref> prefs(do_GetService(kPrefServiceCID, &rv));	if (NS_SUCCEEDED( rv)) {		nsXPIDLCString	prefStr;		rv = prefs->CopyCharPref( "mailnews.import.text.fieldmap", getter_Copies(prefStr));		if (NS_SUCCEEDED( rv)) {			if (str.Equals(prefStr))				done = PR_TRUE;		}		if (!done) {			rv = prefs->SetCharPref( "mailnews.import.text.fieldmap", str.get());		}	}}