Page 1 of 1

LoadRTF containing a table into idented paragraph

Posted: Mon Jun 09, 2008 9:09 am
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.

Posted: Mon Jun 09, 2008 2:18 pm
by Sergey Tkachenko
What do you mean by "The table's values get wrapped"?

Posted: Mon Jun 09, 2008 2:25 pm
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.

Posted: Mon Jun 09, 2008 5:50 pm
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.