Prevent numbered list changes in pasted rich text

General TRichView support forum. Please post your questions here
Post Reply
msimmons15
Posts: 29
Joined: Mon Oct 25, 2010 3:59 pm

Prevent numbered list changes in pasted rich text

Post by msimmons15 »

Hi Sergey,

I am breaking up a large MS Word document and placing the content into a blob field using TDBRichViewEdit. The way that the document is being broken up results in portions of numbered lists being separated into different table records.

When I paste the richtext in, the numbering is reset, causing a lot of manual effort to reformat.

For example, pasting in 1.3.1 results in it being reset to 1.1.1.

I realize I can paste as text, but this gets into a lot of rework also.

I tried the RTFReadproperties.IgnoreSequences but that didn't operate with pasted text.

Is there a way to have pasted numbered lists be "left alone" when pasted?

Thanks,
Mike
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If I understand the problem correctly, it cannot be solved when inserting, because the inserted document portion does not contain information allowing to restore the original list numbering.

It can be partially solved when saving document portions - before saving, you can enumerate all list numbers and assign StartFrom=list counter, Reset=True.

However, it does not solve the problem completely for multilevel lists.
For example, in the list marker "2.3.4", only "4" is taken from this marker, other numbers are taken from previous markers of higher levels. If these previous markers are not in this document portion, the component does not know their counter values.

PS: TRVPrint and TRVReportHelper can save a page as RVF (it is used in the ReportBuilder wrapper). In this case, a special information is stored in RVF allowing to restore counters of lists on previous pages. But for normal RVF saving, it is not implemented.
Post Reply