Renamed methods to fit the GSTextConsumer protocol. Adopted to

changes in header. Perliminary implementation for RTFDConsumer.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10724 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-08-18 22:08:28 +00:00
parent 48d393c79e
commit 401c1a5f2b

View file

@ -225,7 +225,7 @@ readNSString (StringContext *ctxt)
@implementation RTFConsumer
+ (NSAttributedString*) parseRTFD: (NSFileWrapper *)wrapper
+ (NSAttributedString*) parseFile: (NSFileWrapper *)wrapper
documentAttributes: (NSDictionary **)dict
{
RTFConsumer *consumer = [RTFConsumer new];
@ -255,7 +255,7 @@ readNSString (StringContext *ctxt)
return text;
}
+ (NSAttributedString*) parseRTF: (NSData *)rtfData
+ (NSAttributedString*) parseData: (NSData *)rtfData
documentAttributes: (NSDictionary **)dict
{
RTFConsumer *consumer = [RTFConsumer new];
@ -292,6 +292,30 @@ readNSString (StringContext *ctxt)
@end
@implementation RTFDConsumer
+ (NSAttributedString*) parseFile: (NSFileWrapper *)wrapper
documentAttributes: (NSDictionary **)dict
{
return [super parseFile: wrapper
documentAttributes: dict];
}
+ (NSAttributedString*) parseData: (NSData *)rtfData
documentAttributes: (NSDictionary **)dict
{
NSAttributedString *str;
NSFileWrapper *wrapper = [[NSFileWrapper alloc]
initWithSerializedRepresentation: rtfData];
str = [self parseFile: wrapper documentAttributes: dict];
RELEASE (wrapper);
return str;
}
@end
@implementation RTFConsumer (Private)
- (NSDictionary*) documentAttributes