Page 1 of 1

additional space after RTF field

Posted: Fri Mar 26, 2010 2:33 pm
by Usch Wildt
Hi,

I have a problem exporting rtf from TRichView 12.1/ScaleRichView 3.1.
My text contains rtf reference fields to numbered lists. In the resulting rtf, there is always a space character after the field.

Example:

I have a document with one paragraph with text "Usch 1", which is a numbered list, soe.g. "1.1.1 Usch 1"
In the next paragraph a have a reference field to this numbered paragraph.

GetAllText is:

"Usch 1\r\n see also {\\field{\\*\\fldinst REF Usch1 \\\\r \\\\h \\\\*MERGEFORMAT \\fldalt } {\\fldrslt Usch1 }}!"

Then a call MyScaleRichView->RichViewEdit->SaveRTF

Resulting rtf is:

1.1.1. Usch 1
see also 1.1.1 !

There is a space between 1.1.1 and the exclamation mark.
What I need is:

1.1.1. Usch 1
see also 1.1.1!

(no space between 1.1.1 and !)

Can you help me with that?
Thanks!

Usch

Posted: Fri Mar 26, 2010 4:08 pm
by Sergey Tkachenko
May be this is a space between '}' and '{'?

Posted: Sat Mar 27, 2010 12:55 pm
by Usch Wildt
No, the space is after the field.
In word it looks like this, if you make the field functions visible:

see also: {REF Usch1 \r \h \*MERGEFORMAT } !

The space is not part of the field, it is behind the field.

Posted: Sat Mar 27, 2010 1:03 pm
by Usch Wildt
Oh, sorry, you were right!
That was the problem,
thanks a lot!

Usch