Revision: 5535
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5535&view=rev
Author:   hofman
Date:     2009-08-11 17:23:02 +0000 (Tue, 11 Aug 2009)

Log Message:
-----------
avoid adding highlights and lines without nonwhite text

Modified Paths:
--------------
    trunk/PDFAnnotationMarkup_SKExtensions.m
    trunk/PDFPage_SKExtensions.m

Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m    2009-08-11 17:04:12 UTC (rev 
5534)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m    2009-08-11 17:23:02 UTC (rev 
5535)
@@ -47,6 +47,7 @@
 #import "NSUserDefaults_SKExtensions.h"
 #import "NSGeometry_SKExtensions.h"
 #import "NSData_SKExtensions.h"
+#import "NSCharacterSet_SKExtensions.h"
 #import "SKCFCallBacks.h"
 #import "SKRuntime.h"
 
@@ -246,7 +247,7 @@
                 PDFSelection *sel;
                 while (sel = [selEnum nextObject]) {
                     lineRect = [sel boundsForPage:page];
-                    if (NSIsEmptyRect(lineRect) == NO)
+                    if (NSIsEmptyRect(lineRect) == NO && [[sel string] 
rangeOfCharacterFromSet:[NSCharacterSet 
nonWhitespaceAndNewlineCharacterSet]].length)
                          CFArrayAppendValue([self lineRects], &lineRect);
                 } 
             }

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2009-08-11 17:04:12 UTC (rev 5534)
+++ trunk/PDFPage_SKExtensions.m        2009-08-11 17:23:02 UTC (rev 5535)
@@ -414,7 +414,7 @@
         PDFSelection *s;
         while (s = [selEnum nextObject]) {
             NSRect r = [s boundsForPage:self];
-            if (NSIsEmptyRect(r) == NO)
+            if (NSIsEmptyRect(r) == NO && [[s string] 
rangeOfCharacterFromSet:[NSCharacterSet 
nonWhitespaceAndNewlineCharacterSet]].length)
                 [lines addObject:[NSValue valueWithRect:r]];
         } 
     }


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to