Re: - slight fileformat change -commit: More list fixes.


Subject: Re: - slight fileformat change -commit: More list fixes.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Thu Sep 20 2001 - 10:04:11 CDT


I realized I should have made more comments on this as it does involve a
small change to our file format.

Previous to this commit, we were recording all the character properties
and writing them into the paragraph strux at the beginning of a paragraph
containing a list item.

I needed to do this to make the list label reflect all the character
proproperties previously defined. Things like font size, font weight,
colour etc.

Without doing this the list label always have just the default character
properties.( 12 point size, times-new roman etc...)

I finally realized that we did not have to do this. The problem was that
the first item in a paragraph containing a list is a field and when asking
for a span pointer from the piecetable it was getting a NULL. The field
therefore only registered properties in the paragraph Attribute/Property
pointer.

The way I fixed this was to write a unique character fmtMark before the
list label. I guarenteed uniqueness by inventing a new character level
property called "list-tag" which has it's value a 32 bit random number.
Since this random number is unique for every paragraph, we can be sure it
will never be coalesced with other fmtMarks or styles.

With this in place the list-label gets a span AttrProp pointer and hence
correctly inherits all the character properties it should.

The upshot of this is that the character level-property "list-tag" now
gets written out to our file format as character level span immediately
before the actual list label.

I have extended our RTF importer/exporter to handle the translation
list-tag <==> /*/listtag so as to keep 100% tranperency between our file
format and RTF.

If other exporters are setup to ignore properties they don't understand
this should have no other effect.

Sorry not writing this at the time of commit. I was pressed for time then.

Cheers

Martin

On Thu, 20 Sep 2001, Martin Sevior wrote:

>
> CVS: ----------------------------------------------------------------------
> CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
> CVS:
> CVS: Committing in .
> CVS:
> CVS: Modified Files:
> CVS: src/text/fmt/xp/fl_BlockLayout.cpp
> CVS: src/wp/impexp/xp/ie_exp_RTF.cpp
> CVS: src/wp/impexp/xp/ie_exp_RTF_listenerWriteDoc.cpp
> CVS: src/wp/impexp/xp/ie_imp_RTF.cpp src/wp/impexp/xp/ie_imp_RTF.h
> CVS: ----------------------------------------------------------------------
> More lists fixes. Now list items can be selected more easily.
>
> Also removes redundant character level properties. I'm happy to tag
> 0.9.4-pre1 now but I don't have time today.
>
> Feel free to go ahead tonight dom or I will do it in the morning.
>
> Martin
>
>
>
>



This archive was generated by hypermail 2b25 : Thu Sep 20 2001 - 10:04:17 CDT