Revision: 4975
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4975&view=rev
Author:   hofman
Date:     2008-11-20 18:26:38 +0000 (Thu, 20 Nov 2008)

Log Message:
-----------
Separate the text of the pages in the full document text by newlines.

Modified Paths:
--------------
    trunk/PDFSelection_SKExtensions.m
    trunk/SKPDFDocument.m

Modified: trunk/PDFSelection_SKExtensions.m
===================================================================
--- trunk/PDFSelection_SKExtensions.m   2008-11-19 22:01:13 UTC (rev 4974)
+++ trunk/PDFSelection_SKExtensions.m   2008-11-20 18:26:38 UTC (rev 4975)
@@ -407,7 +407,7 @@
                                 endIndex = MIN(NSMaxRange(range) - pageStart, 
pageLengths[page]) - 1;
                             }
                         }
-                        pageStart += pageLengths[page];
+                        pageStart += pageLengths[page] + 1; // text of pages 
is separated by newlines, see -[SKPDFDocument richText]
                     }
                     
                     if (startPage != NSNotFound && startIndex != NSNotFound && 
endPage != NSNotFound && endIndex != NSNotFound) {

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2008-11-19 22:01:13 UTC (rev 4974)
+++ trunk/SKPDFDocument.m       2008-11-20 18:26:38 UTC (rev 4975)
@@ -1851,6 +1851,8 @@
     NSAttributedString *attrString;
     [textStorage beginEditing];
     for (i = 0; i < count; i++) {
+        if (i > 0)
+            [[textStorage mutableString] appendString:@"\n"];
         if (attrString = [[doc pageAtIndex:i] attributedString])
             [textStorage appendAttributedString:attrString];
     }


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to