Revision: 14690
          http://sourceforge.net/p/skim-app/code/14690
Author:   hofman
Date:     2024-11-15 17:19:14 +0000 (Fri, 15 Nov 2024)
Log Message:
-----------
Check file extension for rich text template type, the template manager does not 
use the file name anymoer

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

Modified: trunk/NSObject_SKExtensions.m
===================================================================
--- trunk/NSObject_SKExtensions.m       2024-11-15 16:56:38 UTC (rev 14689)
+++ trunk/NSObject_SKExtensions.m       2024-11-15 17:19:14 UTC (rev 14690)
@@ -38,7 +38,6 @@
 
 #import "NSObject_SKExtensions.h"
 #import "SKTemplateParser.h"
-#import "SKTemplateManager.h"
 #import "NSAttributedString_SKExtensions.h"
 
 
@@ -74,7 +73,7 @@
         attrString = template;
     else if ([template isKindOfClass:[NSURL class]] == NO)
                [comand setScriptErrorNumber:NSArgumentsWrongScriptError];
-    else if ([[SKTemplateManager sharedManager] 
isRichTextTemplateType:[template path]])
+    else if ([[NSSet setWithObjects:@"rtf", @"doc", @"docx", @"odt", 
@"webarchive", @"rtfd", nil] containsObject:[[template pathExtension] 
lowercaseString]])
         attrString = [[NSAttributedString alloc] initWithURL:template 
options:@{} documentAttributes:&docAttrs error:NULL];
     else
         string = [NSString stringWithContentsOfURL:template 
encoding:NSUTF8StringEncoding error:NULL];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to