* 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:
Fred Kiefer 2011-06-06 11:33:40 +00:00
parent 029df7575f
commit ddcbd5cada
4 changed files with 63 additions and 7 deletions

View file

@ -1,3 +1,11 @@
2011-06-06 Fred Kiefer <FredKiefer@gmx.de>
* 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.
2011-06-05 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSPrintPanel.h,

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

View file

@ -565,6 +565,17 @@ static NSNumber *float_plus_one(NSNumber *cur)
[self insertText: @"\t"];
}
- (void) insertContainerBreak: (id)sender
{
unichar ch = NSFormFeedCharacter;
[self insertText: [NSString stringWithCharacters: &ch length: 1]];
}
- (void) insertLineBreak: (id)sender
{
unichar ch = NSLineSeparatorCharacter;
[self insertText: [NSString stringWithCharacters: &ch length: 1]];
}
- (void) deleteForward: (id)sender
{

View file

@ -354,9 +354,9 @@ NSString *NSPrintSaveJob = @"PrintSaveJob";
NSString *NSPrintSpoolJob = @"PrintSpoolJob";
// Print Panel
NSString *NSPrintPanelAccessorySummaryItemNameKey = @"AccessorySummaryItemName";
NSString *NSPrintPanelAccessorySummaryItemDescriptionKey = @"AccessorySummaryItemDescription";
NSString *NSPrintPhotoJobStyleHint = @"PhotoJobStyle";
NSString *NSPrintPanelAccessorySummaryItemNameKey = @"name";
NSString *NSPrintPanelAccessorySummaryItemDescriptionKey = @"description";
NSString *NSPrintPhotoJobStyleHint = @"Photo";
// NSSplitView notifications
NSString *NSSplitViewDidResizeSubviewsNotification =