Revision: 2282
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2282&view=rev
Author:   hofman
Date:     2007-06-12 15:49:44 -0700 (Tue, 12 Jun 2007)

Log Message:
-----------
Use full selection for rich text of document.

Modified Paths:
--------------
    trunk/PDFSelection_SKExtensions.m

Modified: trunk/PDFSelection_SKExtensions.m
===================================================================
--- trunk/PDFSelection_SKExtensions.m   2007-06-12 19:53:18 UTC (rev 2281)
+++ trunk/PDFSelection_SKExtensions.m   2007-06-12 22:49:44 UTC (rev 2282)
@@ -378,15 +378,15 @@
         dPO = [dP objectsByEvaluatingSpecifier];
     
     if ([dPO isKindOfClass:[SKDocument class]]) {
-        NSString *string = [dPO string];
-        return string ? [[[NSTextStorage alloc] initWithString:string] 
autorelease] : [NSNull null];
+        NSAttributedString *attrString = [[dPO selectionForEntireDocument] 
attributedString];
+        return attrString ? [[[NSTextStorage alloc] 
initWithAttributedString:attrString] autorelease] : [[[NSTextStorage alloc] 
init] autorelease];
     } else if ([dPO isKindOfClass:[PDFPage class]]) {
-        return [dPO contents];
+        return [dPO richText];
     } else if ([dPO isKindOfClass:[PDFAnnotation class]]) {
         return [dPO textContents];
     } else {
         NSAttributedString *attrString = [[PDFSelection 
selectionWithSpecifier:dP] attributedString];
-        return attrString ? [[[NSTextStorage alloc] 
initWithAttributedString:attrString] autorelease] : [NSNull null];
+        return attrString ? [[[NSTextStorage alloc] 
initWithAttributedString:attrString] autorelease] : [[[NSTextStorage alloc] 
init] autorelease];
     }
     
     return 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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to