Page 1 of 1

Problem in copy paste from Miscrosft word

Posted: Wed Aug 22, 2007 1:58 pm
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.

Posted: Mon Aug 27, 2007 6:29 am
by delphilord
I sent file via email.
pls check.
thanks

Posted: Sat Sep 01, 2007 1:58 pm
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

Posted: Sun Sep 02, 2007 1:22 pm
by Sergey Tkachenko
Yes, I recevied it. Please wait while I test it

Posted: Wed Sep 05, 2007 1:04 pm
by delphilord
Thanks and best Regards.

Posted: Mon Sep 10, 2007 8:41 am
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.

Posted: Mon Sep 10, 2007 3:56 pm
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.

Posted: Sat Oct 20, 2007 7:43 am
by delphilord
Unfortunately this settings did not help me.
Any Trick for this?can I do something In microsft Word ?