Revision: 27296
          http://sourceforge.net/p/bibdesk/svn/27296
Author:   hofman
Date:     2022-03-11 15:54:04 +0000 (Fri, 11 Mar 2022)
Log Message:
-----------
check for typecorrectly

Modified Paths:
--------------
    trunk/bibdesk/BDSKItemPasteboardHelper.m

Modified: trunk/bibdesk/BDSKItemPasteboardHelper.m
===================================================================
--- trunk/bibdesk/BDSKItemPasteboardHelper.m    2022-03-11 15:51:00 UTC (rev 
27295)
+++ trunk/bibdesk/BDSKItemPasteboardHelper.m    2022-03-11 15:54:04 UTC (rev 
27296)
@@ -199,7 +199,9 @@
                     string = [texTask laTeXString];
                 } else {
                     data = [texTask PDFData];
-                    if (dragCopyType == BDSKDragCopyRTF && data) {
+                    if (dragCopyType == BDSKDragCopyPDF){
+                        BDSKASSERT([type isEqualToString:NSPasteboardTypePDF]);
+                    } else if (data) {
                         BDSKASSERT([type isEqualToString:NSPasteboardTypeRTF]);
                         PDFDocument *pdfDoc = [[PDFDocument alloc] 
initWithData:data];
                         NSUInteger i, count = [pdfDoc pageCount];
@@ -216,8 +218,6 @@
                         data = [attrString RTFFromRange:NSMakeRange(0, 
[attrString length]) documentAttributes:[NSDictionary 
dictionaryWithObjectsAndKeys:NSRTFTextDocumentType, 
NSDocumentTypeDocumentAttribute, nil]];
                         [attrString release];
                         [pdfDoc release];
-                    } else {
-                        BDSKASSERT([type isEqualToString:NSPasteboardTypePDF]);
                     }
                 }
             }

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