LoadRTF containing a table into idented paragraph

General TRichView support forum. Please post your questions here
Post Reply
YannickM
Posts: 5
Joined: Tue Jul 03, 2007 2:04 pm

LoadRTF containing a table into idented paragraph

Post by YannickM »

Hi,

I'm currently having some trouble when loading an RTF containing a table into a document that has indentation.

Code snippit:

Code: Select all

RichViewEdit1->RTFReadProperties->ParaStyleMode = rvrsUseSpecified;
RichViewEdit1->RTFReadProperties->ParaStyleNo = iParagraphStyle;

Stream->Position = 0;
RichViewEdit1->LoadRTFFromStream(Stream);

RichViewEdit1->RTFReadProperties->ParaStyleMode = rvrsAddIfNeeded;
The problem occurs when a user has an indented paragraph, and attempts to insert an RTF containing a table.

The table's values get wrapped.

Is there a way to correctly add the table (indented) without changing its appearance?

Thanks.
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

What do you mean by "The table's values get wrapped"?
YannickM
Posts: 5
Joined: Tue Jul 03, 2007 2:04 pm

Post by YannickM »

For instance, if the table would contain a value:
$123,456,789.00
this value would be wordwrapped to something like:
$123,
456,
789.
00

The table's cells become much higher, and narrower. It seems as the table is squeezed together.

Edit:

It seems as if each table cell gets the left Indentation I used for the paragraph. So for example, the table is indented 2cm, and each cell is also indented 2cm, which makes it wrap the text in the cells.
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Of course, with these settings, if the iParagraphStyle-th paragraph style has indents, they will be used for every paragraph in the imported document, including tables and paragraph inside all cells.
Post Reply