Revision: 15002 http://sourceforge.net/p/skim-app/code/15002 Author: hofman Date: 2025-03-22 15:19:16 +0000 (Sat, 22 Mar 2025) Log Message: ----------- rename method, generics
Modified Paths: -------------- trunk/PDFAnnotationMarkup_SKExtensions.m trunk/PDFSelection_SKExtensions.h trunk/PDFSelection_SKExtensions.m Modified: trunk/PDFAnnotationMarkup_SKExtensions.m =================================================================== --- trunk/PDFAnnotationMarkup_SKExtensions.m 2025-03-21 19:02:24 UTC (rev 15001) +++ trunk/PDFAnnotationMarkup_SKExtensions.m 2025-03-22 15:19:16 UTC (rev 15002) @@ -120,7 +120,7 @@ NSRect bounds = NSZeroRect; NSPointerArray *lines = nil; if ([selection hasCharacters]) { - for (PDFSelection *sel in [selection selectionComponentsOnPage:page]) { + for (PDFSelection *sel in [selection connectedSelectionsOnPage:page]) { NSRect lineRect = [sel boundsForPage:page]; if (NSIsEmptyRect(lineRect) == NO && [[sel string] rangeOfCharacterFromSet:[NSCharacterSet nonWhitespaceAndNewlineCharacterSet]].length) { if (lines == nil) Modified: trunk/PDFSelection_SKExtensions.h =================================================================== --- trunk/PDFSelection_SKExtensions.h 2025-03-21 19:02:24 UTC (rev 15001) +++ trunk/PDFSelection_SKExtensions.h 2025-03-22 15:19:16 UTC (rev 15002) @@ -60,7 +60,7 @@ - (CGFloat)boundsOrderForPage:(PDFPage *)page; -- (NSArray *)selectionComponentsOnPage:(nullable PDFPage *)page; +- (NSArray<PDFSelection *> *)connectedSelectionsOnPage:(nullable PDFPage *)page; + (nullable instancetype)selectionWithSpecifier:(nullable id)specifier; + (nullable instancetype)selectionWithSpecifier:(nullable id)specifier onPage:(nullable PDFPage *)aPage; Modified: trunk/PDFSelection_SKExtensions.m =================================================================== --- trunk/PDFSelection_SKExtensions.m 2025-03-21 19:02:24 UTC (rev 15001) +++ trunk/PDFSelection_SKExtensions.m 2025-03-22 15:19:16 UTC (rev 15002) @@ -89,7 +89,7 @@ } - (NSString *)compactedCleanedString { - NSArray *lines = [self selectionComponentsOnPage:nil]; + NSArray *lines = [self connectedSelectionsOnPage:nil]; if ([lines count] < 2) return [[[self string] stringByRemovingAliens] stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines]; NSMutableString *string = [NSMutableString string]; @@ -236,7 +236,7 @@ return [page sortOrderForBounds:[self boundsForPage:page]]; } -- (NSArray *)selectionComponentsOnPage:(PDFPage *)page { +- (NSArray *)connectedSelectionsOnPage:(PDFPage *)page { NSMutableArray *components = [NSMutableArray array]; for (PDFSelection *sel in [self selectionsByLine]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit