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