Revision: 4335
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4335&view=rev
Author:   hofman
Date:     2008-08-01 20:16:20 +0000 (Fri, 01 Aug 2008)

Log Message:
-----------
Make the functions to get a default text or RTF representation of Skim notes 
public.

Modified Paths:
--------------
    trunk/SkimNotes/NSFileManager_SKNExtensions.h
    trunk/SkimNotes/NSFileManager_SKNExtensions.m
    trunk/SkimNotes/NSFileManager_SKNToolExtensions.m
    trunk/SkimNotes/SKNUtilities.h
    trunk/SkimNotes/SKNUtilities.m

Modified: trunk/SkimNotes/NSFileManager_SKNExtensions.h
===================================================================
--- trunk/SkimNotes/NSFileManager_SKNExtensions.h       2008-07-31 17:27:13 UTC 
(rev 4334)
+++ trunk/SkimNotes/NSFileManager_SKNExtensions.h       2008-08-01 20:16:20 UTC 
(rev 4335)
@@ -156,3 +156,20 @@
 - (NSString *)bundledFileWithExtension:(NSString *)extension 
inPDFBundleAtPath:(NSString *)path error:(NSError **)outError;
 
 @end
+
+
+/*!
+    @abstract   Returns a string representation of Skim notes.
+    @discussion This is used to write a default Skim text notes representation 
when not provided for writing.
+    @param      noteDicts An array of dictionaries containing Skim note 
properties, as returned by the properties of a <code>PDFAnnotation</code>.
+    @result     A string representation of the notes.
+*/
+extern NSString *SKNSkimTextNotes(NSArray *noteDicts);
+
+/*!
+    @abstract   Returns an RTF data representation of Skim notes.
+    @discussion This is used to write a default Skim RTF notes representation 
when not provided for writing.
+    @param      noteDicts An array of dictionaries containing Skim note 
properties, as returned by the properties of a <code>PDFAnnotation</code>.
+    @result     An RTF data representation of the notes.
+*/
+extern NSData *SKNSkimRTFNotes(NSArray *noteDicts);

Modified: trunk/SkimNotes/NSFileManager_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/NSFileManager_SKNExtensions.m       2008-07-31 17:27:13 UTC 
(rev 4334)
+++ trunk/SkimNotes/NSFileManager_SKNExtensions.m       2008-08-01 20:16:20 UTC 
(rev 4335)
@@ -71,9 +71,9 @@
                 //NSLog(@"%@: %@", self, error);
             } else {
                 if (notesString == nil)
-                    notesString = SKNTextNotes(notes);
+                    notesString = SKNSkimTextNotes(notes);
                 if (notesRTFData == nil)
-                    notesRTFData = SKNRTFNotes(notes);
+                    notesRTFData = SKNSkimRTFNotes(notes);
                 [eam setExtendedAttributeNamed:SKIM_TEXT_NOTES_KEY 
toPropertyListValue:notesString atPath:path options:0 error:NULL];
                 [eam setExtendedAttributeNamed:SKIM_RTF_NOTES_KEY 
toValue:notesRTFData atPath:path options:0 error:NULL];
             }

Modified: trunk/SkimNotes/NSFileManager_SKNToolExtensions.m
===================================================================
--- trunk/SkimNotes/NSFileManager_SKNToolExtensions.m   2008-07-31 17:27:13 UTC 
(rev 4334)
+++ trunk/SkimNotes/NSFileManager_SKNToolExtensions.m   2008-08-01 20:16:20 UTC 
(rev 4335)
@@ -159,9 +159,9 @@
             @catch (id e) {}
             if ([notes count]) {
                 if (textNotes == nil)
-                    textNotes = SKNTextNotes(notes);
+                    textNotes = SKNSkimTextNotes(notes);
                 if (rtfNotesData == nil)
-                    rtfNotesData = SKNRTFNotes(notes);
+                    rtfNotesData = SKNSkimRTFNotes(notes);
             }
         }
         NSData *textNotesData = [textNotes 
dataUsingEncoding:NSUTF8StringEncoding];

Modified: trunk/SkimNotes/SKNUtilities.h
===================================================================
--- trunk/SkimNotes/SKNUtilities.h      2008-07-31 17:27:13 UTC (rev 4334)
+++ trunk/SkimNotes/SKNUtilities.h      2008-08-01 20:16:20 UTC (rev 4335)
@@ -50,5 +50,5 @@
 #define RTF_EXTENSION   @"rtf"
 #define FDF_EXTENSION   @"fdf"
 
-extern NSString *SKNTextNotes(NSArray *noteDicts);
-extern NSData *SKNRTFNotes(NSArray *noteDicts);
+extern NSString *SKNSkimTextNotes(NSArray *noteDicts);
+extern NSData *SKNSkimRTFNotes(NSArray *noteDicts);

Modified: trunk/SkimNotes/SKNUtilities.m
===================================================================
--- trunk/SkimNotes/SKNUtilities.m      2008-07-31 17:27:13 UTC (rev 4334)
+++ trunk/SkimNotes/SKNUtilities.m      2008-08-01 20:16:20 UTC (rev 4335)
@@ -44,7 +44,7 @@
 #define NOTE_CONTENTS_KEY @"contents"
 #define NOTE_TEXT_KEY @"text"
 
-NSString *SKNTextNotes(NSArray *noteDicts) {
+NSString *SKNSkimTextNotes(NSArray *noteDicts) {
     NSMutableString *textString = [NSMutableString string];
     NSEnumerator *dictEnum = [noteDicts objectEnumerator];
     NSDictionary *dict;
@@ -71,7 +71,7 @@
     return textString;
 }
 
-NSData *SKNRTFNotes(NSArray *noteDicts) {
+NSData *SKNSkimRTFNotes(NSArray *noteDicts) {
     NSMutableAttributedString *attrString = [[[NSMutableAttributedString 
alloc] init] autorelease];
     NSEnumerator *dictEnum = [noteDicts objectEnumerator];
     NSDictionary *dict;


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

Reply via email to