Re: Commit: import RTF


Subject: Re: Commit: import RTF
From: Harald Fernengel (520022883003-0001@t-online.de)
Date: Wed Mar 28 2001 - 09:28:12 CST


Hello,

Parsing the field instructions is a total nightmare. As I found out different
versions of Word produce different field instructions for the same field.

As far as I know there doesn't exist a documentation for field instructions.

This is what happens when you insert a datefield in StarOffice and save it as
RTF:

{\field
 {\*\fldinst \\date \\@"tt.MM.yy"}
 {\fldrslt 28.03.01}
}

Do you notice the double backslash? This isn't valid RTF code, this is Word's
macro language. (If you want to insert a backslash, for example in a
Filename, you have to use \\\\ ). BTW, inside the \fldinst block there can be
other subblocks, for example if you use the "if" macro...

I suggest writing a new Class for parsing field instructions, because they
are rather an own language and not RTF specific stuff. Perhaps we can reuse
this class if M$ creates a new file format?

> In the process of fixing the RTF import, I just commited some changes:
> I have added code parse fields in RTF (bug 635 work). It currently does the
> same as before, ie it takes the field value. But I plan to parse the field
> instructions. Does anybody have a more complete field documentation in RTF,
> because the RTF Spec for RTF 1.4 is quite vague on the topic.
>
> Added field support in RTF import. Currently, only field result is imported
>
> CVS: Modified Files:
> CVS: src/wp/impexp/xp/ie_imp_RTF.cpp src/wp/impexp/xp/ie_imp_RTF.h
>
> Hub



This archive was generated by hypermail 2b25 : Wed Mar 28 2001 - 09:30:39 CST