Revision: 4745
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4745&view=rev
Author:   hofman
Date:     2008-10-06 17:26:46 +0000 (Mon, 06 Oct 2008)

Log Message:
-----------
Add support for .docx templates

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

Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m     2008-10-06 16:48:11 UTC (rev 4744)
+++ trunk/NSDocument_SKExtensions.m     2008-10-06 17:26:46 UTC (rev 4745)
@@ -57,7 +57,7 @@
     static NSSet *richTextTypes = nil;
     if (richTextTypes == nil) {
         if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_4)
-            richTextTypes = [[NSSet alloc] initWithObjects:@"rtf", @"doc", 
@"odt", nil];
+            richTextTypes = [[NSSet alloc] initWithObjects:@"rtf", @"doc", 
@"docx", @"odt", nil];
         else
             richTextTypes = [[NSSet alloc] initWithObjects:@"rtf", @"doc", 
nil];
     }
@@ -71,7 +71,7 @@
         NSAttributedString *attrString = [SKTemplateParser 
attributedStringByParsingTemplate:templateAttrString usingObject:self];
         data = [attrString dataFromRange:NSMakeRange(0, [attrString length]) 
documentAttributes:docAttributes error:&error];
         [templateAttrString release];
-    } else if ([fileType caseInsensitiveCompare:@"rtfd"] != NSOrderedSame && 
[fileType caseInsensitiveCompare:@"odt"] != NSOrderedSame) {
+    } else if ([fileType caseInsensitiveCompare:@"rtfd"] != NSOrderedSame && 
[fileType caseInsensitiveCompare:@"docx"] != NSOrderedSame && [fileType 
caseInsensitiveCompare:@"odt"] != NSOrderedSame) {
         data = [[self notesStringUsingTemplateFile:templateFile] 
dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
     }
     return data;


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