I am trying to implement RTF export of headers/footers.  It seems to me 
that in general the internal representation of header/footers is not 
optimal.  As far as I can tell, the pt_PieceTable holds a single dividing 
line in the form of a pf_Frag that delineates headers/footers from the main 
text.

The problem arises when I need to know when the header/footer has 
ended.  In short, I don't.  I never recieve notification in the exporter 
that the header has finished. The exporter is left hanging in a way that it 
cannot close the document (clean up the stack of braces for RTF).

In my case, the document looks like:
Section | Block | Text | Text | Block | Text | Header | Block |Text | Block 
| Text

I think it would be better if the document was structured as a recursive 
set of containers as in
PieceTable
|-Section  --- Block---Text
|           |        |-Text
|           |- Block---Text
|-Header--- Block---Text
        |- Block---Text

This would allow things like putting a different header in each section, 
and handling outline levels of a document, as well as trivializing the 
problem of knowing when the emission of a document portion has ended.

Does anyone know what this change would involve?

Matti


Reply via email to