Re: RTF Importer/Exporter


Subject: Re: RTF Importer/Exporter
From: Paul Rohr (paul@abisource.com)
Date: Sat Sep 08 2001 - 15:30:48 CDT


Matti,

Just commenting on your styles questions...

At 09:53 PM 9/8/01 +0200, Matti Picus wrote:
>>2. Implement styles import/export. This should be easier now that we allow
>>edittable builtin styles. All used styles should be exported to RTF.
>
>I looked at importing styles, and found the line
>TODO Ignore stylesheet as ABIWord doesn't do styles (at the moment)

That comment has been wrong for over two years now.

>Questions on implementation:
>A. Does another importer successfully import styles?

Yes. The .abw importer. :-)

>B. Help me with the function argument
> pt_PieceTable::appendStyle(char ** attributes)
> where attributes is a name,value stirng pairing:
> name - Style name that appears in dialog box

The primary purpose is to reference this name when invoking the style at
other places in the document. (See the current style vs. name thread for
details.) For this reason, the name is *not* localized.

These names are also used in the UI as you describe. If we want to localize
these later, there should probably be an additional attribute stored in the
style definition with the localized variant. (However, I'm not at all sure
this would be a good idea.)

> type - ??? "P" seems to be common

P for paragraph styles. C for character. IIRC, P is the default, but you
shouldn't rely on that.

> basedon - style parent

Yep.

> followedby - next paragraph, had the value "Current Settings"

Should be either the name of another defined style, or else omitted
entirely. I suspect the latter is what you're seeing in the UI as "Current
Settings", but I haven't audited that code.

> props - ??? what are valid values, is there
> documentation? I understand the
> DTD is out of date...

These are the same props as used for explicit properties elsewhere in the
import/export code.

Paul



This archive was generated by hypermail 2b25 : Sat Sep 08 2001 - 15:23:13 CDT