List Format Problem In Copying From One Table To Another

General TRichView support forum. Please post your questions here
Post Reply
DickBryant
Posts: 148
Joined: Wed Dec 07, 2005 2:02 pm
Contact:

List Format Problem In Copying From One Table To Another

Post by DickBryant »

Hi Sergey,

As you know from previous questions from me, I do a lot of manipulations of the following type:

CellInTable1.SaveRVFToStream
IntermediateRVE.LoadRVFFromStream
IntermediateRVE.SaveRVFToStream
CellInTable2.AppendRVFFromStream

This is mostly working fine except I've just found that if the cell in Table1 contains a numbered list that starts from 1 and ends at 2, when it is loaded into Table2, it does not start at 1 but rather at n+1 where n is the last number of the list contained in an earlier cell in table2. It's as though the 'flag' that starts the new list over at 1 does not get passed in the above operation and ALL the lists in Table 2 are part of the same, single, large list.

How can I fix this issue?

Thanks for your help, as always
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If CellInTable1 and CellInTable2 are in the same editor, why do you use IntermeditateRVE?
DickBryant
Posts: 148
Joined: Wed Dec 07, 2005 2:02 pm
Contact:

Post by DickBryant »

They're not. They're located in different RVE's
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Lists styles have ListID property - a random number allowing to distinguish lists having the same properties.
When saving collections of list styles, this property is saved. When loading RVF, if list style have the same properties (including ListID) as the existing list style, the existing style is used.
One of possible solutions is modifying ListID for styles before saving to RVF (before CellInTable1.SaveRVFToStream). But you need to modify RVStyle.pas, because this property is read-only.
DickBryant
Posts: 148
Joined: Wed Dec 07, 2005 2:02 pm
Contact:

Post by DickBryant »

Thanks for the info, Sergey. Since this is NOT an often-used feature, it's probably not worth the trip to make that many code modifications.
Post Reply