Revision: 3431
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3431&view=rev
Author:   hofman
Date:     2008-02-23 10:45:52 -0800 (Sat, 23 Feb 2008)

Log Message:
-----------
Check document type against UTI rather than twice against the same type.

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

Modified: trunk/SKDocument.m
===================================================================
--- trunk/SKDocument.m  2008-02-22 23:30:19 UTC (rev 3430)
+++ trunk/SKDocument.m  2008-02-23 18:45:52 UTC (rev 3431)
@@ -619,7 +619,7 @@
     [self setPDFDoc:nil];
     [self setNoteDicts:nil];
     
-    if ([docType isEqualToString:SKPDFDocumentType] || [docType 
isEqualToString:SKPDFDocumentType]) {
+    if ([docType isEqualToString:SKPDFDocumentType] || [docType 
isEqualToString:SKPDFDocumentUTI]) {
         if ((data = [[NSData alloc] initWithContentsOfURL:absoluteURL 
options:NSUncachedRead error:&error]) &&
             (pdfDoc = [[PDFDocument alloc] initWithURL:absoluteURL])) {
             if ([self readNotesFromExtendedAttributesAtURL:absoluteURL 
error:&error] == NO) {
@@ -656,7 +656,7 @@
                 }
             }
         }
-    } else if ([docType isEqualToString:SKPDFBundleDocumentType] || [docType 
isEqualToString:SKPDFBundleDocumentType]) {
+    } else if ([docType isEqualToString:SKPDFBundleDocumentType] || [docType 
isEqualToString:SKPDFBundleDocumentUTI]) {
         NSString *path = [absoluteURL path];
         NSString *pdfFile = [[NSFileManager defaultManager] 
subfileWithExtension:@"pdf" inPDFBundleAtPath:path];
         if (pdfFile) {
@@ -671,14 +671,14 @@
                 }
             }
         }
-    } else if ([docType isEqualToString:SKPostScriptDocumentType] || [docType 
isEqualToString:SKPostScriptDocumentType]) {
+    } else if ([docType isEqualToString:SKPostScriptDocumentType] || [docType 
isEqualToString:SKPostScriptDocumentUTI]) {
         if (data = [NSData dataWithContentsOfURL:absoluteURL 
options:NSUncachedRead error:&error]) {
             SKPSProgressController *psProgressController = 
[[SKPSProgressController alloc] init];
             if (data = [[psProgressController PDFDataWithPostScriptData:data] 
retain])
                 pdfDoc = [[PDFDocument alloc] initWithData:data];
             [psProgressController autorelease];
         }
-    } else if ([docType isEqualToString:SKDVIDocumentType] || [docType 
isEqualToString:SKDVIDocumentType]) {
+    } else if ([docType isEqualToString:SKDVIDocumentType] || [docType 
isEqualToString:SKDVIDocumentUTI]) {
         if (data = [NSData dataWithContentsOfURL:absoluteURL 
options:NSUncachedRead error:&error]) {
             SKDVIProgressController *dviProgressController = 
[[SKDVIProgressController alloc] init];
             if (data = [[dviProgressController PDFDataWithDVIFile:[absoluteURL 
path]] retain])


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 2008.
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

Reply via email to