Revision: 4092
http://skim-app.svn.sourceforge.net/skim-app/?rev=4092&view=rev
Author: hofman
Date: 2008-06-28 07:02:24 -0700 (Sat, 28 Jun 2008)
Log Message:
-----------
Use FourCharCode type. Remove commented out code.
Modified Paths:
--------------
trunk/PDFAnnotationLine_SKExtensions.h
trunk/PDFAnnotationLine_SKExtensions.m
trunk/PDFAnnotationText_SKExtensions.h
trunk/PDFAnnotationText_SKExtensions.m
trunk/PDFAnnotation_SKExtensions.h
trunk/PDFAnnotation_SKExtensions.m
trunk/SKApplicationController.h
trunk/SKApplicationController.m
trunk/SKNPDFAnnotationNote_SKExtensions.h
trunk/SKNPDFAnnotationNote_SKExtensions.m
trunk/SKPDFDocument.m
Modified: trunk/PDFAnnotationLine_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.h 2008-06-28 12:56:46 UTC (rev
4091)
+++ trunk/PDFAnnotationLine_SKExtensions.h 2008-06-28 14:02:24 UTC (rev
4092)
@@ -49,8 +49,8 @@
SKScriptingLineStyleClosedArrow = 'LSCA'
};
-extern unsigned long SKScriptingLineStyleFromLineStyle(int lineStyle);
-extern int SKLineStyleFromScriptingLineStyle(unsigned long lineStyle);
+extern FourCharCode SKScriptingLineStyleFromLineStyle(PDFLineStyle lineStyle);
+extern PDFLineStyle SKLineStyleFromScriptingLineStyle(FourCharCode lineStyle);
extern NSString *SKPDFAnnotationStartPointAsQDPointKey;
@@ -63,7 +63,7 @@
- (void)setStartPointAsQDPoint:(NSData *)inQDPointAsData;
- (void)setEndPointAsQDPoint:(NSData *)inQDPointAsData;
-- (void)setScriptingStartLineStyle:(unsigned long)style;
-- (void)setScriptingEndLineStyle:(unsigned long)style;
+- (void)setScriptingStartLineStyle:(FourCharCode)style;
+- (void)setScriptingEndLineStyle:(FourCharCode)style;
@end
Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m 2008-06-28 12:56:46 UTC (rev
4091)
+++ trunk/PDFAnnotationLine_SKExtensions.m 2008-06-28 14:02:24 UTC (rev
4092)
@@ -47,7 +47,7 @@
#import "NSGeometry_SKExtensions.h"
-unsigned long SKScriptingLineStyleFromLineStyle(int lineStyle) {
+FourCharCode SKScriptingLineStyleFromLineStyle(PDFLineStyle lineStyle) {
switch (lineStyle) {
case kPDFLineStyleNone: return SKScriptingLineStyleNone;
case kPDFLineStyleSquare: return SKScriptingLineStyleSquare;
@@ -59,7 +59,7 @@
}
}
-int SKLineStyleFromScriptingLineStyle(unsigned long lineStyle) {
+PDFLineStyle SKLineStyleFromScriptingLineStyle(FourCharCode lineStyle) {
switch (lineStyle) {
case kPDFLineStyleNone: return SKScriptingLineStyleNone;
case kPDFLineStyleSquare: return SKScriptingLineStyleSquare;
@@ -254,19 +254,19 @@
return [NSData dataWithBytes:&qdPoint length:sizeof(Point)];
}
-- (unsigned long)scriptingStartLineStyle {
+- (FourCharCode)scriptingStartLineStyle {
return SKScriptingLineStyleFromLineStyle([self startLineStyle]);
}
-- (unsigned long)scriptingEndLineStyle {
+- (FourCharCode)scriptingEndLineStyle {
return SKScriptingLineStyleFromLineStyle([self endLineStyle]);
}
-- (void)setScriptingStartLineStyle:(unsigned long)style {
+- (void)setScriptingStartLineStyle:(FourCharCode)style {
[self setStartLineStyle:SKLineStyleFromScriptingLineStyle(style)];
}
-- (void)setScriptingEndLineStyle:(unsigned long)style {
+- (void)setScriptingEndLineStyle:(FourCharCode)style {
[self setEndLineStyle:SKLineStyleFromScriptingLineStyle(style)];
}
Modified: trunk/PDFAnnotationText_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationText_SKExtensions.h 2008-06-28 12:56:46 UTC (rev
4091)
+++ trunk/PDFAnnotationText_SKExtensions.h 2008-06-28 14:02:24 UTC (rev
4092)
@@ -39,9 +39,24 @@
#import <Cocoa/Cocoa.h>
+enum {
+ SKScriptingTextAnnotationIconComment = 'ICmt',
+ SKScriptingTextAnnotationIconKey = 'IKey',
+ SKScriptingTextAnnotationIconNote = 'INot',
+ SKScriptingTextAnnotationIconHelp = 'IHlp',
+ SKScriptingTextAnnotationIconNewParagraph = 'INPa',
+ SKScriptingTextAnnotationIconParagraph = 'IPar',
+ SKScriptingTextAnnotationIconInsert = 'IIns'
+};
+
+
+extern FourCharCode SKScriptingIconTypeFromIconType(PDFTextAnnotationIconType
iconType);
+extern PDFTextAnnotationIconType SKIconTypeFromScriptingIconType(FourCharCode
iconType);
+
+
extern NSString *SKPDFAnnotationScriptingIconTypeKey;
@interface PDFAnnotationText (SKExtensions)
-- (void)setScriptingIconType:(unsigned long)type;
+- (void)setScriptingIconType:(FourCharCode)type;
@end
Modified: trunk/PDFAnnotationText_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationText_SKExtensions.m 2008-06-28 12:56:46 UTC (rev
4091)
+++ trunk/PDFAnnotationText_SKExtensions.m 2008-06-28 14:02:24 UTC (rev
4092)
@@ -44,7 +44,7 @@
#import "SKFDFParser.h"
-unsigned long SKScriptingIconTypeFromIconType(int iconType) {
+FourCharCode SKScriptingIconTypeFromIconType(PDFTextAnnotationIconType
iconType) {
switch (iconType) {
case kPDFTextAnnotationIconComment: return
SKScriptingTextAnnotationIconComment;
case kPDFTextAnnotationIconKey: return
SKScriptingTextAnnotationIconKey;
@@ -57,7 +57,7 @@
}
}
-int SKIconTypeFromScriptingIconType(unsigned long iconType) {
+PDFTextAnnotationIconType SKIconTypeFromScriptingIconType(FourCharCode
iconType) {
switch (iconType) {
case SKScriptingTextAnnotationIconComment: return
kPDFTextAnnotationIconComment;
case SKScriptingTextAnnotationIconKey: return
kPDFTextAnnotationIconKey;
@@ -126,11 +126,11 @@
return customTextScriptingKeys;
}
-- (unsigned long)scriptingIconType {
+- (FourCharCode)scriptingIconType {
return SKScriptingIconTypeFromIconType([self iconType]);
}
-- (void)setScriptingIconType:(unsigned long)type {
+- (void)setScriptingIconType:(FourCharCode)type {
[self setIconType:SKIconTypeFromScriptingIconType(type)];
}
Modified: trunk/PDFAnnotation_SKExtensions.h
===================================================================
--- trunk/PDFAnnotation_SKExtensions.h 2008-06-28 12:56:46 UTC (rev 4091)
+++ trunk/PDFAnnotation_SKExtensions.h 2008-06-28 14:02:24 UTC (rev 4092)
@@ -60,8 +60,8 @@
};
-extern unsigned long SKScriptingBorderStyleFromBorderStyle(int borderStyle);
-extern int SKBorderStyleFromScriptingBorderStyle(unsigned long borderStyle);
+extern FourCharCode SKScriptingBorderStyleFromBorderStyle(PDFBorderStyle
borderStyle);
+extern PDFBorderStyle SKBorderStyleFromScriptingBorderStyle(FourCharCode
borderStyle);
extern NSString *SKPDFAnnotationScriptingNoteTypeKey;
extern NSString *SKPDFAnnotationScriptingBorderStyleKey;
@@ -102,8 +102,8 @@
+ (NSSet *)customScriptingKeys;
- (NSScriptObjectSpecifier *)objectSpecifier;
-- (unsigned long)scriptingNoteType;
-- (unsigned long)scriptingIconType;
+- (FourCharCode)scriptingNoteType;
+- (FourCharCode)scriptingIconType;
- (id)textContents;
- (void)setTextContents:(id)text;
- (id)richText;
@@ -111,12 +111,12 @@
- (NSData *)boundsAsQDRect;
- (NSString *)fontName;
- (float)fontSize;
-- (unsigned long)scriptingBorderStyle;
+- (FourCharCode)scriptingBorderStyle;
- (void)setScriptingBorderStyle:(int)style;
- (NSData *)startPointAsQDPoint;
- (NSData *)endPointAsQDPoint;
-- (unsigned long)scriptingStartLineStyle;
-- (unsigned long)scriptingEndLineStyle;
+- (FourCharCode)scriptingStartLineStyle;
+- (FourCharCode)scriptingEndLineStyle;
- (id)selectionSpecifier;
- (NSArray *)accessibilityAttributeNames;
Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m 2008-06-28 12:56:46 UTC (rev 4091)
+++ trunk/PDFAnnotation_SKExtensions.m 2008-06-28 14:02:24 UTC (rev 4092)
@@ -42,6 +42,7 @@
#import "PDFAnnotationLine_SKExtensions.h"
#import "PDFAnnotationMarkup_SKExtensions.h"
#import "PDFAnnotationFreeText_SKExtensions.h"
+#import "PDFAnnotationText_SKExtensions.h"
#import <SkimNotes/PDFAnnotation_SKNExtensions.h>
#import <SkimNotes/PDFAnnotationFreeText_SKNExtensions.h>
#import <SkimNotes/SKNPDFAnnotationNote.h>
@@ -57,7 +58,7 @@
#import "SKUtilities.h"
-unsigned long SKScriptingBorderStyleFromBorderStyle(int borderStyle) {
+FourCharCode SKScriptingBorderStyleFromBorderStyle(PDFBorderStyle borderStyle)
{
switch (borderStyle) {
case kPDFBorderStyleSolid: return SKScriptingBorderStyleSolid;
case kPDFBorderStyleDashed: return SKScriptingBorderStyleDashed;
@@ -68,7 +69,7 @@
}
}
-int SKBorderStyleFromScriptingBorderStyle(unsigned long borderStyle) {
+PDFBorderStyle SKBorderStyleFromScriptingBorderStyle(FourCharCode borderStyle)
{
switch (borderStyle) {
case SKScriptingBorderStyleSolid: return kPDFBorderStyleSolid;
case SKScriptingBorderStyleDashed: return kPDFBorderStyleDashed;
@@ -238,7 +239,7 @@
self = nil;
NSScriptCommand *currentCommand = [NSScriptCommand currentCommand];
if ([currentCommand isKindOfClass:[NSCreateCommand class]]) {
- unsigned long classCode = [[(NSCreateCommand *)currentCommand
createClassDescription] appleEventCode];
+ FourCharCode classCode = [[(NSCreateCommand *)currentCommand
createClassDescription] appleEventCode];
NSRect bounds = NSMakeRect(100.0, 100.0, 0.0, 0.0);
bounds.size.width = [[NSUserDefaults standardUserDefaults]
floatForKey:SKDefaultNoteWidthKey];
bounds.size.height = [[NSUserDefaults standardUserDefaults]
floatForKey:SKDefaultNoteHeightKey];
@@ -246,7 +247,7 @@
if (classCode == SKPDFAnnotationScriptingNoteClassCode) {
NSDictionary *properties = [(NSCreateCommand *)currentCommand
resolvedKeyDictionary];
- unsigned long type = [[properties
objectForKey:SKPDFAnnotationScriptingNoteTypeKey] unsignedLongValue];
+ FourCharCode type = [[properties
objectForKey:SKPDFAnnotationScriptingNoteTypeKey] unsignedLongValue];
if (type == 0) {
[currentCommand
setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
@@ -331,7 +332,7 @@
return properties;
}
-- (unsigned long)scriptingNoteType {
+- (FourCharCode)scriptingNoteType {
if ([[self type] isEqualToString:SKNFreeTextString])
return SKScriptingTextNote;
else if ([[self type] isEqualToString:SKNNoteString])
@@ -351,13 +352,13 @@
return 0;
}
-- (void)setScriptingNoteType:(unsigned long)type {
+- (void)setScriptingNoteType:(FourCharCode)type {
NSScriptCommand *currentCommand = [NSScriptCommand currentCommand];
if ([currentCommand isKindOfClass:[NSCreateCommand class]] == NO)
[currentCommand
setScriptErrorNumber:NSReceiversCantHandleCommandScriptError];
}
-- (unsigned long)scriptingIconType {
+- (FourCharCode)scriptingIconType {
return SKScriptingTextAnnotationIconNote;
}
@@ -409,7 +410,7 @@
return 0;
}
-- (unsigned long)scriptingBorderStyle {
+- (FourCharCode)scriptingBorderStyle {
return SKScriptingBorderStyleFromBorderStyle([self borderStyle]);
}
@@ -425,11 +426,11 @@
return (id)[NSNull null];
}
-- (unsigned long)scriptingStartLineStyle {
+- (FourCharCode)scriptingStartLineStyle {
return SKScriptingLineStyleNone;
}
-- (unsigned long)scriptingEndLineStyle {
+- (FourCharCode)scriptingEndLineStyle {
return SKScriptingLineStyleNone;
}
Modified: trunk/SKApplicationController.h
===================================================================
--- trunk/SKApplicationController.h 2008-06-28 12:56:46 UTC (rev 4091)
+++ trunk/SKApplicationController.h 2008-06-28 14:02:24 UTC (rev 4092)
@@ -89,12 +89,12 @@
- (void)setDefaultLineStyles:(NSDictionary *)dict;
- (NSDictionary *)defaultDashPatterns;
- (void)setDefaultDashPattern:(NSDictionary *)dict;
-- (unsigned long)defaultStartLineStyle;
-- (void)setDefaultStartLineStyle:(unsigned long)style;
-- (unsigned long)defaultEndLineStyle;
-- (void)setDefaultEndLineStyle:(unsigned long)style;
-- (unsigned long)defaultIconType;
-- (void)setDefaultIconType:(unsigned long)type;
+- (FourCharCode)defaultStartLineStyle;
+- (void)setDefaultStartLineStyle:(FourCharCode)style;
+- (FourCharCode)defaultEndLineStyle;
+- (void)setDefaultEndLineStyle:(FourCharCode)style;
+- (FourCharCode)defaultIconType;
+- (void)setDefaultIconType:(FourCharCode)type;
- (unsigned int)countOfLines;
- (SKLine *)objectInLinesAtIndex:(unsigned int)index;
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2008-06-28 12:56:46 UTC (rev 4091)
+++ trunk/SKApplicationController.m 2008-06-28 14:02:24 UTC (rev 4092)
@@ -647,27 +647,27 @@
[sud setObject:array forKey:SKLineNoteDashPatternKey];
}
-- (unsigned long)defaultStartLineStyle {
+- (FourCharCode)defaultStartLineStyle {
return SKScriptingLineStyleFromLineStyle([[NSUserDefaults
standardUserDefaults] integerForKey:SKLineNoteStartLineStyleKey]);
}
-- (void)setDefaultStartLineStyle:(unsigned long)style {
+- (void)setDefaultStartLineStyle:(FourCharCode)style {
return [[NSUserDefaults standardUserDefaults]
setInteger:SKLineStyleFromScriptingLineStyle(style)
forKey:SKLineNoteStartLineStyleKey];
}
-- (unsigned long)defaultEndLineStyle {
+- (FourCharCode)defaultEndLineStyle {
return SKScriptingLineStyleFromLineStyle([[NSUserDefaults
standardUserDefaults] integerForKey:SKLineNoteEndLineStyleKey]);
}
-- (void)setDefaultEndLineStyle:(unsigned long)style {
+- (void)setDefaultEndLineStyle:(FourCharCode)style {
return [[NSUserDefaults standardUserDefaults]
setInteger:SKLineStyleFromScriptingLineStyle(style)
forKey:SKLineNoteEndLineStyleKey];
}
-- (unsigned long)defaultIconType {
+- (FourCharCode)defaultIconType {
return SKScriptingIconTypeFromIconType([[NSUserDefaults
standardUserDefaults] integerForKey:SKAnchoredNoteIconTypeKey]);
}
-- (void)setDefaultIconType:(unsigned long)type {
+- (void)setDefaultIconType:(FourCharCode)type {
return [[NSUserDefaults standardUserDefaults]
setInteger:SKIconTypeFromScriptingIconType(type)
forKey:SKAnchoredNoteIconTypeKey];
}
Modified: trunk/SKNPDFAnnotationNote_SKExtensions.h
===================================================================
--- trunk/SKNPDFAnnotationNote_SKExtensions.h 2008-06-28 12:56:46 UTC (rev
4091)
+++ trunk/SKNPDFAnnotationNote_SKExtensions.h 2008-06-28 14:02:24 UTC (rev
4092)
@@ -41,29 +41,9 @@
#import <SkimNotes/SKNPDFAnnotationNote.h>
-enum {
- SKScriptingTextAnnotationIconComment = 'ICmt',
- SKScriptingTextAnnotationIconKey = 'IKey',
- SKScriptingTextAnnotationIconNote = 'INot',
- SKScriptingTextAnnotationIconHelp = 'IHlp',
- SKScriptingTextAnnotationIconNewParagraph = 'INPa',
- SKScriptingTextAnnotationIconParagraph = 'IPar',
- SKScriptingTextAnnotationIconInsert = 'IIns'
-};
-
-
-extern unsigned long SKScriptingIconTypeFromIconType(int iconType);
-extern int SKIconTypeFromScriptingIconType(unsigned long iconType);
-
-/*
-extern NSString *SKPDFAnnotationTextKey;
-extern NSString *SKPDFAnnotationImageKey;
-*/
extern NSString *SKPDFAnnotationRichTextKey;
-//extern NSSize SKNPDFAnnotationNote_SKExtensionsSize;
-
@interface PDFAnnotationText (SKLeopardDeprecated)
// these are deprecated on 10.5, but we don't want to use the popup for 10.4
compatibility; we check for existence before using this anyway
- (BOOL)windowIsOpen;
@@ -72,19 +52,8 @@
#pragma mark -
[EMAIL PROTECTED] SKNPDFAnnotationNote (SKExtensions) /* : PDFAnnotationText {
- NSString *string;
- NSImage *image;
- NSTextStorage *textStorage;
- NSAttributedString *text;
- NSArray *texts;
-}
-
-- (void)setImage:(NSImage *)newImage;
-- (void)setText:(NSAttributedString *)newText;
-*/
[EMAIL PROTECTED] SKNPDFAnnotationNote (SKExtensions)
- (void)setRichText:(id)newText;
-
@end
#pragma mark -
Modified: trunk/SKNPDFAnnotationNote_SKExtensions.m
===================================================================
--- trunk/SKNPDFAnnotationNote_SKExtensions.m 2008-06-28 12:56:46 UTC (rev
4091)
+++ trunk/SKNPDFAnnotationNote_SKExtensions.m 2008-06-28 14:02:24 UTC (rev
4092)
@@ -47,13 +47,9 @@
#import "NSGeometry_SKExtensions.h"
#import "NSString_SKExtensions.h"
-/*
-NSString *SKPDFAnnotationTextKey = @"text";
-NSString *SKPDFAnnotationImageKey = @"image";
-*/
+
NSString *SKPDFAnnotationRichTextKey = @"richText";
-//NSSize SKNPDFAnnotationNote_SKExtensionsSize = {16.0, 16.0};
@implementation SKNPDFAnnotationNote (SKExtensions)
@@ -68,126 +64,11 @@
}
return self;
}
-/*
-- (void)updateContents {
- NSMutableString *contents = [NSMutableString string];
- if ([string length])
- [contents appendString:string];
- if ([text length]) {
- [contents appendString:@" "];
- [contents appendString:[text string]];
- }
- [self setContents:contents];
-}
-- (id)initNoteWithProperties:(NSDictionary *)dict{
- if (self = [super initNoteWithProperties:dict]) {
- Class attrStringClass = [NSAttributedString class];
- Class stringClass = [NSString class];
- Class imageClass = [NSImage class];
- NSAttributedString *aText = [dict objectForKey:SKPDFAnnotationTextKey];
- NSImage *anImage = [dict objectForKey:SKPDFAnnotationImageKey];
- if ([anImage isKindOfClass:imageClass])
- image = [anImage retain];
- if ([aText isKindOfClass:attrStringClass])
- [textStorage replaceCharactersInRange:NSMakeRange(0, [textStorage
length]) withAttributedString:aText];
- else if ([aText isKindOfClass:stringClass])
- [textStorage replaceCharactersInRange:NSMakeRange(0, [textStorage
length]) withString:(NSString *)aText];
- [self updateContents];
- }
- return self;
-}
-
-- (void)dealloc {
- [textStorage release];
- [text release];
- [image release];
- [texts release];
- [super dealloc];
-}
-
-- (NSDictionary *)properties{
- NSMutableDictionary *dict = [[[super properties] mutableCopy] autorelease];
- [dict setValue:[self text] forKey:SKPDFAnnotationTextKey];
- [dict setValue:[self image] forKey:SKPDFAnnotationImageKey];
- return dict;
-}
-*/
- (BOOL)isMovable { return [self isSkimNote]; }
- (BOOL)isEditable { return [self isSkimNote]; }
-/*
-- (NSString *)type {
- return SKNoteString;
-}
-- (NSString *)string {
- return string;
-}
-
-- (void)setString:(NSString *)newString {
- if (string != newString) {
- [string release];
- string = [newString retain];
- [self updateContents];
- }
-}
-
-- (NSImage *)image;
-{
- return image;
-}
-
-- (void)setImage:(NSImage *)newImage;
-{
- if (image != newImage) {
- [image release];
- image = [newImage retain];
- }
-}
-
-+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key
-{
- if ([key isEqualToString:SKPDFAnnotationTextKey])
- return NO;
- else
- return [super automaticallyNotifiesObserversForKey:key];
-}
-
-- (NSAttributedString *)text;
-{
- return text;
-}
-
-- (void)setText:(NSAttributedString *)newText;
-{
- if (textStorage != newText) {
- if (newText)
- [textStorage replaceCharactersInRange:NSMakeRange(0, [textStorage
length]) withAttributedString:newText];
- else
- [textStorage deleteCharactersInRange:NSMakeRange(0, [textStorage
length])];
- }
-}
-
-- (NSArray *)texts {
- return texts;
-}
-
-- (void)textStorageWillProcessEditing:(NSNotification *)notification;
-{
-}
-
-- (void)textStorageDidProcessEditing:(NSNotification *)notification;
-{
- [texts makeObjectsPerformSelector:@selector(willChangeValueForKey:)
withObject:SKPDFAnnotationTextKey];
- [self willChangeValueForKey:SKPDFAnnotationTextKey];
- [text release];
- text = [[NSAttributedString allocWithZone:[self zone]]
initWithAttributedString:textStorage];
- [self didChangeValueForKey:SKPDFAnnotationTextKey];
- [texts makeObjectsPerformSelector:@selector(didChangeValueForKey:)
withObject:SKPDFAnnotationTextKey];
- [self updateContents];
-}
-*/
// override these Leopard methods to avoid showing the standard tool tips over
our own
- (NSString *)toolTip { return nil; }
- (NSString *)toolTipNoLabel { return nil; }
@@ -219,13 +100,11 @@
return customNoteScriptingKeys;
}
-- (id)richText;
-{
+- (id)richText {
return textStorage;
}
-- (void)setRichText:(id)newText;
-{
+- (void)setRichText:(id)newText {
if (newText != textStorage) {
// We are willing to accept either a string or an attributed string.
if ([newText isKindOfClass:[NSAttributedString class]])
@@ -235,8 +114,7 @@
}
}
-- (id)coerceValueForRichText:(id)value;
-{
+- (id)coerceValueForRichText:(id)value {
// We want to just get Strings unchanged. We will detect this and do the
right thing in setRichText. We do this because, this way, we will do more
reasonable things about attributes when we are receiving plain text.
if ([value isKindOfClass:[NSString class]])
return value;
Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m 2008-06-28 12:56:46 UTC (rev 4091)
+++ trunk/SKPDFDocument.m 2008-06-28 14:02:24 UTC (rev 4092)
@@ -2034,21 +2034,21 @@
- (NSDictionary *)AppleScriptPDFViewSettingsFromPDFViewSettings {
NSMutableDictionary *setup = [[self mutableCopy] autorelease];
- unsigned long displayMode = 0;
+ FourCharCode displayMode = 0;
switch ([[setup objectForKey:@"displayMode"] intValue]) {
case kPDFDisplaySinglePage: displayMode =
SKScriptingDisplaySinglePage; break;
case kPDFDisplaySinglePageContinuous: displayMode =
SKScriptingDisplaySinglePageContinuous; break;
case kPDFDisplayTwoUp: displayMode = SKScriptingDisplayTwoUp; break;
case kPDFDisplayTwoUpContinuous: displayMode =
SKScriptingDisplayTwoUpContinuous; break;
}
- [setup setObject:[NSNumber numberWithInt:displayMode]
forKey:@"displayMode"];
+ [setup setObject:[NSNumber numberWithUnsignedLong:displayMode]
forKey:@"displayMode"];
- unsigned long displayBox = 0;
+ FourCharCode displayBox = 0;
switch ([[setup objectForKey:@"displayBox"] intValue]) {
case kPDFDisplayBoxMediaBox: displayBox = SKScriptingMediaBox; break;
case kPDFDisplayBoxCropBox: displayBox = SKScriptingCropBox; break;
}
- [setup setObject:[NSNumber numberWithInt:displayBox] forKey:@"displayBox"];
+ [setup setObject:[NSNumber numberWithUnsignedLong:displayBox]
forKey:@"displayBox"];
return setup;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit