Revision: 6883
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6883&view=rev
Author:   hofman
Date:     2010-11-24 20:56:23 +0000 (Wed, 24 Nov 2010)

Log Message:
-----------
variable for container class description to reuse

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

Modified: trunk/PDFSelection_SKExtensions.m
===================================================================
--- trunk/PDFSelection_SKExtensions.m   2010-11-23 23:31:26 UTC (rev 6882)
+++ trunk/PDFSelection_SKExtensions.m   2010-11-24 20:56:23 UTC (rev 6883)
@@ -562,13 +562,15 @@
     NSIndexSpecifier *startSpec = nil;
     NSIndexSpecifier *endSpec = nil;
     NSScriptObjectSpecifier *textSpec = [[NSPropertySpecifier alloc] 
initWithContainerSpecifier:[page objectSpecifier] key:@"richText"];
+    NSScriptClassDescription *containerClassDescription = nil;
     
     if (textSpec) {
-        if (startSpec = [[NSIndexSpecifier alloc] 
initWithContainerClassDescription:[textSpec keyClassDescription] 
containerSpecifier:textSpec key:@"characters" index:range.location]) {
+        containerClassDescription = [textSpec keyClassDescription];
+        if (startSpec = [[NSIndexSpecifier alloc] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:textSpec key:@"characters" index:range.location]) {
             if (range.length == 1) {
                 [ranges addObject:startSpec];
-            } else if ((endSpec = [[NSIndexSpecifier alloc] 
initWithContainerClassDescription:[textSpec keyClassDescription] 
containerSpecifier:textSpec key:@"characters" index:NSMaxRange(range) - 1]) &&
-                       (rangeSpec = [[NSRangeSpecifier alloc] 
initWithContainerClassDescription:[textSpec keyClassDescription] 
containerSpecifier:textSpec key:@"characters" startSpecifier:startSpec 
endSpecifier:endSpec])) {
+            } else if ((endSpec = [[NSIndexSpecifier alloc] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:textSpec key:@"characters" index:NSMaxRange(range) - 1]) &&
+                       (rangeSpec = [[NSRangeSpecifier alloc] 
initWithContainerClassDescription:containerClassDescription 
containerSpecifier:textSpec key:@"characters" startSpecifier:startSpec 
endSpecifier:endSpec])) {
                 [ranges addObject:rangeSpec];
                 [rangeSpec release];
             }


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

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to