replaces 4-char codes with constants from scrap.h. forgot a mapping for 'utxt' in one direction. r=nhotta/sr=sfraser. bug# 81028

This commit is contained in:
pinkerton%netscape.com 2001-05-15 22:21:41 +00:00
Родитель fde4277837
Коммит 8118d5cf14
1 изменённых файлов: 7 добавлений и 6 удалений

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

@ -78,17 +78,17 @@ nsMimeMapperMac :: MapMimeTypeToMacOSType ( const char* aMimeStr, PRBool inAddIf
// the low two bytes of the generated flavor can be used as an index into the list.
if ( !format ) {
if ( PL_strcmp(aMimeStr, kTextMime) == 0 )
format = 'TEXT';
format = kScrapFlavorTypeText;
else if ( PL_strcmp(aMimeStr, kFileMime) == 0 )
format = flavorTypeHFS;
else if ( PL_strcmp(aMimeStr, kPNGImageMime) == 0 )
format = 'PICT';
format = kScrapFlavorTypePicture;
else if ( PL_strcmp(aMimeStr, kJPEGImageMime) == 0 )
format = 'PICT';
format = kScrapFlavorTypePicture;
else if ( PL_strcmp(aMimeStr, kGIFImageMime) == 0 )
format = 'PICT';
format = kScrapFlavorTypePicture;
else if ( PL_strcmp(aMimeStr, kUnicodeMime) == 0 )
format = 'utxt';
format = kScrapFlavorTypeUnicode;
else if ( inAddIfNotPresent ) {
// create the flavor based on the unique id in the lower two bytes and 'MZ' in the
@ -121,7 +121,8 @@ nsMimeMapperMac :: MapMacOSTypeToMimeType ( ResType inMacType, nsCAutoString & o
{
switch ( inMacType ) {
case 'TEXT': outMimeStr = kTextMime; break;
case kScrapFlavorTypeText: outMimeStr = kTextMime; break;
case kScrapFlavorTypeUnicode: outMimeStr = kUnicodeMime; break;
case flavorTypeHFS: outMimeStr = kFileMime; break;
// This flavor is the old 4.x Composer flavor for HTML. The actual data is a binary