From 8118d5cf140053707b8f928abebf16d840b8e1a3 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Tue, 15 May 2001 22:21:41 +0000 Subject: [PATCH] replaces 4-char codes with constants from scrap.h. forgot a mapping for 'utxt' in one direction. r=nhotta/sr=sfraser. bug# 81028 --- widget/src/mac/nsMimeMapper.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/widget/src/mac/nsMimeMapper.cpp b/widget/src/mac/nsMimeMapper.cpp index bcc3cdafb367..40787527aca5 100644 --- a/widget/src/mac/nsMimeMapper.cpp +++ b/widget/src/mac/nsMimeMapper.cpp @@ -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