* Source/externs.m: Correct the strings for NSPrintPanel.

* Source/NSAttributedString.m (-setBaseWritingDirection:range:):
Add proper implementation for this method.
* Source/NSTextView_actions.m (-insertContainerBreak:,
-insertLineBreak): Add this methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33254 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-06-06 11:33:40 +00:00
parent 3bfbeeee07
commit 7fec0a25f1
4 changed files with 63 additions and 7 deletions

View file

@ -1843,10 +1843,47 @@ static NSMutableDictionary *cachedCSets = nil;
- (void) setBaseWritingDirection: (NSWritingDirection)writingDirection
range: (NSRange)range
{
[self setAttributes: [NSDictionary dictionaryWithObject:
[NSNumber numberWithInt: writingDirection]
forKey: @"WritingDirection"]
range: range];
id value;
unsigned loc = range.location;
if (NSMaxRange(range) > [self length])
{
[NSException raise: NSRangeException
format: @"RangeError in method -setBaseWritingDirection: range: "];
}
while (loc < NSMaxRange(range))
{
BOOL copiedStyle = NO;
NSRange effRange;
NSRange newRange;
value = [self attribute: NSParagraphStyleAttributeName
atIndex: loc
effectiveRange: &effRange];
newRange = NSIntersectionRange(effRange, range);
if (value == nil)
{
value = [NSMutableParagraphStyle defaultParagraphStyle];
}
else
{
value = [value mutableCopy];
copiedStyle = YES;
}
[value setBaseWritingDirection: writingDirection];
[self addAttribute: NSParagraphStyleAttributeName
value: value
range: newRange];
if (copiedStyle == YES)
{
RELEASE(value);
}
loc = NSMaxRange(effRange);
}
}
@end