Revision: 5040
http://skim-app.svn.sourceforge.net/skim-app/?rev=5040&view=rev
Author: hofman
Date: 2008-12-10 17:16:07 +0000 (Wed, 10 Dec 2008)
Log Message:
-----------
rename template methods
Modified Paths:
--------------
trunk/NSDocument_SKExtensions.m
trunk/SKTemplateParser.h
trunk/SKTemplateParser.m
Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m 2008-12-10 12:58:25 UTC (rev 5039)
+++ trunk/NSDocument_SKExtensions.m 2008-12-10 17:16:07 UTC (rev 5040)
@@ -48,7 +48,7 @@
NSString *templatePath = [[SKApplicationController
sharedApplicationController] pathForApplicationSupportFile:[templateFile
stringByDeletingPathExtension] ofType:[templateFile pathExtension]
inDirectory:@"Templates"];
NSError *error = nil;
NSString *templateString = [[NSString alloc]
initWithContentsOfFile:templatePath encoding:NSUTF8StringEncoding error:&error];
- NSString *string = [SKTemplateParser
stringByParsingTemplate:templateString usingObject:self];
+ NSString *string = [SKTemplateParser
stringByParsingTemplateString:templateString usingObject:self];
[templateString release];
return string;
}
@@ -68,7 +68,7 @@
NSDictionary *docAttributes = nil;
NSError *error = nil;
NSAttributedString *templateAttrString = [[NSAttributedString alloc]
initWithPath:templatePath documentAttributes:&docAttributes];
- NSAttributedString *attrString = [SKTemplateParser
attributedStringByParsingTemplate:templateAttrString usingObject:self];
+ NSAttributedString *attrString = [SKTemplateParser
attributedStringByParsingTemplateAttributedString:templateAttrString
usingObject:self];
data = [attrString dataFromRange:NSMakeRange(0, [attrString length])
documentAttributes:docAttributes error:&error];
[templateAttrString release];
} else if ([fileType caseInsensitiveCompare:@"rtfd"] != NSOrderedSame &&
[fileType caseInsensitiveCompare:@"docx"] != NSOrderedSame && [fileType
caseInsensitiveCompare:@"odt"] != NSOrderedSame) {
@@ -83,7 +83,7 @@
NSString *templatePath = [[SKApplicationController
sharedApplicationController] 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];
+ NSAttributedString *attrString = [SKTemplateParser
attributedStringByParsingTemplateAttributedString:templateAttrString
usingObject:self];
fileWrapper = [attrString RTFDFileWrapperFromRange:NSMakeRange(0,
[attrString length]) documentAttributes:docAttributes];
[templateAttrString release];
}
Modified: trunk/SKTemplateParser.h
===================================================================
--- trunk/SKTemplateParser.h 2008-12-10 12:58:25 UTC (rev 5039)
+++ trunk/SKTemplateParser.h 2008-12-10 17:16:07 UTC (rev 5040)
@@ -41,12 +41,12 @@
@interface SKTemplateParser : NSObject
-+ (NSString *)stringByParsingTemplate:(NSString *)templateString
usingObject:(id)object;
++ (NSString *)stringByParsingTemplateString:(NSString *)templateString
usingObject:(id)object;
+ (NSArray *)arrayByParsingTemplateString:(NSString *)templateString;
+ (NSArray *)arrayByParsingTemplateString:(NSString *)templateString
isSubtemplate:(BOOL)isSubtemplate;
+ (NSString *)stringFromTemplateArray:(NSArray *)templateArray
usingObject:(id)object atIndex:(int)anIndex;
-+ (NSAttributedString *)attributedStringByParsingTemplate:(NSAttributedString
*)templateAttrString usingObject:(id)object;
++ (NSAttributedString
*)attributedStringByParsingTemplateAttributedString:(NSAttributedString
*)templateAttrString usingObject:(id)object;
+ (NSArray *)arrayByParsingTemplateAttributedString:(NSAttributedString
*)templateAttrString;
+ (NSArray *)arrayByParsingTemplateAttributedString:(NSAttributedString
*)templateAttrString isSubtemplate:(BOOL)isSubtemplate;
+ (NSAttributedString *)attributedStringFromTemplateArray:(NSArray
*)templateArray usingObject:(id)object atIndex:(int)anIndex;
Modified: trunk/SKTemplateParser.m
===================================================================
--- trunk/SKTemplateParser.m 2008-12-10 12:58:25 UTC (rev 5039)
+++ trunk/SKTemplateParser.m 2008-12-10 17:16:07 UTC (rev 5040)
@@ -255,7 +255,7 @@
#pragma mark Parsing string templates
-+ (NSString *)stringByParsingTemplate:(NSString *)template
usingObject:(id)object {
++ (NSString *)stringByParsingTemplateString:(NSString *)template
usingObject:(id)object {
return [self stringFromTemplateArray:[self
arrayByParsingTemplateString:template] usingObject:object atIndex:1];
}
@@ -524,7 +524,7 @@
#pragma mark Parsing attributed string templates
-+ (NSAttributedString *)attributedStringByParsingTemplate:(NSAttributedString
*)template usingObject:(id)object {
++ (NSAttributedString
*)attributedStringByParsingTemplateAttributedString:(NSAttributedString
*)template usingObject:(id)object {
return [self attributedStringFromTemplateArray:[self
arrayByParsingTemplateAttributedString:template] usingObject:object atIndex:1];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit