bugGNUstep - Bugs: bug #29633, Problem with images on RTFD files

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29633: Problem with images on RTFD files

Submitted by:  Germán Arias <espectador>
Submitted on:  Wed 21 Apr 2010 06:30:57 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Sun 02 May 2010 09:49:58 AM UTC, comment #9:

Thank you for spotting this problem. With the last change I tried to remove some of these extra spaces, but accidentally added another one without noticing. This should be fixed now.

Fred Kiefer <FredKiefer>
Project Member
Sun 02 May 2010 02:17:52 AM UTC, comment #8:

I regret to say that your RTFProducer changes have introduced a new bug. RTFProducer now writes out a space character after every \'xx escape sequence. I have attached a test case. Open the file with Ink, then save it with the Save To... command and open the new file again. Notice that now there is a space after every umlaut character.

(file #20385)

Wolfgang Lux <wlux>
Sat 01 May 2010 11:08:32 PM UTC, comment #7:

To me now work fine.

Germán Arias <espectador>
Sat 01 May 2010 04:32:32 PM UTC, comment #6:

Committed my RTFProducer changes to resolve this last remaining issue. Could everybody please check that the generated RTF is at least as usable as before?

Fred Kiefer <FredKiefer>
Project Member
Sat 01 May 2010 12:40:09 PM UTC, comment #5:

> GNUstep currently outputs the NSAttachmentCharacter directly
> as the string for the attachment (\u-4).


Well that is not the whole story. RTFProducer's _runStringForString:attributes: also inserts a space character immediately after the inner {\NeXTGraphic ...} group. It is this space character that would appear before the image.

Wolfgang Lux <wlux>
Sat 01 May 2010 12:12:25 PM UTC, comment #4:

Thank you Wolfgang, your fix resolved the problem for me.

GNUstep currently outputs the NSAttachmentCharacter directly as the string for the attachment (\u-4). Maybe we also should use 0xAC instead. I will go ahead with some tests on the Mac.

Fred Kiefer <FredKiefer>
Project Member
Sat 01 May 2010 08:31:37 AM UTC, comment #3:

Fred, you were not completely wrong :-)

According to Apple's documentation the string argument of the \NeXTGraphic is always the single character 0xAC. However, a few experiments on OS X show that the Apple's RTF reader apparently seems to ignore the string. Therefore I have just committed a fix that changes GNUstep's RTF parser to do the same.

Wolfgang Lux <wlux>
Fri 30 Apr 2010 06:45:01 AM UTC, comment #2:

I investigated further and it turns out that I was completely wrong with my last post. The extra space character is introduced by the writer not the reader. What the reader does is put this space in front of the image, it got inserted by the writer after the image. What we have here are multiple issues and I have a partial fix for the writing problem. What I need to do with that is check that I did not break RTF creation for all other cases.
Next I have to find out if that reversion issues in the loader could affect other cases as well. If so, we need to fix that as well.

Fred Kiefer <FredKiefer>
Project Member
Fri 23 Apr 2010 08:15:18 AM UTC, comment #1:

I tried this myself and yes, there is an extra space added each time you load the saved file. When I save the file the first time there isn't a space in the generated RTF document, but after loading the file the space is there.
From this I expect the problem to be in the RTF loading code. (Or somewhere in our layout code, but this isn't that realistic. Also I prefer not to look there :-)

At first glance I could not find anything that looks like a string with a space being added in that code. This problem may have to wait till after the release.

Fred Kiefer <FredKiefer>
Project Member
Wed 21 Apr 2010 06:30:57 PM UTC, original submission:

You can try this on Ink. Make a new document and add an image and some text. Save the document, and open this. You can see an space before the image. Now add more text in the document and save it. Close the document, and open this again. Now you can see two spaces before the image. Each time you modify the document and save this. When you open this again there is a new space added before the image.

Germán Arias <espectador>

 

Attached Files
file #20385:  umlaut-test.rtf added by wlux (318B - text/rtf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wlux (Posted a comment)
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by espectador (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 02 May 2010 09:49:58 AM UTCFredKieferStatusReady For Test=>Fixed
      Open/ClosedIn Test=>Closed
    Sun 02 May 2010 02:17:52 AM UTCwluxAttached File-=>Added umlaut-test.rtf, #20385
    Sat 01 May 2010 12:12:25 PM UTCFredKieferStatusConfirmed=>Ready For Test
      Assigned toFredKiefer=>None
      Open/ClosedOpen=>In Test
    Fri 23 Apr 2010 08:15:18 AM UTCFredKieferStatusNone=>Confirmed
      Assigned toNone=>FredKiefer

    Back to the top


    Powered by Savane 3.1-cleanup1