Revision: 4755
http://skim-app.svn.sourceforge.net/skim-app/?rev=4755&view=rev
Author: hofman
Date: 2008-10-07 22:05:41 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
Simulate page properties for notes in notes document for templating
Modified Paths:
--------------
trunk/SKNotesDocument.m
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2008-10-07 17:15:01 UTC (rev 4754)
+++ trunk/SKNotesDocument.m 2008-10-07 22:05:41 UTC (rev 4755)
@@ -203,6 +203,7 @@
note = [note mutableCopy];
[note setValue:[note valueForKey:SKNPDFAnnotationStringKey]
forKey:SKNPDFAnnotationContentsKey];
[note removeObjectForKey:SKNPDFAnnotationStringKey];
+ [note removeObjectForKey:SKNPDFAnnotationPageKey];
[note removeObjectForKey:SKNotesDocumentRowHeightKey];
[note removeObjectForKey:SKNotesDocumentChildKey];
[array addObject:note];
@@ -239,8 +240,11 @@
while (dict = [dictEnum nextObject]) {
NSMutableDictionary *note = [dict mutableCopy];
+ unsigned int pageIndex = [[dict valueForKey:@"pageIndex"]
unsignedIntValue];
+ NSDictionary *pageDict = [NSDictionary
dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInt:pageIndex],
@"pageIndex", [NSString stringWithFormat:@"%u", pageIndex + 1], @"label", nil];
[note setValue:[dict valueForKey:SKNPDFAnnotationContentsKey]
forKey:SKNPDFAnnotationStringKey];
+ [note setValue:pageDict forKey:SKNPDFAnnotationPageKey];
if ([[note valueForKey:SKNPDFAnnotationTypeKey]
isEqualToString:SKNTextString])
[note setValue:SKNNoteString forKey:SKNPDFAnnotationTypeKey];
if ([[note valueForKey:SKNPDFAnnotationTypeKey]
isEqualToString:SKNNoteString]) {
@@ -262,7 +266,7 @@
[[self mutableArrayValueForKey:SKNotesDocumentNotesKey]
setArray:newNotes];
[outlineView reloadData];
didRead = YES;
- }
+ }NSLog(@"%@",notes);
if (didRead == NO && outError != NULL)
*outError = [NSError errorWithDomain:SKDocumentErrorDomain code:0
userInfo:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Unable
to load file", @"Error description"), NSLocalizedDescriptionKey, 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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit