--- NSCell.m.old	2005-05-26 04:52:43.000000000 +0200
+++ NSCell.m	2005-07-20 22:26:23.000000000 +0200
@@ -276,29 +276,38 @@
   id newContents;
   
   ASSIGN (_objectValue, object);
-  
-  newContents = [_formatter stringForObjectValue: _objectValue];
-  if (newContents != nil)
+
+  // Try applying a formatter, if possible.
+  if (_formatter != nil &&
+    (newContents = [_formatter stringForObjectValue: _objectValue]) != nil)
     {
       _cell.has_valid_object_value = YES;
+      _cell.contents_is_attributed_string = NO;
     }
+  // otherwise, try to cope with the object ourselves.
   else
     {
-      if ((_formatter == nil) 
-	  && ([object isKindOfClass: [NSString class]] == YES))
-	{
-	  newContents = _objectValue;
-	  _cell.has_valid_object_value = YES;
-	}
+      if ([object isKindOfClass: [NSAttributedString class]] == YES)
+        {
+          newContents = _objectValue;
+          _cell.has_valid_object_value = NO;
+          _cell.contents_is_attributed_string = YES;
+        }
+      else if ([object isKindOfClass: [NSString class]] == YES)
+        {
+          newContents = _objectValue;
+          _cell.has_valid_object_value = YES;
+          _cell.contents_is_attributed_string = NO;
+        }
       else
-	{
-	  newContents = [_objectValue description];
-	  _cell.has_valid_object_value = NO;
-	}
+        {
+          newContents = [_objectValue description];
+          _cell.has_valid_object_value = NO;
+          _cell.contents_is_attributed_string = NO;
+        }
     }
-  
+
   ASSIGN (_contents, newContents);
-  _cell.contents_is_attributed_string = NO;
 }
 
 - (void) setDoubleValue: (double)aDouble
