diff --git a/ChangeLog b/ChangeLog index 466c657c8..90999c0ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-03-22 Eric Wasylishen + + * TextConverters/RTF/RTFConsumer.m: Set NSDocumentTypeDocumentAttribute + 2012-03-22 Eric Wasylishen * Source/NSAttributedString.m diff --git a/TextConverters/RTF/RTFConsumer.m b/TextConverters/RTF/RTFConsumer.m index b5af2c567..331da8fa1 100644 --- a/TextConverters/RTF/RTFConsumer.m +++ b/TextConverters/RTF/RTFConsumer.m @@ -284,7 +284,7 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c) - (void) appendString: (NSString*)string; - (void) appendHelpLink: (NSString*)fileName marker: (NSString *)markerName; - (void) appendHelpMarker: (NSString*)markerName; - +- (void) reset; @end @implementation RTFConsumer @@ -424,6 +424,13 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c) return self; } +- (void) reset +{ + [super reset]; + [documentAttributes setValue: NSRTFDTextDocumentType + forKey: NSDocumentTypeDocumentAttribute]; +} + - (void) dealloc { RELEASE(files); @@ -532,6 +539,8 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c) result = [[NSMutableAttributedString alloc] init]; } ASSIGN(documentAttributes, [NSMutableDictionary dictionary]); + [documentAttributes setValue: NSRTFTextDocumentType + forKey: NSDocumentTypeDocumentAttribute]; ASSIGN(fonts, [NSMutableDictionary dictionary]); ASSIGN(attrs, [NSMutableArray array]); ASSIGN(colours, [NSMutableArray array]);