aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCopyTable.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-02-19 16:25:19 +0000
committerstuconnolly <stuart02@gmail.com>2012-02-19 16:25:19 +0000
commit2483cd22f74239d2a06c83f1c5d9a25eaab44a7c (patch)
tree2a8a527b3f418c257e65156efb582f818324c812 /Source/SPCopyTable.m
parentb7bd2ae9a683652920a6c772eadeca2bac1e7b91 (diff)
downloadsequelpro-2483cd22f74239d2a06c83f1c5d9a25eaab44a7c.tar.gz
sequelpro-2483cd22f74239d2a06c83f1c5d9a25eaab44a7c.tar.bz2
sequelpro-2483cd22f74239d2a06c83f1c5d9a25eaab44a7c.zip
Bring outline view branch up to date with trunk (r3471:r3481).
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 36f1f6b3..e13ae61e 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -59,7 +59,7 @@ 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
@@ -169,10 +169,10 @@ 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 )
@@ -196,13 +196,13 @@ 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]];
@@ -220,8 +220,8 @@ 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) {
@@ -308,10 +308,10 @@ 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 )
@@ -335,13 +335,13 @@ 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]];
@@ -359,8 +359,8 @@ 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) {
@@ -1294,9 +1294,9 @@ 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]) {