This is exactly what we want to see: people fixing bugs and submitting patches. Thanks a lot, Matthias. I've applied your patch. It does its job. I'm glad you had fun playing with the code. Let's hope you like playing some more. :-)
http://svn.apache.org/viewcvs?rev=331726&view=rev A comment about OpenOffice: RTF support in OpenOffice was a big disappointment for me so far. I've seen lots of problems even with RTF files not produced by FOP. Better go towards OpenDocument... :-) I wasn't aware of the differences in table handling between the various Word versions. I guess I need to have a closer look there. Maybe we need to make the RTFHandler configurable so we can control what RTF generation strategy to pursue. On 07.11.2005 08:23:05 matthias reinert wrote: > RTF not supported in fop0.20.5.... > > I tried to get accomplished with the source of the trunk-snapshot last > weekend > and I found that RTF is working but seemed not to render > - footnotes > - tables result in 1 column in openoffice (tables which eaxctly showed 2 > columns in Word97) > and for PDF: foonote-mark but no footnote-body if footnote is within a > table-cell. > > For the footnotes in RTF I would propose the follwing code-update for the > class RTFHandler.java. It could produce some footnote code, which shows up in > openoffice and word97 as footnote, but I was unsure if it fits with any of > Your code guidelines and design concepts (not to say quite sure that it fits > not...) Hence I wouldnt dare to submit this to existing code. In addition to > that errors in my .fo test docs cn't be excluded. > > For the difference between Word97 and OpenOffice ~rendering~ of RTF-Tables I > think it is related to Word2000 table-peculiarities stated in the > Msdn-RTF-Reference as word200 expects the row Properties at the end of a row > and I guess openoffice is following the word2000 path and word97 has some > kind of backward compatibility. > > Anyway. The code is great and its fun to ~play~ with it, but quite hard to > grasp the concept and to debug (for beginner like me;). > > Thanks for your help > Yours, Matthias > > > > > Heres the diff ouptut (includes some superfluous debug output lines) "fixing" > the footnote in RTF. I found that the Footnote FONode Object had no childs > and called them explicitly. This would damage the design schema I guess. > > Index: src/java/org/apache/fop/render/rtf/RTFHandler.java > =================================================================== > --- src/java/org/apache/fop/render/rtf/RTFHandler.java (Revision 331154) > +++ src/java/org/apache/fop/render/rtf/RTFHandler.java (Arbeitskopie) > @@ -1385,11 +1391,20 @@ > > recurseFONode( item.getLabel()); > recurseFONode( item.getBody()); > + } else if (foNode instanceof Footnote) { > + Footnote fn = (Footnote) foNode; > + > + recurseFONode( fn.getFootnoteCitation() ); > + recurseFONode( fn.getFootnoteBody() ); > + > } else { > //Any other FO-Object: Simply recurse through all childNodes. > if (foNode.getChildNodes() != null) { > - for (Iterator it = foNode.getChildNodes(); it.hasNext();) { > - recurseFONode( (FONode) it.next() ); > > + for (Iterator it = foNode.getChildNodes(); it.hasNext();) { > > + FONode fn = (FONode) it.next(); > + log.warn(" ChildNode for " + fn + " (" + fn.getName() + > ")"); // > + // recurseFONode( (FONode) it.next() ); > > + recurseFONode( fn ); > } > } > } > > > Am Montag, 7. November 2005 09:57 schrieb Jeremias Maerki: > > On 01.11.2005 20:53:24 J.Pietschmann wrote: > > > matthias reinert wrote: > > > > using the snapshot > > > > http://cvs.apache.org/snapshots/fop/fop_20051101053804.tar.gz > > > > I ran into problems with footnotes in RTF. The given examples worked > > > > well for PDF output but in RTF footnotes were not rendered. > > > > > > The RTF renderer in the development snapshot is rather incomplete. > > > You could try the stable release (0.20.5) > > > > Uhm, there's no RTF support in 0.20.5!!! > > > > BTW, there's some code in there that is supposed to handle footnotes but > > it seems it is currently not properly working. It probably needs some > > work. Help welcome. > > > > Jeremias Maerki Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
