Copy/Paste between two RichViewEdit and double list styles
Posted: Thu Jun 16, 2011 10:51 am
Hello!
I am using TRichView TRichView: 12.6.1 in Delphi 2010
I encountered strange problem with copy/paste between two TRichViewEdit components.
Both RVedits have their own RVStyle components attached. Initially contents of RVEdits and RVStyles are identical (some text and numbered list). Now let's copy a portion of text (not even portion of list) from RVEdit1 into RVEdit2 (I use Ctrl+Ins/Shift+Ins keys). After that RVStyle attached to RVEdit2 contains two duplicate ListStyles of which only one is actually used. Why is that so? I didn't even copy list, only text.
DeleteUnusedStyles removes excessive styles but I cannot use it because it will also remove styles that are in RVStyle2, are unused but stull required by the application.
Two more notes:
1. Text in RVedits is from MS Word received by copy/paste.
2. There can be two ways to prepare initial state of RVEdits. The problem appears only when I consequently paste text from Word into RVEdit1 and RVEdit2. If I first paste text into RVEdit1 and then copy/paste it from RVEdit1 into RVEdit2 no problem appears. After both operations styles seem identical so I cannot understand why in the first case list styles become doubled after another copy/paste operation.
If there's a way to instruct DeleteUnusedStyles not to delete some styles that are unused but required the problem will be solved partially.
I am using TRichView TRichView: 12.6.1 in Delphi 2010
I encountered strange problem with copy/paste between two TRichViewEdit components.
Both RVedits have their own RVStyle components attached. Initially contents of RVEdits and RVStyles are identical (some text and numbered list). Now let's copy a portion of text (not even portion of list) from RVEdit1 into RVEdit2 (I use Ctrl+Ins/Shift+Ins keys). After that RVStyle attached to RVEdit2 contains two duplicate ListStyles of which only one is actually used. Why is that so? I didn't even copy list, only text.
DeleteUnusedStyles removes excessive styles but I cannot use it because it will also remove styles that are in RVStyle2, are unused but stull required by the application.
Two more notes:
1. Text in RVedits is from MS Word received by copy/paste.
2. There can be two ways to prepare initial state of RVEdits. The problem appears only when I consequently paste text from Word into RVEdit1 and RVEdit2. If I first paste text into RVEdit1 and then copy/paste it from RVEdit1 into RVEdit2 no problem appears. After both operations styles seem identical so I cannot understand why in the first case list styles become doubled after another copy/paste operation.
If there's a way to instruct DeleteUnusedStyles not to delete some styles that are unused but required the problem will be solved partially.