[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix, attributedStringConsumer
From: |
Nicola Pero |
Subject: |
Re: Fix, attributedStringConsumer |
Date: |
Mon, 30 Jul 2001 14:33:23 +0100 (BST) |
Hi georg,
sorry to be late in answering - can you send us a little RTF showing your
problem ? thanks.
> here is a patch for GSRTFcolorfg() to allow parsing of RTF streams created on
>
> OpenStep.
> OpenStep doesn't add a color list to rtf streams, if the color is just black.
>
> The attached patch simply sets the color to black, if the color index is out
> of
> bounds.
>
> Georg
>
>
> 2001-07-24 Georg Fleischmann
>
> * gui/Source/Parsers/attributedStringConsumer.m
> attributedStringConsumer.m, GSRTFcolorfg():
> set color to black if index is out of bounds
>
>
> diff -u gui/Source/Parsers/attributedStringConsumer.m.old
> gui/Source/Parsers/attributedStringConsumer.m
>
>
> --- gui/Source/Parsers/attributedStringConsumer.m.old Tue Oct 24 01:23:34
> 2000
> +++ gui/Source/Parsers/attributedStringConsumer.m Tue Jul 24 23:09:44
> 2001
> @@ -764,7 +764,10 @@
>
> void GSRTFcolorfg(void *ctxt, int color)
> {
> - ASSIGN(FGCOLOUR, [COLOURS objectAtIndex: color]);
> + if ([COLOURS count] <= color)
> + ASSIGN(FGCOLOUR, [NSColor blackColor]);
> + else
> + ASSIGN(FGCOLOUR, [COLOURS objectAtIndex: color]);
> }
>
> void GSRTFsubscript(void *ctxt, int script)
>
> _______________________________________________
> Bug-gnustep mailing list
> Bug-gnustep@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-gnustep
>