From 50f15c41936be3fb62384834bb3629e09018e67b Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 12 Aug 2010 12:44:10 +0000 Subject: Column autosizing: - Handle "(not loaded)" placeholders; this addresses http://spbug.com/l/1420 - Fix row inspection of widely-spaced rows for large, fast-loading tables, ensuring up to maxRows rows are inspected --- Source/CMCopyTable.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/CMCopyTable.m b/Source/CMCopyTable.m index 5eab896d..44df07f6 100644 --- a/Source/CMCopyTable.m +++ b/Source/CMCopyTable.m @@ -480,11 +480,11 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003; // Check the number of rows available to check, sampling every n rows if ([tableStorage count] < rowsToCheck) { - rowsToCheck = [tableStorage count]; rowStep = 1; } else { rowStep = floor([tableStorage count] / rowsToCheck); } + rowsToCheck = [tableStorage count]; // Set a default padding for this column columnBaseWidth = 24; @@ -500,6 +500,10 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003; if ([contentString isNSNull]) { contentString = [prefs objectForKey:SPNullValue]; + // Same for cells for which loading has been deferred - likely blobs + } else if ([contentString isSPNotLoaded]) { + contentString = NSLocalizedString(@"(not loaded)", @"value shown for hidden blob and text fields"); + } else { // Otherwise, ensure the cell is represented as a short string -- cgit v1.2.3