Re: wv, special characters and stylesheet.

Justin Bradford (justin@ukans.edu)
Tue, 5 Oct 1999 14:47:01 -0500 (CDT)


> There are special chars such as 0x05 and 0x08 i.e. insert comment and
> graphic respecively, what is the preferred input route for these ?
>
> a) just the current receive char, and the abi char scanner on receipt of a
> special char requests from the wv lib for all the relevent information about
> this special char iself ?
> b) wv has seperate events for these, and you register a comment and
> graphic handler which get called when wv notices them for you

How about something in between a and b. We could have a separate handler
for special characters. The normal char handler just gets normal text, but
the special char handler gets these 0x05 and 0x08 things. It can call
functions in wv for more information and decide what to do.

I think this would be a decent compromise between too many callbacks and
too complex of callbacks.

> How about I add
> a little flag to the elehandler routine that is just marked clean or dirty,
> if its clean then the para is exactly the same as its base style, and if
> its dirty then it is modified ? And you have to check element by element
> to see what the change was in the dirty case ?.

This sounds ideal. We can skip the specific checks on straight styles, and
otherwise, it just a simple test to see if a specific property had
changed. Let me know when you have this working; I think we can support
style import pretty easily then.

> The only other way to do this
> is to open up the whole paragraph property creation code, which is not
> something that anyone should ever have to parse, even if it would (possibly)
> be more efficient in finding out how the para differs from the base style, as
> word encodes the differeces into small (but often complex to understand) sprms.

I agree this would be bad. We certainly do not want to duplicate the sprm
decoder in the AbiWord importer.

Justin



This archive was generated by hypermail 1.03b2.