Unplanned
Last Updated: 19 May 2020 12:55 by ADMIN
Yiannis
Created on: 15 May 2020 16:13
Category: WordsProcessing
Type: Bug Report
0
Bad "{\listtext }" contents from RtfFormatProvider

Dear all,

 

It seems that the RtfFormatProvider generates invalid alternative text in the "{\listtext }" RTF group when saving a RadFlowDocument that contains numbered paragraphs.

The text seems to always be "{N}" when level N of the list is used.

While this is no problem for readers that adhere to the latest RTF standard, RichEdit-based controls and WordPad in Windows 8-10 have issues with it and do not load the list. These versions of RichEdit are otherwise capable of reading list tables.

Please note that I am not talking about loading the document to Windows 7 RichEdit, since that does not support list tables at all (it is stuck to the Word '95 "{\*\pn ...}" format).

I submit a simple list example that can be read by WordPad in Windows 10 and the outcome after loading and saving it back with RtfFormatProvider.

The outcome loads correctly in Word and RadRichtextBox, but not in WordPad. Removing or correcting the "{\listtext ...}" for each paragraph manually makes the list load properly in WordPad.

 

BTW, I strongly disagree with the nonexistent support for the Word '95 RTF numbering format, since it either forces us to use some other product or create our own code to parse and massage the RTF prior to loading into your products.

The problem is great, as many controls/products are still based on the RichEdit control (including some versions of our products).

It is not only old RTF data that needs migration, but pasted content from WordPad or other applications as well, since otherwise numbering is killed, without even displaying any text present in "{\pntext ... }" groups, intended for readers that do not understand "{\*\pn ...}".

Finally, to make things worse, even in Windows 10, RichEdit uses Word '95 format for saving single-level lists (resulting in content with mixed list formats).

 

Anyway, thank you for your time.

3 comments
ADMIN
Dimitar
Posted on: 19 May 2020 12:55

Hello Yiannis,

Thank you for the additional info. I will notify the development team. 

Do not hesitate to contact us if you have other questions.

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Yiannis
Posted on: 18 May 2020 15:24

Thank you.

Please note that in addition to "{\listtext ...}", the numbers used with the "\ls" control word also need fixing. The RTF standard specifies that valid values for "\ls" are 1 to 2000 (needless limitation nowadays IMHO), but the RTF format provider starts with "\ls0" when exporting.

Changing that is also required to load lists properly in WordPad (Windows 8-10).

 

Finally, when importing, the RTF provider does not initialize Paragraph.ListLevel to 0 for paragraphs that are part of a list but have no "\ilvl0" control word in their RTF. This makes ListLevel return "-1" for these paragraphs.

ADMIN
Dimitar
Posted on: 18 May 2020 10:54

Hello Yiannis,

Thanks for the detailed description. I was able to reproduce the observed issue. I have approved the item and updated your Telerik points.

Unfortunately, I cannot suggest a temporary workaround.

Thank you for your understanding.

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.