Revision: 27278
http://sourceforge.net/p/bibdesk/svn/27278
Author: hofman
Date: 2022-03-07 16:46:37 +0000 (Mon, 07 Mar 2022)
Log Message:
-----------
No need anymorefor function
Modified Paths:
--------------
trunk/bibdesk/BDSKItemPasteboardHelper.m
Modified: trunk/bibdesk/BDSKItemPasteboardHelper.m
===================================================================
--- trunk/bibdesk/BDSKItemPasteboardHelper.m 2022-03-07 16:08:09 UTC (rev
27277)
+++ trunk/bibdesk/BDSKItemPasteboardHelper.m 2022-03-07 16:46:37 UTC (rev
27278)
@@ -45,8 +45,6 @@
@interface BDSKItemPasteboardHelper (Private)
-static NSPasteboardItem *pasteboardItemForType(NSPasteboard *pboard, NSString
*type);
-
- (BOOL)pasteboardIsValid:(NSPasteboard *)pboard;
- (NSMutableArray *)promisedTypesForPasteboard:(NSPasteboard *)pboard;
- (void)setPromisedTypes:(NSMutableArray *)types items:(NSArray *)items
dragCopyType:(BDSKDragCopyType)dragCopyType forPasteboard:(NSPasteboard
*)pboard;
@@ -275,13 +273,14 @@
- (void)clearPromisedTypesForPasteboard:(NSPasteboard *)pboard {
if ([self isProviderForPasteboard:pboard]) {
for (NSString *type in [[[self promisedTypesForPasteboard:pboard]
copy] autorelease]) {
- @try {
- // can raise NSPasteboardCommunicationException
- [pasteboardItemForType(pboard, type) setData:[NSData data]
forType:type];
+ for (NSPasteboardItem *item in [pboard pasteboardItems]) {
+ if ([[item types] containsObject:type]) {
+ // can raise NSPasteboardCommunicationException
+ @try { [item setData:[NSData data] forType:type]; }
+ @catch(id exception) { NSLog(@"ignoring exception %@ in
-[%@ %@]", exception, [self class], NSStringFromSelector(_cmd)); }
+ break;
+ }
}
- @catch(id exception) {
- NSLog(@"ignoring exception %@ in -[%@ %@]", exception, [self
class], NSStringFromSelector(_cmd));
- }
}
}
[self removePromisedTypesForPasteboard:pboard];
@@ -292,14 +291,6 @@
@implementation BDSKItemPasteboardHelper (Private)
-static NSPasteboardItem *pasteboardItemForType(NSPasteboard *pboard, NSString
*type) {
- for (NSPasteboardItem *item in [pboard pasteboardItems]) {
- if ([[item types] containsObject:type])
- return item;
- }
- return nil;
-}
-
- (BOOL)pasteboardIsValid:(NSPasteboard *)pboard
{
// see bug #1791132
https://sourceforge.net/tracker/index.php?func=detail&aid=1791132&group_id=61487&atid=497423
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