text frags vs strux frags

From: Roman Korchagin <romeok_at_rosvet.com>
Date: Wed Nov 24 2004 - 06:04:36 CET

I've found a good description of the backend and ideas that went into it in
a post by Jeff
http://www.abisource.com/mailinglists/abiword-dev/00/April/0055.html

I have a question after looking at the code but don't feel like replying to
a 4-year old post is a good idea, so I start new one.

Jeff says:
> each fragment has an INDEX to its attributes/properties
[pFrag->m_indexAP].
> each text fragment also has an INDEX to its text [pTextFrag->m_bufIndex].
> these INDEXes are are special and are interpreted by the pt_VarSet
> member of the pt_PieceTable [pPT->m_varset].

Upon closer examination it is not exactly true (probably result of a later
hack):

pf_Frag - the base class for all fragments has PT_DocPosition document
position, but does not have m_BufIndex (piece table position).

pf_Frag_Text - derived from pf_Frag introduces m_BufIndex but in the
comments states that this class does not know anything about where this
fragment is location in the document and does not know PT_DocPosition.

pt_Frag_Strux - base class for structures - no questions in relation to this
issue.

So if I to believe comments in pf_Frag_Text, then text fragments do not know
their document position, they only know their buffer (piece table) position.
But structure fragments know their document position only. Sounds a bit
weird.

Probably it's just the comment is wrong and all fragments know their
document position and text fragments know their buffer position too.

Anybody wants clarify current state of things here?

Thanks,
Roman
Received on Wed Nov 24 06:02:57 2004

This archive was generated by hypermail 2.1.8 : Wed Nov 24 2004 - 06:02:59 CET