Revision: 28716
          http://sourceforge.net/p/bibdesk/svn/28716
Author:   hofman
Date:     2024-02-09 16:54:32 +0000 (Fri, 09 Feb 2024)
Log Message:
-----------
don't use dictionary literal

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVUtilities.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m     2024-02-09 
16:25:28 UTC (rev 28715)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m     2024-02-09 
16:54:32 UTC (rev 28716)
@@ -94,7 +94,7 @@
         return NO;
     
     if (nil == theUTI || UTTypeEqual((__bridge CFStringRef)theUTI, 
kUTTypeData)) {
-        NSAttributedString *string = [[NSAttributedString alloc] 
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL];
+        NSAttributedString *string = [[NSAttributedString alloc] 
initWithURL:aURL options:[NSDictionary dictionary] documentAttributes:NULL 
error:NULL];
         return (string == nil);
     }
     else if (UTTypeConformsTo((__bridge CFStringRef)theUTI, kUTTypePDF) || 
UTTypeConformsTo((__bridge CFStringRef)theUTI, FVSTR("com.adobe.postscript"))) {
@@ -101,7 +101,7 @@
         return NO;
     }
     else if (FVCanInitTextWithURLOfType(aURL, theUTI)) {
-        NSAttributedString *string = [[NSAttributedString alloc] 
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL];
+        NSAttributedString *string = [[NSAttributedString alloc] 
initWithURL:aURL options:[NSDictionary dictionary] documentAttributes:NULL 
error:NULL];
         return (string == nil);
     }
     
@@ -343,7 +343,7 @@
     else if (nil == theUTI || UTTypeEqual((__bridge CFStringRef)theUTI, 
kUTTypeData)) {
         theView = textView;
         NSDictionary *attrs;
-        NSAttributedString *string = [[NSAttributedString alloc] 
initWithURL:representedURL options:@{} documentAttributes:&attrs error:NULL];
+        NSAttributedString *string = [[NSAttributedString alloc] 
initWithURL:representedURL options:[NSDictionary dictionary] 
documentAttributes:&attrs error:NULL];
         if (string)
             [self _loadAttributedString:string documentAttributes:attrs 
inView:[textView documentView]];
         else
@@ -376,7 +376,7 @@
     else if (FVCanInitTextWithURLOfType(representedURL, theUTI)) {
         theView = textView;
         NSDictionary *attrs;
-        NSAttributedString *string = [[NSAttributedString alloc] 
initWithURL:representedURL options:@{} documentAttributes:&attrs error:NULL];
+        NSAttributedString *string = [[NSAttributedString alloc] 
initWithURL:representedURL options:[NSDictionary dictionary] 
documentAttributes:&attrs error:NULL];
         if (string)
             [self _loadAttributedString:string documentAttributes:attrs 
inView:[textView documentView]];
         else

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m      2024-02-09 
16:25:28 UTC (rev 28715)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVTextIcon.m      2024-02-09 
16:54:32 UTC (rev 28716)
@@ -92,7 +92,7 @@
          Occasionally NSAttributedString might end up calling 
NSHTMLReader/WebKit to load a file, which raises
          an exception and crashes on 10.4.  The workaround is to always load 
on the main thread on 10.4.
          */
-        attrString = [[NSMutableAttributedString alloc] initWithURL:_fileURL 
options:@{} documentAttributes:&documentAttributes error:NULL];
+        attrString = [[NSMutableAttributedString alloc] initWithURL:_fileURL 
options:[NSDictionary dictionary] documentAttributes:&documentAttributes 
error:NULL];
     }
     
     // plain text failed and so did NSAttributedString, so display a mildly 
unhelpful error message

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVUtilities.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVUtilities.m     2024-02-09 
16:25:28 UTC (rev 28715)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVUtilities.m     2024-02-09 
16:54:32 UTC (rev 28716)
@@ -274,7 +274,7 @@
      */
     if (type == nil || UTTypeEqual((__bridge CFStringRef)type, kUTTypeData)) {
         // This is mainly useful to prove that the file cannot be opened; as 
in the case of OmniGraffle files (see comment above), it returns YES.
-        NSAttributedString *attributedString = [[NSAttributedString alloc] 
initWithURL:aURL options:@{} documentAttributes:NULL error:NULL];
+        NSAttributedString *attributedString = [[NSAttributedString alloc] 
initWithURL:aURL options:[NSDictionary dictionary] documentAttributes:NULL 
error:NULL];
         BOOL canInit = (nil != attributedString);
         return canInit;
     }

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



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to