Yes, there are few nodes types missing, because i just added the node types,
which are implemented in rtf module.
But you are right: TableBody is implemented, but is missing in the
if-structure. I'll add it.

There is also support for ExternalGraphics, but i guess this won't work so i
did not add it to if-structure. This will be my next task in rtf module.

Regards,
Peter Herweg

-----Ursprungliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Auftrag von Andreas L Delmelle
Gesendet: Dienstag, 20. September 2005 00:58
An: fop-dev@xmlgraphics.apache.org
Betreff: Re: rtf ignoring TableBody et al


On Sep 20, 2005, at 00:28, Matthew L Daniel wrote:

> I am using trunk code and with an input FO that produces excellent PDF
> output, I am seeing the following messages about lots of ignored
> instances.
>
> After checking RTFHandler.java, it seems they are omitted from the very
> large instance-switch in "invokeDeferredEvent".
>
> My question is if this is "in progress" code or if RTFHandler has been
> broken like this for a while?

Seems like it's broken. At least, there's a few node-types missing,
amongst which precisely TableBody, TableHeader, TableFooter,
InstreamForeignObject, SVGElement, ExternalGraphic...

I'm going to leave this for now, since I don't know too much about the
RTF Rendering code --maybe those node-types were left out for a good
reason, I'm not sure.

At first glance, the whole structure:

if( fo instanceof PageSequence ) {
   //do something
} else if( fo instanceof Flow ) {
   //do something
} ...

would probably better be replaced by one

switch( fo.getNameId() ) {
case Constants.FO_PAGE_SEQUENCE:
   //do something
   break;
case Constants.FO_FLOW:
   //do something
   break;
   ...
}

The least this would do is avoid a number of unnecessary calls to
instanceof.

Note to Peter Herweg: I think I see now what you meant by the many
'if-then-else-if's. I hope you can put the above comment to good use...


Cheers,

Andreas

Reply via email to