Revision: 13687
          http://sourceforge.net/p/skim-app/code/13687
Author:   hofman
Date:     2023-10-20 14:15:03 +0000 (Fri, 20 Oct 2023)
Log Message:
-----------
rename property

Modified Paths:
--------------
    trunk/PDFPage_SKExtensions.h
    trunk/PDFPage_SKExtensions.m
    trunk/SKMainWindowController_Actions.m
    trunk/SKPDFView.m

Modified: trunk/PDFPage_SKExtensions.h
===================================================================
--- trunk/PDFPage_SKExtensions.h        2023-10-19 22:35:21 UTC (rev 13686)
+++ trunk/PDFPage_SKExtensions.h        2023-10-20 14:15:03 UTC (rev 13687)
@@ -56,7 +56,7 @@
 + (void)setUsesSequentialPageNumbering:(BOOL)flag;
 
 - (NSRect)foregroundRect;
-- (NSRect)foregroundBox;
+- (NSRect)autoCropBox;
 - (NSRect)boundingBox;
 
 - (NSImage *)thumbnailWithSize:(CGFloat)size forBox:(PDFDisplayBox)box;

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2023-10-19 22:35:21 UTC (rev 13686)
+++ trunk/PDFPage_SKExtensions.m        2023-10-20 14:15:03 UTC (rev 13687)
@@ -155,7 +155,7 @@
     return foregroundRect;
 }
 
-- (NSRect)foregroundBox {
+- (NSRect)autoCropBox {
     NSRect rect = [self foregroundRect];
     CGFloat width = fmax([[NSUserDefaults standardUserDefaults] 
floatForKey:SKAutoCropBoxMarginWidthKey], 0.0);
     CGFloat height = fmax([[NSUserDefaults standardUserDefaults] 
floatForKey:SKAutoCropBoxMarginHeightKey], 0.0);
@@ -708,7 +708,7 @@
 }
 
 - (NSData *)contentBoundsAsQDRect {
-    return [NSData dataWithRectAsQDRect:[self foregroundBox]];
+    return [NSData dataWithRectAsQDRect:[self autoCropBox]];
 }
 
 - (NSArray *)lineBoundsAsQDRects {

Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m      2023-10-19 22:35:21 UTC (rev 
13686)
+++ trunk/SKMainWindowController_Actions.m      2023-10-20 14:15:03 UTC (rev 
13687)
@@ -567,7 +567,7 @@
     NSRect rect = NSIntegralRect([pdfView currentSelectionRect]);
     PDFPage *page = [pdfView currentSelectionPage] ?: [pdfView currentPage];
     if (NSIsEmptyRect(rect))
-        rect = [page foregroundBox];
+        rect = [page autoCropBox];
     [self cropPageAtIndex:[page pageIndex] toRect:rect];
 }
 
@@ -613,11 +613,11 @@
         [self beginProgressSheetWithMessage:[NSLocalizedString(@"Cropping 
Pages", @"Message for progress sheet") stringByAppendingEllipsis] 
maxValue:MIN(18, count)];
         
         if (count == 1) {
-            rect[0] = [[[pdfView document] pageAtIndex:0] foregroundBox];
+            rect[0] = [[[pdfView document] pageAtIndex:0] autoCropBox];
             [self incrementProgressSheet];
         } else if (count < 19) {
             for (i = 0; i < count; i++) {
-                rect[i % 2] = NSUnionRect(rect[i % 2], [[[pdfView document] 
pageAtIndex:i] foregroundBox]);
+                rect[i % 2] = NSUnionRect(rect[i % 2], [[[pdfView document] 
pageAtIndex:i] autoCropBox]);
                 [self incrementProgressSheet];
             }
         } else {
@@ -624,7 +624,7 @@
             NSInteger start[3] = {1, (count - 5) / 2, count - 6};
             for (j = 0; j < 3; j++) {
                 for (i = start[j]; i < start[j] + 6; i++) {
-                    rect[i % 2] = NSUnionRect(rect[i % 2], [[[pdfView 
document] pageAtIndex:i] foregroundBox]);
+                    rect[i % 2] = NSUnionRect(rect[i % 2], [[[pdfView 
document] pageAtIndex:i] autoCropBox]);
                     [self incrementProgressSheet];
                 }
             }
@@ -653,7 +653,7 @@
     [self beginProgressSheetWithMessage:[NSLocalizedString(@"Cropping Pages", 
@"Message for progress sheet") stringByAppendingEllipsis] maxValue:iMax];
     
     for (i = 0; i < iMax; i++) {
-        NSRect rect = [[pdfDoc pageAtIndex:i] foregroundBox];
+        NSRect rect = [[pdfDoc pageAtIndex:i] autoCropBox];
         [rectArray addPointer:&rect];
         [self incrementProgressSheet];
         if (i && i % 10 == 0)
@@ -674,7 +674,7 @@
        [self beginProgressSheetWithMessage:[NSLocalizedString(@"Cropping 
Pages", @"Message for progress sheet") stringByAppendingEllipsis] maxValue:11 * 
iMax / 10];
     
     for (i = 0; i < iMax; i++) {
-        NSRect bbox = [[pdfDoc pageAtIndex:i] foregroundBox];
+        NSRect bbox = [[pdfDoc pageAtIndex:i] autoCropBox];
         size.width = fmax(size.width, NSWidth(bbox));
         size.height = fmax(size.height, NSHeight(bbox));
         [self incrementProgressSheet];
@@ -684,7 +684,7 @@
     [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode 
beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
     for (i = 0; i < iMax; i++) {
         PDFPage *page = [pdfDoc pageAtIndex:i];
-        NSRect rect = [page foregroundBox];
+        NSRect rect = [page autoCropBox];
         NSRect bounds = [page boundsForBox:kPDFDisplayBoxMediaBox];
         if (NSMinX(rect) - NSMinX(bounds) > NSMaxX(bounds) - NSMaxX(rect))
             rect.origin.x = NSMaxX(rect) - size.width;

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2023-10-19 22:35:21 UTC (rev 13686)
+++ trunk/SKPDFView.m   2023-10-20 14:15:03 UTC (rev 13687)
@@ -1523,7 +1523,7 @@
     if (toolMode == SKSelectToolMode) {
         PDFPage *page = [self currentPage];
         @synchronized (self) {
-            selectionRect = NSIntersectionRect(NSUnionRect([page 
foregroundBox], selectionRect), [page boundsForBox:[self displayBox]]);
+            selectionRect = NSIntersectionRect(NSUnionRect([page autoCropBox], 
selectionRect), [page boundsForBox:[self displayBox]]);
             selectionPageIndex = [page pageIndex];
         }
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewSelectionChangedNotification object:self];

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to