mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-14 02:33:50 +00:00
fixed: missing global symbols
This commit is contained in:
1 parent
c58a5b520e
commit
10bb6723f3
2 files changed
+49
-1
No files matched your search
@@ -26,6 +26,12 @@
|
||||
|
||||
CPParagraphStyleAttributeName = @"CPParagraphStyleAttributeName";
|
||||
|
||||
// Define missing global tab stop type constants
|
||||
CPLeftTabStopType = 0;
|
||||
CPRightTabStopType = 1;
|
||||
CPCenterTabStopType = 2;
|
||||
CPDecimalTabStopType = 3;
|
||||
|
||||
// Standard Tab Interval (28pts is roughly 4 spaces in standard fonts)
|
||||
var kDefaultTabInterval = 28.0;
|
||||
|
||||
@@ -203,6 +209,48 @@ var _sharedDefaultParagraphStyle = nil;
|
||||
return [[CPMutableParagraphStyle alloc] initWithParagraphStyle:self];
|
||||
}
|
||||
|
||||
// MARK: - Coding Support
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
if (self = [super init])
|
||||
{
|
||||
_lineSpacing = [aCoder decodeFloatForKey:@"CPParagraphStyleLineSpacing"];
|
||||
_paragraphSpacing = [aCoder decodeFloatForKey:@"CPParagraphStyleParagraphSpacing"];
|
||||
_alignment = [aCoder decodeIntForKey:@"CPParagraphStyleAlignment"];
|
||||
_headIndent = [aCoder decodeFloatForKey:@"CPParagraphStyleHeadIndent"];
|
||||
_tailIndent = [aCoder decodeFloatForKey:@"CPParagraphStyleTailIndent"];
|
||||
_firstLineHeadIndent = [aCoder decodeFloatForKey:@"CPParagraphStyleFirstLineHeadIndent"];
|
||||
_minimumLineHeight = [aCoder decodeFloatForKey:@"CPParagraphStyleMinimumLineHeight"];
|
||||
_maximumLineHeight = [aCoder decodeFloatForKey:@"CPParagraphStyleMaximumLineHeight"];
|
||||
_lineBreakMode = [aCoder decodeIntForKey:@"CPParagraphStyleLineBreakMode"];
|
||||
_baseWritingDirection = [aCoder decodeIntForKey:@"CPParagraphStyleBaseWritingDirection"];
|
||||
_lineHeightMultiple = [aCoder decodeFloatForKey:@"CPParagraphStyleLineHeightMultiple"];
|
||||
_paragraphSpacingBefore = [aCoder decodeFloatForKey:@"CPParagraphStyleParagraphSpacingBefore"];
|
||||
_defaultTabInterval = [aCoder decodeFloatForKey:@"CPParagraphStyleDefaultTabInterval"];
|
||||
_tabStops = [aCoder decodeObjectForKey:@"CPParagraphStyleTabStops"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
[aCoder encodeFloat:_lineSpacing forKey:@"CPParagraphStyleLineSpacing"];
|
||||
[aCoder encodeFloat:_paragraphSpacing forKey:@"CPParagraphStyleParagraphSpacing"];
|
||||
[aCoder encodeInt:_alignment forKey:@"CPParagraphStyleAlignment"];
|
||||
[aCoder encodeFloat:_headIndent forKey:@"CPParagraphStyleHeadIndent"];
|
||||
[aCoder encodeFloat:_tailIndent forKey:@"CPParagraphStyleTailIndent"];
|
||||
[aCoder encodeFloat:_firstLineHeadIndent forKey:@"CPParagraphStyleFirstLineHeadIndent"];
|
||||
[aCoder encodeFloat:_minimumLineHeight forKey:@"CPParagraphStyleMinimumLineHeight"];
|
||||
[aCoder encodeFloat:_maximumLineHeight forKey:@"CPParagraphStyleMaximumLineHeight"];
|
||||
[aCoder encodeInt:_lineBreakMode forKey:@"CPParagraphStyleLineBreakMode"];
|
||||
[aCoder encodeInt:_baseWritingDirection forKey:@"CPParagraphStyleBaseWritingDirection"];
|
||||
[aCoder encodeFloat:_lineHeightMultiple forKey:@"CPParagraphStyleLineHeightMultiple"];
|
||||
[aCoder encodeFloat:_paragraphSpacingBefore forKey:@"CPParagraphStyleParagraphSpacingBefore"];
|
||||
[aCoder encodeFloat:_defaultTabInterval forKey:@"CPParagraphStyleDefaultTabInterval"];
|
||||
[aCoder encodeObject:_tabStops forKey:@"CPParagraphStyleTabStops"];
|
||||
}
|
||||
|
||||
// MARK: - Equality
|
||||
|
||||
- (BOOL)isEqual:(id)other
|
||||
|
||||
@@ -70,7 +70,7 @@ _MidRange = function(a1)
|
||||
|
||||
function _isWhitespaceCharacter(chr)
|
||||
{
|
||||
return (chr === '\n' || chr === '\r' || chr === ' ' || chr === '\t');
|
||||
return (chr === '\n' || chr === '\r' || chr === ' '); // || chr === '\t'
|
||||
}
|
||||
|
||||
_characterTripletFromStringAtIndex = function(string, index)
|
||||
|
||||
Reference in new issue
Block a user