aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCopyTable.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-02-08 01:42:21 +0000
committerrowanbeentje <rowan@beent.je>2012-02-08 01:42:21 +0000
commit700d4e71f39e7e10f6838543f8f9f2fda81a8eba (patch)
tree7f3e75b6842ceaa46dee26842c4e8bc7c4de35f2 /Source/SPCopyTable.m
parent36c061403637d5fefc1473ac3b668e54b1341871 (diff)
downloadsequelpro-700d4e71f39e7e10f6838543f8f9f2fda81a8eba.tar.gz
sequelpro-700d4e71f39e7e10f6838543f8f9f2fda81a8eba.tar.bz2
sequelpro-700d4e71f39e7e10f6838543f8f9f2fda81a8eba.zip
- Cleanup: improve compatibility with 10.7 SDK to reduce compiler warnings
Diffstat (limited to 'Source/SPCopyTable.m')
-rw-r--r--Source/SPCopyTable.m42
1 files changed, 21 insertions, 21 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index e8b1533d..78773412 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -58,7 +58,7 @@ static const NSInteger kBlobAsImageFile = 4;
* selection in the field editor's editTextView
*/
@synthesize fieldEditorSelectedRange;
-@synthesize copyBlobFileDirectory;
+@synthesize tmpBlobFileDirectory;
/**
* Cell editing in SPCustomQuery or for views in SPTableContent
@@ -160,10 +160,10 @@ static const NSInteger kBlobAsImageFile = 4;
Class mcpGeometryData = [MCPGeometryData class];
NSUInteger rowCounter = 0;
- if((withBlobHandling == kBlobAsFile || withBlobHandling == kBlobAsImageFile) && copyBlobFileDirectory && [copyBlobFileDirectory length]) {
+ if((withBlobHandling == kBlobAsFile || withBlobHandling == kBlobAsImageFile) && tmpBlobFileDirectory && [tmpBlobFileDirectory length]) {
NSFileManager *fm = [NSFileManager defaultManager];
- [fm removeItemAtPath:copyBlobFileDirectory error:nil];
- [fm createDirectoryAtPath:copyBlobFileDirectory withIntermediateDirectories:YES attributes:nil error:nil];
+ [fm removeItemAtPath:tmpBlobFileDirectory error:nil];
+ [fm createDirectoryAtPath:tmpBlobFileDirectory withIntermediateDirectories:YES attributes:nil error:nil];
}
while ( rowIndex != NSNotFound )
@@ -187,13 +187,13 @@ static const NSInteger kBlobAsImageFile = 4;
[displayString release];
}
}
- else if(withBlobHandling == kBlobAsFile && copyBlobFileDirectory && [copyBlobFileDirectory length]) {
- NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.dat", copyBlobFileDirectory, rowCounter, c];
+ else if(withBlobHandling == kBlobAsFile && tmpBlobFileDirectory && [tmpBlobFileDirectory length]) {
+ NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.dat", tmpBlobFileDirectory, rowCounter, c];
[cellData writeToFile:fp atomically:NO];
[result appendFormat:@"%@\t", fp];
}
- else if(withBlobHandling == kBlobAsImageFile && copyBlobFileDirectory && [copyBlobFileDirectory length]) {
- NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.tif", copyBlobFileDirectory, rowCounter, c];
+ else if(withBlobHandling == kBlobAsImageFile && tmpBlobFileDirectory && [tmpBlobFileDirectory length]) {
+ NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.tif", tmpBlobFileDirectory, rowCounter, c];
NSImage *image = [[NSImage alloc] initWithData:cellData];
if (image) {
NSData *d = [[NSData alloc] initWithData:[image TIFFRepresentationUsingCompression:NSTIFFCompressionLZW factor:1]];
@@ -211,8 +211,8 @@ static const NSInteger kBlobAsImageFile = 4;
}
}
else if ([cellData isKindOfClass:mcpGeometryData]) {
- if((withBlobHandling == kBlobAsFile || withBlobHandling == kBlobAsImageFile) && copyBlobFileDirectory && [copyBlobFileDirectory length]) {
- NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.pdf", copyBlobFileDirectory, rowCounter, c];
+ if((withBlobHandling == kBlobAsFile || withBlobHandling == kBlobAsImageFile) && tmpBlobFileDirectory && [tmpBlobFileDirectory length]) {
+ NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.pdf", tmpBlobFileDirectory, rowCounter, c];
SPGeometryDataView *v = [[SPGeometryDataView alloc] initWithCoordinates:[cellData coordinates]];
NSData *thePDF = [v pdfData];
if(thePDF) {
@@ -299,10 +299,10 @@ static const NSInteger kBlobAsImageFile = 4;
NSUInteger rowCounter = 0;
- if((withBlobHandling == kBlobAsFile || withBlobHandling == kBlobAsImageFile) && copyBlobFileDirectory && [copyBlobFileDirectory length]) {
+ if((withBlobHandling == kBlobAsFile || withBlobHandling == kBlobAsImageFile) && tmpBlobFileDirectory && [tmpBlobFileDirectory length]) {
NSFileManager *fm = [NSFileManager defaultManager];
- [fm removeItemAtPath:copyBlobFileDirectory error:nil];
- [fm createDirectoryAtPath:copyBlobFileDirectory withIntermediateDirectories:YES attributes:nil error:nil];
+ [fm removeItemAtPath:tmpBlobFileDirectory error:nil];
+ [fm createDirectoryAtPath:tmpBlobFileDirectory withIntermediateDirectories:YES attributes:nil error:nil];
}
while ( rowIndex != NSNotFound )
@@ -326,13 +326,13 @@ static const NSInteger kBlobAsImageFile = 4;
[displayString release];
}
}
- else if(withBlobHandling == kBlobAsFile && copyBlobFileDirectory && [copyBlobFileDirectory length]) {
- NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.dat", copyBlobFileDirectory, rowCounter, c];
+ else if(withBlobHandling == kBlobAsFile && tmpBlobFileDirectory && [tmpBlobFileDirectory length]) {
+ NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.dat", tmpBlobFileDirectory, rowCounter, c];
[cellData writeToFile:fp atomically:NO];
[result appendFormat:@"\"%@\",", fp];
}
- else if(withBlobHandling == kBlobAsImageFile && copyBlobFileDirectory && [copyBlobFileDirectory length]) {
- NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.tif", copyBlobFileDirectory, rowCounter, c];
+ else if(withBlobHandling == kBlobAsImageFile && tmpBlobFileDirectory && [tmpBlobFileDirectory length]) {
+ NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.tif", tmpBlobFileDirectory, rowCounter, c];
NSImage *image = [[NSImage alloc] initWithData:cellData];
if (image) {
NSData *d = [[NSData alloc] initWithData:[image TIFFRepresentationUsingCompression:NSTIFFCompressionLZW factor:1]];
@@ -350,8 +350,8 @@ static const NSInteger kBlobAsImageFile = 4;
}
}
else if ([cellData isKindOfClass:mcpGeometryData]) {
- if((withBlobHandling == kBlobAsFile || withBlobHandling == kBlobAsImageFile) && copyBlobFileDirectory && [copyBlobFileDirectory length]) {
- NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.pdf", copyBlobFileDirectory, rowCounter, c];
+ if((withBlobHandling == kBlobAsFile || withBlobHandling == kBlobAsImageFile) && tmpBlobFileDirectory && [tmpBlobFileDirectory length]) {
+ NSString *fp = [NSString stringWithFormat:@"%@/%ld_%ld.pdf", tmpBlobFileDirectory, rowCounter, c];
SPGeometryDataView *v = [[SPGeometryDataView alloc] initWithCoordinates:[cellData coordinates]];
NSData *thePDF = [v pdfData];
if(thePDF) {
@@ -1285,9 +1285,9 @@ static const NSInteger kBlobAsImageFile = 4;
if(blobHandling != kBlobExclude) {
NSString *bundleBlobFilePath = [NSString stringWithFormat:@"%@_%@", SPBundleTaskCopyBlobFileDirectory, uuid];
[env setObject:bundleBlobFilePath forKey:SPBundleShellVariableBlobFileDirectory];
- [self setCopyBlobFileDirectory:bundleBlobFilePath];
+ [self setTmpBlobFileDirectory:bundleBlobFilePath];
} else {
- [self setCopyBlobFileDirectory:@""];
+ [self setTmpBlobFileDirectory:@""];
}
if([inputAction isEqualToString:SPBundleInputSourceSelectedTableRowsAsTab]) {