Revision: 5127
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5127&view=rev
Author:   hofman
Date:     2009-01-17 16:16:25 +0000 (Sat, 17 Jan 2009)

Log Message:
-----------
Add generic scripting support to convert rich text to raw RTF data, by adding 
an RTF property to the rich text class. RTF data, unlike rich text, can really 
exist in an applescript. 

Modified Paths:
--------------
    trunk/NSAttributedString_SKExtensions.h
    trunk/NSAttributedString_SKExtensions.m
    trunk/Skim.sdef

Modified: trunk/NSAttributedString_SKExtensions.h
===================================================================
--- trunk/NSAttributedString_SKExtensions.h     2009-01-17 13:08:57 UTC (rev 
5126)
+++ trunk/NSAttributedString_SKExtensions.h     2009-01-17 16:16:25 UTC (rev 
5127)
@@ -46,4 +46,6 @@
 - (NSString *)xmlString;
 - (NSData *)RTFRepresentation;
 
+- (id)scriptingRTF;
+
 @end

Modified: trunk/NSAttributedString_SKExtensions.m
===================================================================
--- trunk/NSAttributedString_SKExtensions.m     2009-01-17 13:08:57 UTC (rev 
5126)
+++ trunk/NSAttributedString_SKExtensions.m     2009-01-17 16:16:25 UTC (rev 
5127)
@@ -60,4 +60,10 @@
     return [self RTFFromRange:NSMakeRange(0, [self length]) 
documentAttributes:nil];
 }
 
+#pragma mark Scripting support
+
+- (id)scriptingRTF {
+    return [NSAppleEventDescriptor descriptorWithDescriptorType:'RTF ' 
data:[self RTFRepresentation]];
+}
+
 @end

Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef     2009-01-17 13:08:57 UTC (rev 5126)
+++ trunk/Skim.sdef     2009-01-17 16:16:25 UTC (rev 5127)
@@ -492,6 +492,10 @@
                 description="The size in points of the first character.">
                 <cocoa key="fontSize"/>
             </property>
+            <property name="RTF" code="RTF " type="any"
+                description="The raw RTF data.">
+                <cocoa key="scriptingRTF"/>
+            </property>
             <element type="character"/>
             <element type="paragraph"/>
             <element type="word"/>
@@ -515,6 +519,10 @@
                 description="The size in points of the first character.">
                 <cocoa key="fontSize"/>
             </property>
+            <property name="RTF" code="RTF " type="any"
+                description="The raw RTF data.">
+                <cocoa key="scriptingRTF"/>
+            </property>
             <element type="character"/>
             <element type="paragraph"/>
             <element type="word"/>
@@ -538,6 +546,10 @@
                 description="The size in points of the first character.">
                 <cocoa key="fontSize"/>
             </property>
+            <property name="RTF" code="RTF " type="any"
+                description="The raw RTF data.">
+                <cocoa key="scriptingRTF"/>
+            </property>
             <element type="character"/>
             <element type="paragraph"/>
             <element type="word"/>
@@ -561,6 +573,10 @@
                 description="The size in points of the first character.">
                 <cocoa key="fontSize"/>
             </property>
+            <property name="RTF" code="RTF " type="any"
+                description="The raw RTF data.">
+                <cocoa key="scriptingRTF"/>
+            </property>
             <element type="character"/>
             <element type="paragraph"/>
             <element type="word"/>
@@ -584,6 +600,10 @@
                 description="The size in points of the first character.">
                 <cocoa key="fontSize"/>
             </property>
+            <property name="RTF" code="RTF " type="any"
+                description="The raw RTF data.">
+                <cocoa key="scriptingRTF"/>
+            </property>
             <element type="character"/>
             <element type="paragraph"/>
             <element type="word"/>
@@ -681,10 +701,6 @@
                 description="The text of the note. Attributes are ignored.">
                 <cocoa key="textContents"/>
             </contents>
-            <property name="RTF" code="RTF " type="any" access="r"
-                description="The RTF text for the note.">
-                <cocoa key="RTFContents"/>
-            </property>
             <property name="color" code="colr" type="RGBA color"
                 description="The color of the note. Can be given as a list of 
(red, green, blue, alpha), a standard color (e.g. red), or a default color 
(e.g. text note color).">
                 <cocoa key="color"/>


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:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to