Revision: 7201
http://skim-app.svn.sourceforge.net/skim-app/?rev=7201&view=rev
Author: hofman
Date: 2011-04-05 11:11:36 +0000 (Tue, 05 Apr 2011)
Log Message:
-----------
enclose check after assignment in if block in double parenthesis
Modified Paths:
--------------
trunk/NSView_SKExtensions.m
trunk/PDFPage_SKExtensions.m
trunk/PDFSelection_SKExtensions.m
trunk/SKApplicationController.m
trunk/SKDocumentController.m
trunk/SKLocalization.m
trunk/SKMainDocument.m
trunk/SKMainWindowController.m
trunk/SKMainWindowController_UI.m
trunk/SKPDFSynchronizerServer.m
trunk/SKPDFView.m
trunk/SKSecondaryPDFView.m
trunk/SKTransitionController.m
trunk/SKTransitionInfo.m
Modified: trunk/NSView_SKExtensions.m
===================================================================
--- trunk/NSView_SKExtensions.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/NSView_SKExtensions.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -50,7 +50,7 @@
NSView *view;
for (NSView *subview in [self subviews]) {
- if (view = [subview subviewOfClass:aClass])
+ if ((view = [subview subviewOfClass:aClass]))
return view;
}
return nil;
Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/PDFPage_SKExtensions.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -494,7 +494,7 @@
if (selSpec == nil) {
[[NSScriptCommand currentCommand]
setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
[[NSScriptCommand currentCommand]
setScriptErrorString:NSLocalizedString(@"New markup notes need a selection.",
@"Error description")];
- } else if (selection = [PDFSelection
selectionWithSpecifier:selSpec]) {
+ } else if ((selection = [PDFSelection
selectionWithSpecifier:selSpec])) {
if ([type isEqualToString:SKNHighlightString])
markupType = kPDFMarkupTypeHighlight;
else if ([type isEqualToString:SKNUnderlineString])
Modified: trunk/PDFSelection_SKExtensions.m
===================================================================
--- trunk/PDFSelection_SKExtensions.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/PDFSelection_SKExtensions.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -593,7 +593,7 @@
if (textSpec) {
containerClassDescription = [textSpec keyClassDescription];
- if (startSpec = [[NSIndexSpecifier alloc]
initWithContainerClassDescription:containerClassDescription
containerSpecifier:textSpec key:@"characters" index:range.location]) {
+ if ((startSpec = [[NSIndexSpecifier alloc]
initWithContainerClassDescription:containerClassDescription
containerSpecifier:textSpec key:@"characters" index:range.location])) {
if (range.length == 1) {
[ranges addObject:startSpec];
} else if ((endSpec = [[NSIndexSpecifier alloc]
initWithContainerClassDescription:containerClassDescription
containerSpecifier:textSpec key:@"characters" index:NSMaxRange(range) - 1]) &&
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKApplicationController.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -497,31 +497,31 @@
- (void)setDefaultNoteColors:(NSDictionary *)colorDict {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSColor *color;
- if (color = [colorDict objectForKey:SKNFreeTextString])
+ if ((color = [colorDict objectForKey:SKNFreeTextString]))
[sud setColor:color forKey:SKFreeTextNoteColorKey];
- if (color = [colorDict objectForKey:SKNNoteString])
+ if ((color = [colorDict objectForKey:SKNNoteString]))
[sud setColor:color forKey:SKAnchoredNoteColorKey];
- if (color = [colorDict objectForKey:SKNCircleString])
+ if ((color = [colorDict objectForKey:SKNCircleString]))
[sud setColor:color forKey:SKCircleNoteColorKey];
- if (color = [colorDict objectForKey:SKNSquareString])
+ if ((color = [colorDict objectForKey:SKNSquareString]))
[sud setColor:color forKey:SKSquareNoteColorKey];
- if (color = [colorDict objectForKey:SKNHighlightString])
+ if ((color = [colorDict objectForKey:SKNHighlightString]))
[sud setColor:color forKey:SKHighlightNoteColorKey];
- if (color = [colorDict objectForKey:SKNUnderlineString])
+ if ((color = [colorDict objectForKey:SKNUnderlineString]))
[sud setColor:color forKey:SKUnderlineNoteColorKey];
- if (color = [colorDict objectForKey:SKNStrikeOutString])
+ if ((color = [colorDict objectForKey:SKNStrikeOutString]))
[sud setColor:color forKey:SKStrikeOutNoteColorKey];
- if (color = [colorDict objectForKey:SKNLineString])
+ if ((color = [colorDict objectForKey:SKNLineString]))
[sud setColor:color forKey:SKLineNoteColorKey];
- if (color = [colorDict objectForKey:SKNInkString])
+ if ((color = [colorDict objectForKey:SKNInkString]))
[sud setColor:color forKey:SKInkNoteColorKey];
- if (color = [colorDict objectForKey:SKCircleInteriorString])
+ if ((color = [colorDict objectForKey:SKCircleInteriorString]))
[sud setColor:color forKey:SKCircleNoteInteriorColorKey];
- if (color = [colorDict objectForKey:SKSquareInteriorString])
+ if ((color = [colorDict objectForKey:SKSquareInteriorString]))
[sud setColor:color forKey:SKSquareNoteInteriorColorKey];
- if (color = [colorDict objectForKey:SKLineInteriorString])
+ if ((color = [colorDict objectForKey:SKLineInteriorString]))
[sud setColor:color forKey:SKLineNoteInteriorColorKey];
- if (color = [colorDict objectForKey:SKFreeTextFontString])
+ if ((color = [colorDict objectForKey:SKFreeTextFontString]))
[sud setColor:color forKey:SKFreeTextNoteFontColorKey];
}
@@ -539,15 +539,15 @@
- (void)setDefaultLineWidths:(NSDictionary *)dict {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSNumber *number;
- if (number = [dict objectForKey:SKNFreeTextString])
+ if ((number = [dict objectForKey:SKNFreeTextString]))
[sud setDouble:[number doubleValue] forKey:SKFreeTextNoteLineWidthKey];
- if (number = [dict objectForKey:SKNCircleString])
+ if ((number = [dict objectForKey:SKNCircleString]))
[sud setDouble:[number doubleValue] forKey:SKCircleNoteLineWidthKey];
- if (number = [dict objectForKey:SKNSquareString])
+ if ((number = [dict objectForKey:SKNSquareString]))
[sud setDouble:[number doubleValue] forKey:SKSquareNoteLineWidthKey];
- if (number = [dict objectForKey:SKNLineString])
+ if ((number = [dict objectForKey:SKNLineString]))
[sud setDouble:[number doubleValue] forKey:SKLineNoteLineWidthKey];
- if (number = [dict objectForKey:SKNInkString])
+ if ((number = [dict objectForKey:SKNInkString]))
[sud setDouble:[number doubleValue] forKey:SKInkNoteLineWidthKey];
}
@@ -565,15 +565,15 @@
- (void)setDefaultLineStyles:(NSDictionary *)dict {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSNumber *number;
- if (number = [dict objectForKey:SKNFreeTextString])
+ if ((number = [dict objectForKey:SKNFreeTextString]))
[sud setInteger:[number integerValue]
forKey:SKFreeTextNoteLineStyleKey];
- if (number = [dict objectForKey:SKNCircleString])
+ if ((number = [dict objectForKey:SKNCircleString]))
[sud setInteger:[number integerValue] forKey:SKCircleNoteLineStyleKey];
- if (number = [dict objectForKey:SKNSquareString])
+ if ((number = [dict objectForKey:SKNSquareString]))
[sud setInteger:[number integerValue] forKey:SKSquareNoteLineStyleKey];
- if (number = [dict objectForKey:SKNLineString])
+ if ((number = [dict objectForKey:SKNLineString]))
[sud setInteger:[number integerValue] forKey:SKLineNoteLineStyleKey];
- if (number = [dict objectForKey:SKNInkString])
+ if ((number = [dict objectForKey:SKNInkString]))
[sud setInteger:[number integerValue] forKey:SKInkNoteLineStyleKey];
}
@@ -591,15 +591,15 @@
- (void)setDefaultDashPatterns:(NSDictionary *)dict {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSArray *array;
- if (array = [dict objectForKey:SKNFreeTextString])
+ if ((array = [dict objectForKey:SKNFreeTextString]))
[sud setObject:array forKey:SKFreeTextNoteDashPatternKey];
- if (array = [dict objectForKey:SKNCircleString])
+ if ((array = [dict objectForKey:SKNCircleString]))
[sud setObject:array forKey:SKCircleNoteDashPatternKey];
- if (array = [dict objectForKey:SKNSquareString])
+ if ((array = [dict objectForKey:SKNSquareString]))
[sud setObject:array forKey:SKSquareNoteDashPatternKey];
- if (array = [dict objectForKey:SKNLineString])
+ if ((array = [dict objectForKey:SKNLineString]))
[sud setObject:array forKey:SKLineNoteDashPatternKey];
- if (array = [dict objectForKey:SKNInkString])
+ if ((array = [dict objectForKey:SKNInkString]))
[sud setObject:array forKey:SKInkNoteDashPatternKey];
}
@@ -614,9 +614,9 @@
- (void)setDefaultFontNames:(NSDictionary *)fontNameDict {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSString *fontName;
- if (fontName = [fontNameDict objectForKey:SKNFreeTextString])
+ if ((fontName = [fontNameDict objectForKey:SKNFreeTextString]))
[sud setObject:fontName forKey:SKFreeTextNoteFontNameKey];
- if (fontName = [fontNameDict objectForKey:SKNNoteString])
+ if ((fontName = [fontNameDict objectForKey:SKNNoteString]))
[sud setObject:fontName forKey:SKAnchoredNoteFontNameKey];
}
@@ -631,9 +631,9 @@
- (void)setDefaultFontSizes:(NSDictionary *)fontSizeDict {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSNumber *fontSize;
- if (fontSize = [fontSizeDict objectForKey:SKNFreeTextString])
+ if ((fontSize = [fontSizeDict objectForKey:SKNFreeTextString]))
[sud setObject:fontSize forKey:SKFreeTextNoteFontSizeKey];
- if (fontSize = [fontSizeDict objectForKey:SKNNoteString])
+ if ((fontSize = [fontSizeDict objectForKey:SKNNoteString]))
[sud setObject:fontSize forKey:SKAnchoredNoteFontSizeKey];
}
Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKDocumentController.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -315,11 +315,11 @@
if(fileURL == nil && [setup objectForKey:SKDocumentSetupFileNameKey])
fileURL = [NSURL fileURLWithPath:[setup
objectForKey:SKDocumentSetupFileNameKey]];
if(fileURL && [[NSFileManager defaultManager] fileExistsAtPath:[fileURL
path]] && NO == [[NSFileManager defaultManager] isTrashedFileAtURL:fileURL]) {
- if (document = [self documentForURL:fileURL]) {
+ if ((document = [self documentForURL:fileURL])) {
// the document was already open, don't call makeWindowControllers
because that adds new empty windows
[document applySetup:setup];
[document showWindows];
- } else if (document = [self openDocumentWithContentsOfURL:fileURL
display:NO error:&error]) {
+ } else if ((document = [self openDocumentWithContentsOfURL:fileURL
display:NO error:&error])) {
[document makeWindowControllers];
[document applySetup:setup];
[document showWindows];
Modified: trunk/SKLocalization.m
===================================================================
--- trunk/SKLocalization.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKLocalization.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -100,9 +100,9 @@
NSUInteger i, iMax = [self segmentCount];
NSString *string;
for (i = 0; i < iMax; i++) {
- if (string = localizedStringFromTable([self labelForSegment:i], table))
+ if ((string = localizedStringFromTable([self labelForSegment:i],
table)))
[self setLabel:string forSegment:i];
- if (string = localizedStringFromTable([self toolTipForSegment:i],
table))
+ if ((string = localizedStringFromTable([self toolTipForSegment:i],
table)))
[self setToolTip:string forSegment:i];
[[self menuForSegment:i] localizeStringsFromTable:table];
}
@@ -159,7 +159,7 @@
NSString *toolTip;
[cells localizeStringsFromTable:table];
for (id cell in cells) {
- if (toolTip = localizedStringFromTable([self toolTipForCell:cell],
table))
+ if ((toolTip = localizedStringFromTable([self toolTipForCell:cell],
table)))
[self setToolTip:toolTip forCell:cell];
}
}
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKMainDocument.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -517,18 +517,18 @@
[(NSMutableDictionary *)info setObject:options
forKey:SKPresentationOptionsKey];
}
[fileWrapper addRegularFileWithContents:pdfData preferredFilename:[name
stringByAppendingPathExtension:@"pdf"]];
- if (data = [[[self pdfDocument] string]
dataUsingEncoding:NSUTF8StringEncoding])
+ if ((data = [[[self pdfDocument] string]
dataUsingEncoding:NSUTF8StringEncoding]))
[fileWrapper addRegularFileWithContents:data
preferredFilename:[BUNDLE_DATA_FILENAME stringByAppendingPathExtension:@"txt"]];
- if (data = [NSPropertyListSerialization dataFromPropertyList:info
format:NSPropertyListXMLFormat_v1_0 errorDescription:NULL])
+ if ((data = [NSPropertyListSerialization dataFromPropertyList:info
format:NSPropertyListXMLFormat_v1_0 errorDescription:NULL]))
[fileWrapper addRegularFileWithContents:data
preferredFilename:[BUNDLE_DATA_FILENAME
stringByAppendingPathExtension:@"plist"]];
if ([[self notes] count] > 0) {
- if (data = [self notesData])
+ if ((data = [self notesData]))
[fileWrapper addRegularFileWithContents:data
preferredFilename:[name stringByAppendingPathExtension:@"skim"]];
- if (data = [[self notesString] dataUsingEncoding:NSUTF8StringEncoding])
+ if ((data = [[self notesString]
dataUsingEncoding:NSUTF8StringEncoding]))
[fileWrapper addRegularFileWithContents:data
preferredFilename:[name stringByAppendingPathExtension:@"txt"]];
- if (data = [self notesRTFData])
+ if ((data = [self notesRTFData]))
[fileWrapper addRegularFileWithContents:data
preferredFilename:[name stringByAppendingPathExtension:@"rtf"]];
- if (data = [self notesFDFDataForFile:[name
stringByAppendingPathExtension:@"pdf"] fileIDStrings:[self fileIDStrings]])
+ if ((data = [self notesFDFDataForFile:[name
stringByAppendingPathExtension:@"pdf"] fileIDStrings:[self fileIDStrings]]))
[fileWrapper addRegularFileWithContents:data
preferredFilename:[name stringByAppendingPathExtension:@"fdf"]];
}
return [fileWrapper autorelease];
@@ -726,18 +726,18 @@
}
}
} else {
- if (fileData = [[NSData alloc] initWithContentsOfURL:absoluteURL
options:NSUncachedRead error:&error]) {
+ if ((fileData = [[NSData alloc] initWithContentsOfURL:absoluteURL
options:NSUncachedRead error:&error])) {
if ([docType isEqualToString:SKPDFDocumentType]) {
- if (data = [fileData retain])
+ if ((data = [fileData retain]))
pdfDoc = [[SKPDFDocument alloc] initWithURL:absoluteURL];
} else if ([docType isEqualToString:SKPostScriptDocumentType]) {
- if (data = [[SKConversionProgressController
PDFDataWithPostScriptData:fileData error:&error] retain])
+ if ((data = [[SKConversionProgressController
PDFDataWithPostScriptData:fileData error:&error] retain]))
pdfDoc = [[SKPDFDocument alloc] initWithData:data];
} else if ([docType isEqualToString:SKDVIDocumentType]) {
- if (data = [[SKConversionProgressController
PDFDataWithDVIFile:[absoluteURL path] error:&error] retain])
+ if ((data = [[SKConversionProgressController
PDFDataWithDVIFile:[absoluteURL path] error:&error] retain]))
pdfDoc = [[SKPDFDocument alloc] initWithData:data];
} else if ([docType isEqualToString:SKXDVDocumentType]) {
- if (data = [[SKConversionProgressController
PDFDataWithXDVFile:[absoluteURL path] error:&error] retain])
+ if ((data = [[SKConversionProgressController
PDFDataWithXDVFile:[absoluteURL path] error:&error] retain]))
pdfDoc = [[SKPDFDocument alloc] initWithData:data];
}
}
@@ -1537,7 +1537,7 @@
if (startStringRange.location != NSNotFound) {
NSRange endStringRange = [pdfData
rangeOfData:endStringPattern options:0
range:SKRangeBetweenRanges(startStringRange, endArrayRange)];
if (endStringRange.location != NSNotFound) {
- if (firstIDData = [pdfData
subdataWithRange:SKRangeBetweenRanges(startStringRange, endStringRange)]) {
+ if ((firstIDData = [pdfData
subdataWithRange:SKRangeBetweenRanges(startStringRange, endStringRange)])) {
startStringRange = [pdfData
rangeOfData:startStringPattern options:0
range:SKRangeBetweenRanges(endStringRange, endArrayRange)];
if (startStringRange.location !=
NSNotFound) {
endStringRange = [pdfData
rangeOfData:endStringPattern options:0
range:SKRangeBetweenRanges(startStringRange, endArrayRange)];
@@ -1776,7 +1776,7 @@
for (i = 0; i < count; i++) {
if (i > 0)
[[textStorage mutableString] appendString:@"\n"];
- if (attrString = [[doc pageAtIndex:i] attributedString])
+ if ((attrString = [[doc pageAtIndex:i] attributedString]))
[textStorage appendAttributedString:attrString];
}
[textStorage endEditing];
@@ -1940,7 +1940,7 @@
if ([caseSensitive isKindOfClass:[NSNumber class]] == NO ||
[caseSensitive boolValue] == NO)
options |= NSCaseInsensitiveSearch;
- if (selection = [[self mainWindowController] findString:text
fromSelection:selection withOptions:options])
+ if ((selection = [[self mainWindowController] findString:text
fromSelection:selection withOptions:options]))
specifier = [selection objectSpecifier];
}
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKMainWindowController.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -574,17 +574,17 @@
- (void)applyPDFSettings:(NSDictionary *)setup {
NSNumber *number;
- if (number = [setup objectForKey:AUTOSCALES_KEY])
+ if ((number = [setup objectForKey:AUTOSCALES_KEY]))
[pdfView setAutoScales:[number boolValue]];
if ([pdfView autoScales] == NO && (number = [setup
objectForKey:SCALEFACTOR_KEY]))
[pdfView setScaleFactor:[number doubleValue]];
- if (number = [setup objectForKey:DISPLAYSPAGEBREAKS_KEY])
+ if ((number = [setup objectForKey:DISPLAYSPAGEBREAKS_KEY]))
[pdfView setDisplaysPageBreaks:[number boolValue]];
- if (number = [setup objectForKey:DISPLAYSASBOOK_KEY])
+ if ((number = [setup objectForKey:DISPLAYSASBOOK_KEY]))
[pdfView setDisplaysAsBook:[number boolValue]];
- if (number = [setup objectForKey:DISPLAYMODE_KEY])
+ if ((number = [setup objectForKey:DISPLAYMODE_KEY]))
[pdfView setDisplayMode:[number integerValue]];
- if (number = [setup objectForKey:DISPLAYBOX_KEY])
+ if ((number = [setup objectForKey:DISPLAYBOX_KEY]))
[pdfView setDisplayBox:[number integerValue]];
}
@@ -863,7 +863,7 @@
for (NSDictionary *dict in noteDicts) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSUInteger pageIndex = [[dict
objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntegerValue];
- if (annotation = [[PDFAnnotation alloc]
initSkimNoteWithProperties:dict]) {
+ if ((annotation = [[PDFAnnotation alloc]
initSkimNoteWithProperties:dict])) {
if (pageIndex == NSNotFound)
pageIndex = 0;
else if (pageIndex >= [pdfDoc pageCount])
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKMainWindowController_UI.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -1148,7 +1148,7 @@
Class docClass = [sdc documentClassForContentsOfURL:fileURL];
id document = nil;
if (docClass) {
- if (document = [sdc openDocumentWithContentsOfURL:fileURL display:YES
error:&error]) {
+ if ((document = [sdc openDocumentWithContentsOfURL:fileURL display:YES
error:&error])) {
if ([docClass isPDFDocument]) {
NSUInteger pageIndex = [action pageIndex];
if (pageIndex < [[document pdfDocument] pageCount]) {
Modified: trunk/SKPDFSynchronizerServer.m
===================================================================
--- trunk/SKPDFSynchronizerServer.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKPDFSynchronizerServer.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -542,7 +542,7 @@
NSString *filename;
synctex_node_t node = synctex_scanner_input(scanner);
do {
- if (fileRep = synctex_scanner_get_name(scanner,
synctex_node_tag(node))) {
+ if ((fileRep = synctex_scanner_get_name(scanner,
synctex_node_tag(node)))) {
filename = (NSString
*)CFStringCreateWithFileSystemRepresentation(NULL, fileRep);
[filenames setObject:filename forKey:[self
sourceFileForFileName:filename isTeX:YES removeQuotes:NO]];
[filename release];
@@ -560,7 +560,7 @@
synctex_node_t node;
const char *file;
while (rv == NO && (node = synctex_next_result(scanner))) {
- if (file = synctex_scanner_get_name(scanner,
synctex_node_tag(node))) {
+ if ((file = synctex_scanner_get_name(scanner,
synctex_node_tag(node)))) {
*linePtr = MAX(synctex_node_line(node), 1) - 1;
*filePtr = [self sourceFileForFileSystemRepresentation:file
isTeX:YES];
rv = YES;
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKPDFView.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -710,7 +710,7 @@
NSData *tiffData = nil;
if ([self hideNotes] == NO && [activeAnnotation isSkimNote] &&
[activeAnnotation isMovable]) {
- if (noteData = [NSKeyedArchiver
archivedDataWithRootObject:[activeAnnotation SkimNoteProperties]])
+ if ((noteData = [NSKeyedArchiver
archivedDataWithRootObject:[activeAnnotation SkimNoteProperties]]))
[types addObject:SKSkimNotePboardType];
}
@@ -718,9 +718,9 @@
NSRect selRect = NSIntegralRect(selectionRect);
PDFPage *page = [self currentSelectionPage];
- if (pdfData = [page PDFDataForRect:selRect])
+ if ((pdfData = [page PDFDataForRect:selRect]))
[types addObject:NSPDFPboardType];
- if (tiffData = [page TIFFDataForRect:selRect])
+ if ((tiffData = [page TIFFDataForRect:selRect]))
[types addObject:NSTIFFPboardType];
/*
@@ -1660,15 +1660,15 @@
} else if ([type isEqualToString:SKNFreeTextString] || [type
isEqualToString:SKNCircleString] || [type isEqualToString:SKNSquareString] ||
[type isEqualToString:SKNLineString] || [type isEqualToString:SKNInkString]) {
NSDictionary *dict = [pboard
propertyListForType:SKLineStylePboardType];
NSNumber *number;
- if (number = [dict objectForKey:SKLineWellLineWidthKey])
+ if ((number = [dict objectForKey:SKLineWellLineWidthKey]))
[highlightAnnotation setLineWidth:[number doubleValue]];
[highlightAnnotation setDashPattern:[dict
objectForKey:SKLineWellDashPatternKey]];
- if (number = [dict objectForKey:SKLineWellStyleKey])
+ if ((number = [dict objectForKey:SKLineWellStyleKey]))
[highlightAnnotation setBorderStyle:[number integerValue]];
if ([type isEqualToString:SKNLineString]) {
- if (number = [dict
objectForKey:SKLineWellStartLineStyleKey])
+ if ((number = [dict
objectForKey:SKLineWellStartLineStyleKey]))
[(PDFAnnotationLine *)highlightAnnotation
setStartLineStyle:[number integerValue]];
- if (number = [dict objectForKey:SKLineWellEndLineStyleKey])
+ if ((number = [dict
objectForKey:SKLineWellEndLineStyleKey]))
[(PDFAnnotationLine *)highlightAnnotation
setEndLineStyle:[number integerValue]];
}
performedDrag = YES;
Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKSecondaryPDFView.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -179,7 +179,7 @@
while (count--)
[pagePopUpButton removeItemAtIndex:count];
- if (count = [labels count]) {
+ if ((count = [labels count])) {
for (i = 0; i < count; i++) {
label = [labels objectAtIndex:i];
width = NSWidth([label boundingRectWithSize:size options:0
attributes:attrs]);
Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKTransitionController.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -222,7 +222,7 @@
[window setIgnoresMouseEvents:YES];
[window setContentView:[[[SKTransitionView alloc] init] autorelease]];
- if (self = [self initWithWindow:window]) {
+ if ((self = [self initWithWindow:window])) {
view = aView; // don't retain as it may retain us
transitionStyle = SKNoTransition;
@@ -370,7 +370,7 @@
if (fromIndex != NSNotFound && toIndex != NSNotFound && idx <
[pageTransitions count]) {
NSDictionary *info = [pageTransitions objectAtIndex:idx];
id value;
- if (value = [info objectForKey:SKStyleNameKey])
+ if ((value = [info objectForKey:SKStyleNameKey]))
currentTransitionStyle = [[self class] styleForName:value];
if ((value = [info objectForKey:SKDurationKey]) && [value
respondsToSelector:@selector(doubleValue)])
currentDuration = [value doubleValue];
Modified: trunk/SKTransitionInfo.m
===================================================================
--- trunk/SKTransitionInfo.m 2011-04-05 11:07:07 UTC (rev 7200)
+++ trunk/SKTransitionInfo.m 2011-04-05 11:11:36 UTC (rev 7201)
@@ -80,11 +80,11 @@
- (void)setProperties:(NSDictionary *)dictionary {
id value;
- if (value = [dictionary objectForKey:SKStyleNameKey])
+ if ((value = [dictionary objectForKey:SKStyleNameKey]))
[self setTransitionStyle:[SKTransitionController styleForName:value]];
- if (value = [dictionary objectForKey:SKDurationKey])
+ if ((value = [dictionary objectForKey:SKDurationKey]))
[self setDuration:[value doubleValue]];
- if (value = [dictionary objectForKey:SKShouldRestrictKey])
+ if ((value = [dictionary objectForKey:SKShouldRestrictKey]))
[self setShouldRestrict:[value doubleValue]];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit