From b30a00fc24b6d712afcb552ac9a0c656bff50446 Mon Sep 17 00:00:00 2001 From: ericwa Date: Fri, 23 Mar 2012 02:54:54 +0000 Subject: [PATCH] * TextConverters/RTF/RTFConsumer.m: Set NSDocumentTypeDocumentAttribute git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34986 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ TextConverters/RTF/RTFConsumer.m | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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]);