View Issue Details

IDProjectCategoryView StatusLast Update
0004832JEDI VCL00 JVCL Componentspublic2010-05-16 15:14
ReporterjimvernAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.36 
Target VersionFixed in Version 
Summary0004832: JvRichEdit.Lines.LoadFromStream Does Not Set StreamFormat
DescriptionIn previous versions of JVCL (installed with Delphi 2007), loading an RTF file onto a memory stream and then calling JvRichEdit.Lines.LoadFromStream(ms) would result in the RTF file being displayed properly in the component. The JVCL in Delphi 2009 does not behave the same. Instead of displaying the RTF file properly, it shows the raw RTF codes, like when you open the .RTF file in notepad.

The routine that loads the memory stream into the JvRichEdit no longer detects whether the data is RTF or PlainText.
Additional InformationWhen I upgraded to Delphi 2009, it appeared that all my applications were broken. I assumed it was because Delphi 2009 now supports Unicode. However, I found that the JvRichEdit issue is unrelated.

I have created a simple project to demonstrate what I mean. In my applications, I stream the RTF data from a database, so reading in a file is equivelent to demonstrate the issue.

I found that inserting a single line of code prior to loading the memory stream into the JvRichEdit control fixes the issue (JvRichEdit.StreamFormat := sfRichText;). It took quite a while to find the issue, especially since the normal TRichEdit controls behave the same in Delphi 2007 and Delphi 2009(LoadFromStream() detects whether it is RTF or PlainText).

Would you consider this a bug, or should developers be instructed to set the StreamFormat before loading from a memory stream?
TagsNo tags attached.

Activities

2009-06-22 22:26

 

JEDI RichEdit Issue.zip (7,967 bytes)

obones

2009-06-30 09:05

administrator   ~0015735

Well, the problem is that the streams might not always be RTF, and the users might not always want to show it formatted.
Apparently, there is a way to detect this as TRichEdit does it. The best way would be to find out what's wrong with our implementation that prevents this detection.

obones

2009-08-04 09:37

administrator   ~0015906

Hello, any news?

jimvern

2009-08-05 19:20

reporter   ~0015941

Sorry. I haven't used these types of forums before. I thought your first note meant that the original author was going to troubleshoot the bug. I'd be happy to sleuth through the code and offer a suggested fix. Is that what you want?

obones

2009-08-06 10:37

administrator   ~0015946

Yes, that would be great. My remarks were not directly targeted at you, but if you can provide a fix, it's even better

obones

2009-12-04 15:31

administrator   ~0016952

Any progress ?

AHUser

2010-05-16 15:14

developer   ~0017394

I cannot reproduce this with the current SVN head. Maybe this bug was already fixed by fixing some of the unicode-conversion bugs.

Issue History

Date Modified Username Field Change
2009-06-22 22:26 jimvern New Issue
2009-06-22 22:26 jimvern File Added: JEDI RichEdit Issue.zip
2009-06-30 09:05 obones Note Added: 0015735
2009-06-30 09:05 obones Status new => feedback
2009-08-04 09:37 obones Note Added: 0015906
2009-08-05 19:20 jimvern Note Added: 0015941
2009-08-06 10:37 obones Note Added: 0015946
2009-12-04 15:31 obones Note Added: 0016952
2010-05-16 15:14 AHUser Note Added: 0017394
2010-05-16 15:14 AHUser Status feedback => resolved
2010-05-16 15:14 AHUser Resolution open => fixed
2010-05-16 15:14 AHUser Assigned To => AHUser