Revision: 2864
http://skim-app.svn.sourceforge.net/skim-app/?rev=2864&view=rev
Author: hofman
Date: 2007-09-09 12:41:33 -0700 (Sun, 09 Sep 2007)
Log Message:
-----------
Split contents from FDF into contents and text for Note annotations.
Modified Paths:
--------------
trunk/SKFDFParser.m
Modified: trunk/SKFDFParser.m
===================================================================
--- trunk/SKFDFParser.m 2007-09-09 19:05:14 UTC (rev 2863)
+++ trunk/SKFDFParser.m 2007-09-09 19:41:33 UTC (rev 2864)
@@ -464,6 +464,20 @@
}
}
}
+
+ NSString *type = [dictionary objectForKey:@"type"];
+ NSString *contents;
+ if ([type isEqualToString:@"Note"]) {
+ if (contents = [dictionary objectForKey:@"contents"]) {
+ unsigned contentsEnd, end;
+ [contents getLineStart:NULL end:&end contentsEnd:&contentsEnd
forRange:NSMakeRange(0, 0)];
+ if (end < [contents length]) {
+ [dictionary setObject:[contents substringToIndex:contentsEnd]
forKey:@"contents"];
+ [dictionary setObject:[[[NSAttributedString alloc]
initWithString:[contents substringFromIndex:end]] autorelease] forKey:@"text"];
+ }
+ }
+ }
+
return success ? dictionary : nil;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit