You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Glen Mazza <gr...@yahoo.com> on 2004/10/09 17:54:53 UTC

Change parent of FOText from FObj to FONode?

Team,

FOP's fo.FOText class is used for text nodes (PCDATA)
found within the processing stream.  

For example, with:

<fo:block>This sentence is <fo:inline
font-weight="bold">really</fo:inline>
simple.</fo:block>

"This sentence is ", "really", and " simple." become
three separate FOText instances.

We have this class extending FObj but I would like to
have it to extending FONode instead (as it was doing a
few years back).  FOText is not really a formatting
object, so some of the FObj methods (such as
getName(), getNameId(), anything involving the
propertyList) don't fit for it.  Also, we need to
retain a getID() in FObj instead of just using
getPropertyString(PR_ID) because of this issue,
because FOText doesn't have a property list and so
gPS() for it causes NPE's to occur.

It appears to be a simple switch -- the change of
parameter types to about four or five methods total
within layout and the RTF library.  There *might* be
more subtle issues that may result in us not being
able to do this, but I don't see anything ATM and in
any event the changes here would be easy to undo.

Thoughts on/Objections to this?

Thanks,
Glen


Re: Change parent of FOText from FObj to FONode?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Glen Mazza wrote:
> There *might* be
> more subtle issues

Just do the change locally, run the test suite (well...),
see if anything important breaks. If not, check in.

J.Pietschmann