From 4ac335455500c4721b43b331aa1ada6a1e6981e4 Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Tue, 7 Aug 2012 20:50:45 +0000 Subject: [PATCH] * TextConverters/RTF/RTFProducer.m (-_addAttributesString:): Correctly handle NSUnderlineStyleNone. This fixes bug #37043. * Headers/AppKit/NSOpenGL.h, * Source/NSOpenGLContext.m: New 10.6 methods to get/set the * CGLContextObj. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35358 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Headers/AppKit/NSOpenGL.h | 10 ++++++++-- Source/NSOpenGLContext.m | 15 ++++++++++++--- TextConverters/RTF/RTFProducer.m | 8 +++++++- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c37c6d0df..1618e81d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-08-07 Fred Kiefer + + * TextConverters/RTF/RTFProducer.m (-_addAttributesString:): + Correctly handle NSUnderlineStyleNone. This fixes bug #37043. + * Headers/AppKit/NSOpenGL.h, + * Source/NSOpenGLContext.m: New 10.6 methods to get/set the CGLContextObj. + 2012-08-06 Riccardo Mottola * Source/GSServicesManager.m diff --git a/Headers/AppKit/NSOpenGL.h b/Headers/AppKit/NSOpenGL.h index 1e1b45925..d8bd37f8a 100644 --- a/Headers/AppKit/NSOpenGL.h +++ b/Headers/AppKit/NSOpenGL.h @@ -102,20 +102,27 @@ typedef enum { + (void)clearCurrentContext; + (NSOpenGLContext *)currentContext; +#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST) +- (void *)CGLContextObj; +#endif - (void)clearDrawable; - (void)copyAttributesFromContext:(NSOpenGLContext *)context withMask:(unsigned long)mask; +#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST) - (void)createTexture:(unsigned long)target fromView:(NSView*)view internalFormat:(unsigned long)format; - - (int)currentVirtualScreen; +#endif - (void)flushBuffer; - (void)getValues:(long *)vals forParameter:(NSOpenGLContextParameter)param; +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST) +- (id)initWithCGLContextObj:(void *)context; +#endif - (id)initWithFormat:(NSOpenGLPixelFormat *)format shareContext:(NSOpenGLContext *)share; @@ -140,7 +147,6 @@ typedef enum { - (NSView *)view; - @end diff --git a/Source/NSOpenGLContext.m b/Source/NSOpenGLContext.m index 729df3462..ea8b083df 100644 --- a/Source/NSOpenGLContext.m +++ b/Source/NSOpenGLContext.m @@ -69,6 +69,12 @@ return [[self _classContext] currentContext]; } +- (void *)CGLContextObj +{ + [self subclassResponsibility: _cmd]; + return NULL; +} + - (void)clearDrawable { [self subclassResponsibility: _cmd]; @@ -107,16 +113,19 @@ [self subclassResponsibility: _cmd]; } +- (id)initWithCGLContextObj:(void *)context +{ + [self subclassResponsibility: _cmd]; + return nil; +} - (id)initWithFormat:(NSOpenGLPixelFormat *)format shareContext:(NSOpenGLContext *)share { [self subclassResponsibility: _cmd]; - return 0; + return nil; } - - - (void)makeCurrentContext { [self subclassResponsibility: _cmd]; diff --git a/TextConverters/RTF/RTFProducer.m b/TextConverters/RTF/RTFProducer.m index 6c602111d..bcab76575 100644 --- a/TextConverters/RTF/RTFProducer.m +++ b/TextConverters/RTF/RTFProducer.m @@ -888,12 +888,18 @@ } else if ([attributeName isEqualToString: NSUnderlineStyleAttributeName]) { - NSInteger styleMask = [[attributesToAdd objectForKey: NSUnderlineStyleAttributeName] integerValue]; + NSInteger styleMask = [[attributesToAdd objectForKey: + NSUnderlineStyleAttributeName] integerValue]; if ((styleMask & NSUnderlineByWordMask) == NSUnderlineByWordMask) { [result appendString: @"\\ulw"]; } + + if (styleMask == NSUnderlineStyleNone) + { + [result appendString: @"\\ulnone"]; + } else if ((styleMask & NSUnderlineStyleDouble) == NSUnderlineStyleDouble) { [result appendString: @"\\uldb"];