Compare if two TRichViews have identical content

General TRichView support forum. Please post your questions here
Post Reply
PioPio
Posts: 41
Joined: Mon Feb 18, 2013 4:21 pm

Compare if two TRichViews have identical content

Post by PioPio »

As per the subject: how can I check if two TRichview have identical content ?
I am not referring to the text only but all the information (font sizes and attributes, paragraphs, alignments and so on)

Many thanks
Pio Pio
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can save the both documents to TMemoryStream and then compare Stream.Memory (check Stream.Size-s, if equal, use CompareMem).
But this check returns True when all documents are absolutely identical.
It returns False if attributes of text or paragraphs are the same, but indexes in collections of TextStyles or ListStyles are different.
Post Reply