Revision: 13337
http://sourceforge.net/p/skim-app/code/13337
Author: hofman
Date: 2023-03-03 10:22:44 +0000 (Fri, 03 Mar 2023)
Log Message:
-----------
ignore some deprecation warnings
Modified Paths:
--------------
trunk/NSUserDefaults_SKExtensions.m
trunk/NSValueTransformer_SKExtensions.m
trunk/PDFAnnotation_SKExtensions.m
trunk/SKNotesDocument.m
Modified: trunk/NSUserDefaults_SKExtensions.m
===================================================================
--- trunk/NSUserDefaults_SKExtensions.m 2023-03-02 16:49:14 UTC (rev 13336)
+++ trunk/NSUserDefaults_SKExtensions.m 2023-03-03 10:22:44 UTC (rev 13337)
@@ -48,7 +48,10 @@
@try { color = [NSKeyedUnarchiver unarchiveObjectWithData:data]; }
@catch (id e) {}
if (color == nil) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@try { color = [NSUnarchiver unarchiveObjectWithData:data]; }
+#pragma clang diagnostic pop
@catch (id e) {}
}
if ([color isKindOfClass:[NSColor class]] == NO)
Modified: trunk/NSValueTransformer_SKExtensions.m
===================================================================
--- trunk/NSValueTransformer_SKExtensions.m 2023-03-02 16:49:14 UTC (rev
13336)
+++ trunk/NSValueTransformer_SKExtensions.m 2023-03-03 10:22:44 UTC (rev
13337)
@@ -109,7 +109,10 @@
@try { color = [NSKeyedUnarchiver unarchiveObjectWithData:value]; }
@catch (id e) {}
if (color == nil) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@try { color = [NSUnarchiver unarchiveObjectWithData:value]; }
+#pragma clang diagnostic pop
@catch (id e) {}
}
if ([color isKindOfClass:[NSColor class]] == NO)
Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m 2023-03-02 16:49:14 UTC (rev 13336)
+++ trunk/PDFAnnotation_SKExtensions.m 2023-03-03 10:22:44 UTC (rev 13337)
@@ -151,6 +151,8 @@
}
static inline Class SKAnnotationClassForType(NSString *type) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([type isEqualToString:SKNNoteString] || [type
isEqualToString:SKNTextString])
return [SKNPDFAnnotationNote class];
else if ([type isEqualToString:SKNFreeTextString])
@@ -167,6 +169,7 @@
return [PDFAnnotationInk class];
else
return Nil;
+#pragma clang diagnostic pop
}
+ (PDFAnnotation *)newSkimNoteWithBounds:(NSRect)bounds forType:(NSString
*)type {
@@ -178,13 +181,19 @@
}
+ (PDFAnnotation *)newSkimNoteWithSelection:(PDFSelection *)selection
forType:(NSString *)type {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
return [[PDFAnnotationMarkup alloc] initSkimNoteWithSelection:selection
forPage:nil forType:type];
+#pragma clang diagnostic pop
}
+ (NSArray *)SkimNotesAndPagesWithSelection:(PDFSelection *)selection
forType:(NSString *)type {
NSMutableArray *annotations = [NSMutableArray array];
for (PDFPage *page in [selection pages]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
PDFAnnotation *annotation = [[PDFAnnotationMarkup alloc]
initSkimNoteWithSelection:selection forPage:page forType:type];
+#pragma clang diagnostic pop
if (annotation) {
[annotations addObject:@[annotation, page]];
[annotation release];
@@ -203,7 +212,10 @@
bounds = NSInsetRect(NSIntegralRect(bounds), -8.0, -8.0);
[transform translateXBy:-NSMinX(bounds) yBy:-NSMinY(bounds)];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
PDFAnnotation *annotation = [[PDFAnnotationInk alloc]
initSkimNoteWithBounds:bounds forType:SKNInkString];
+#pragma clang diagnostic pop
for (path in paths)
[(PDFAnnotationInk *)annotation addBezierPath:[transform
transformBezierPath:path]];
return annotation;
@@ -657,6 +669,8 @@
- (NSDictionary *)scriptingProperties {
static NSSet *allCustomScriptingKeys = nil;
if (allCustomScriptingKeys == nil) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSMutableSet *customScriptingKeys = [NSMutableSet set];
[customScriptingKeys unionSet:[PDFAnnotationCircle
customScriptingKeys]];
[customScriptingKeys unionSet:[PDFAnnotationSquare
customScriptingKeys]];
@@ -666,6 +680,7 @@
[customScriptingKeys unionSet:[PDFAnnotationLine customScriptingKeys]];
[customScriptingKeys unionSet:[PDFAnnotationInk customScriptingKeys]];
allCustomScriptingKeys = [customScriptingKeys copy];
+#pragma clang diagnostic pop
}
// remove all custom properties that are not valid for this class
NSMutableDictionary *properties = [[[super scriptingProperties]
mutableCopy] autorelease];
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2023-03-02 16:49:14 UTC (rev 13336)
+++ trunk/SKNotesDocument.m 2023-03-03 10:22:44 UTC (rev 13337)
@@ -344,6 +344,8 @@
for (NSDictionary *dict in array) {
PDFAnnotation *note = [PDFAnnotation
newSkimNoteWithProperties:dict];
if (note == nil && [[dict objectForKey:SKNPDFAnnotationTypeKey]
isEqualToString:SKNWidgetString]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
switch ([[dict objectForKey:SKNPDFAnnotationWidgetTypeKey]
integerValue]) {
case kSKNPDFWidgetTypeText: note =
[PDFAnnotationTextWidget alloc]; break;
case kSKNPDFWidgetTypeButton: note =
[PDFAnnotationButtonWidget alloc]; break;
@@ -350,6 +352,7 @@
case kSKNPDFWidgetTypeChoice: note =
[PDFAnnotationChoiceWidget alloc]; break;
default: break;
}
+#pragma clang diagnostic pop
note = [note initSkimNoteWithProperties:dict];
}
if (note) {
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