TRichViewEdit - RTF - Read file
Posted: Wed Feb 27, 2013 4:47 pm
I create 3 new text and 3 new paragraph styles in my TRVStyle component.
Create some text using these styles and save the file as RTF.
When I load the file back I get, what appears to be a conflicting set of requirements.
If I have the TextStyleMode and ParaStyleMode set to rvrsAddIfNeeded it seems to always add the styles to my list. It doesn't use the existing styles. So the colours of the text are correct but the style numbers are different.
If I set the StyleModes to rvrsClosest, it is now correct and is using the preset styles I have created.
But the problem now is that if I have some "Hidden" text or just some randomly coloured text (not one of my 3 predefined styles), I cannot load this back.
So I am forced to use rvrsAddIfNeeded. So what do I have to do to make this work and not behave as if it is rvrsAddAlways.
Create some text using these styles and save the file as RTF.
When I load the file back I get, what appears to be a conflicting set of requirements.
If I have the TextStyleMode and ParaStyleMode set to rvrsAddIfNeeded it seems to always add the styles to my list. It doesn't use the existing styles. So the colours of the text are correct but the style numbers are different.
If I set the StyleModes to rvrsClosest, it is now correct and is using the preset styles I have created.
But the problem now is that if I have some "Hidden" text or just some randomly coloured text (not one of my 3 predefined styles), I cannot load this back.
So I am forced to use rvrsAddIfNeeded. So what do I have to do to make this work and not behave as if it is rvrsAddAlways.