Revision: 4005
http://skim-app.svn.sourceforge.net/skim-app/?rev=4005&view=rev
Author: hofman
Date: 2008-06-11 13:19:02 -0700 (Wed, 11 Jun 2008)
Log Message:
-----------
add check for rtfd extension.
Modified Paths:
--------------
trunk/NSDocument_SKExtensions.m
Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m 2008-06-11 17:45:49 UTC (rev 4004)
+++ trunk/NSDocument_SKExtensions.m 2008-06-11 20:19:02 UTC (rev 4005)
@@ -78,12 +78,15 @@
}
- (NSFileWrapper *)notesFileWrapperUsingTemplateFile:(NSString *)templateFile {
- NSString *templatePath = [[NSApp delegate]
pathForApplicationSupportFile:[templateFile stringByDeletingPathExtension]
ofType:[templateFile pathExtension] inDirectory:@"Templates"];
- NSDictionary *docAttributes = nil;
- NSAttributedString *templateAttrString = [[NSAttributedString alloc]
initWithPath:templatePath documentAttributes:&docAttributes];
- NSAttributedString *attrString = [SKTemplateParser
attributedStringByParsingTemplate:templateAttrString usingObject:self];
- NSFileWrapper *fileWrapper = [attrString
RTFDFileWrapperFromRange:NSMakeRange(0, [attrString length])
documentAttributes:docAttributes];
- [templateAttrString release];
+ NSFileWrapper *fileWrapper = nil;
+ if ([[templateFile pathExtension] caseInsensitiveCompare:@"rtfd"] ==
NSOrderedSame) {
+ NSString *templatePath = [[NSApp delegate]
pathForApplicationSupportFile:[templateFile stringByDeletingPathExtension]
ofType:[templateFile pathExtension] inDirectory:@"Templates"];
+ NSDictionary *docAttributes = nil;
+ NSAttributedString *templateAttrString = [[NSAttributedString alloc]
initWithPath:templatePath documentAttributes:&docAttributes];
+ NSAttributedString *attrString = [SKTemplateParser
attributedStringByParsingTemplate:templateAttrString usingObject:self];
+ NSFileWrapper *fileWrapper = [attrString
RTFDFileWrapperFromRange:NSMakeRange(0, [attrString length])
documentAttributes:docAttributes];
+ [templateAttrString release];
+ }
return fileWrapper;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit