Re: Need help to enable RTF style import


Subject: Re: Need help to enable RTF style import
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Mon Sep 10 2001 - 03:02:37 CDT


Hi Matti,
         I've built on your work to implement the construction of the
properties associated with the style. It needs more work but were 90% of
the way there. These now get written out to the style definitions.

I've defined new character and paragraph styleNumber variables which you
can set by implementing the style number keyword \sN. Should be straight
forward.

Then in applyPragraph and applyCharacter.. methods, lookup the char * name
of the style in the member table m_styleTable[..] and put it into the
attribute list with attribute pt_PT_NAME_ATTRIBUTE_NAME

Over to you :-)

Cheers

Martin

 On Mon, 10 Sep 2001, Matti Picus wrote:

> Here is a first cut at importing RTF styles, a patch from the latest CVS,
> and the raw files if the diff format is screwy.
>
> This is for brave souls only, there are still three
> major problems and lots of minor ones:
>
> 1. There is an ugly memory leak somewhere.
>
> 2. The paragraph and character attributes are parsed
> but not applied to the style. I tried, really I did,
> to make heads or tails of IE_Imp_RTF::ApplyParagraphAttributes()
> with no luck. I think this function must be rewritten into
> ~100 line chunks so that mere mortals can use its magical
> power (I know, my function is also long. Practice what you preach...)
>
> 3. The styles appear on the GUI, but the importer does not assign style
> names to the runs it imports. The importer must now relate to the
> \sN keyword.
>
> Any takers?
>
> Matti




This archive was generated by hypermail 2b25 : Mon Sep 10 2001 - 03:02:48 CDT