[sword-svn] r2638 - trunk/bindings/objc/src
mdbergmann at crosswire.org
mdbergmann at crosswire.org
Sun Jul 10 03:16:37 MST 2011
Author: mdbergmann
Date: 2011-07-10 03:16:37 -0700 (Sun, 10 Jul 2011)
New Revision: 2638
Modified:
trunk/bindings/objc/src/SwordModule.mm
Log:
fix and simplification for - (id)attributeValueForParsedLinkData:(NSDictionary *)data withTextRenderType:(TextPullType)textType.
Modified: trunk/bindings/objc/src/SwordModule.mm
===================================================================
--- trunk/bindings/objc/src/SwordModule.mm 2011-07-08 20:37:47 UTC (rev 2637)
+++ trunk/bindings/objc/src/SwordModule.mm 2011-07-10 10:16:37 UTC (rev 2638)
@@ -507,24 +507,18 @@
NSString *footnoteText = [self entryAttributeValueFootnoteOfType:attrType
indexValue:[data objectForKey:ATTRTYPE_VALUE]
forKey:[SwordKey swordKeyWithRef:passage]];
- if(textType == TextTypeRendered) {
- ret = [self renderedTextEntriesForRef:footnoteText];
+ ret = footnoteText;
+ } else if([attrType isEqualToString:@"x"] || [attrType isEqualToString:@"scriptRef"] || [attrType isEqualToString:@"scripRef"]) {
+ NSString *key = @"";
+ if([attrType isEqualToString:@"x"]) {
+ key = [self entryAttributeValueFootnoteOfType:attrType
+ indexValue:[data objectForKey:ATTRTYPE_VALUE]
+ forKey:[SwordKey swordKeyWithRef:passage]];
} else {
- ret = [self strippedTextEntriesForRef:footnoteText];
+ key = [[[data objectForKey:ATTRTYPE_VALUE] stringByReplacingOccurrencesOfString:@"+"
+ withString:@" "] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
}
- } else if([attrType isEqualToString:@"x"]) {
- NSString *refListString = [self entryAttributeValueFootnoteOfType:attrType
- indexValue:[data objectForKey:ATTRTYPE_VALUE]
- forKey:[SwordKey swordKeyWithRef:passage]];
if(textType == TextTypeRendered) {
- ret = [self renderedTextEntriesForRef:refListString];
- } else {
- ret = [self strippedTextEntriesForRef:refListString];
- }
- } else if([attrType isEqualToString:@"scriptRef"] || [attrType isEqualToString:@"scripRef"]) {
- NSString *key = [[[data objectForKey:ATTRTYPE_VALUE] stringByReplacingOccurrencesOfString:@"+"
- withString:@" "] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
- if(textType == TextTypeRendered) {
ret = [self renderedTextEntriesForRef:key];
} else {
ret = [self strippedTextEntriesForRef:key];
More information about the sword-cvs
mailing list