aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCopyTable.m
diff options
context:
space:
mode:
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]) {