Problem in copy paste from Miscrosft word

General TRichView support forum. Please post your questions here
Post Reply
delphilord
Posts: 25
Joined: Thu Feb 02, 2006 6:53 am
Contact:

Problem in copy paste from Miscrosft word

Post by delphilord »

Today on my home PC I noticed a problem.
I have a book typed in microsft word.I want to create an program using this file.
this file is RTL Persian.
When I copied a line form it and pasted in my richview editor ,i saw a very strong problem .
all space chars position changed.
thus all words lost their meaning
If in word document we have spaces on position 5 ,7,10 right side of document.after paste space are in 5,7,10 form left side!
I played with paragraph left right style.but same.
An Important test:I typed same line in the same word document and copied both line and paste in trichview.
my typed one was ok.
what is problem?

I WILL POST A SIMPLE FILE,THIS NIGHT FROM HOME.
delphilord
Posts: 25
Joined: Thu Feb 02, 2006 6:53 am
Contact:

Post by delphilord »

I sent file via email.
pls check.
thanks
delphilord
Posts: 25
Joined: Thu Feb 02, 2006 6:53 am
Contact:

Post by delphilord »

Dear sergey,Did you test file?
I put a link here to this file too.
http://www.shayansoft.ir/d/test.doc

Thank you
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, I recevied it. Please wait while I test it
delphilord
Posts: 25
Joined: Thu Feb 02, 2006 6:53 am
Contact:

Post by delphilord »

Thanks and best Regards.
badevlad
Posts: 10
Joined: Thu Feb 01, 2007 12:59 pm
Location: Zhitomir, Ukraine
Contact:

Post by badevlad »

It is just regular problem of RTF format.

Try to do the following:

1. Copy the line you have described before.
2. Create new Word document.
3. Paste copied text into the new document As RTF.

The text will be pasted with incorrect BiDi as well.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Did you change RichViewEdit1.BiDiMode=rvbdLeftToRight? If it is rvbdUnspecified, RTL text is not supported.

The copied RTF (at least in Word 2003) does not contain any text direction information, so the application must arrange text itself.
Unfortunately, TRichView is not so smart as Word in arranging bidirected text.
I am afraid in this case you need to help it: set BiDiMode of RTL paragraphs to rvbdRightToLeft.
delphilord
Posts: 25
Joined: Thu Feb 02, 2006 6:53 am
Contact:

Post by delphilord »

Unfortunately this settings did not help me.
Any Trick for this?can I do something In microsft Word ?
Post Reply