Hi Robert,

 

thanks for this patch.

The result looks great in MS Word.

I also improved the paragraph counting, so the numbers disappeared.

 

@hyphenation: I get mad by hyphenate things like 0xFFFFFFFF. It's 
"unhyphenatable".

 

Best regards 

 

Markus

 

 

 

Von: Robert Meyer [mailto:rme...@hotmail.co.uk] 
Gesendet: Mittwoch, 27. Februar 2013 13:35
An: fop-dev@xmlgraphics.apache.org
Betreff: RE: AW: Help needed for RTF

 

Hi Markus,

I have taken another look at the problem and found that the reason why it is 
not adding it as a child of the RtfListItem is because it's needs a table 
container. When the table FONode is processed, it tries to find the last 
container which implements the IRtfTableContainer interface 
(RTFHandler.java:530). As neither the RtfList or RtfListItem implements the 
IRtfTableContainer interface, the next one it finds is the main RtfSection 
which is the parent to the lists. This is why the table is added where it is.

I did try modifying the RtfListItem (attached) to become a table container and 
while it allowed it to be added as a child, the RTF output (also attached) 
doesn't seem to be right and is a bit hit and miss whether it will open in rtf 
viewers or not (WordPad works whereas OpenOffice doesn't). The next steps would 
be to compare some valid output for an example from Word with the output from 
FOP and see what the differences are. It may just be one or two tags in the 
wrong place in which case it would be a fairly easy fix. Another option may be 
to add a new table container as a child of the list item and do it that way.

This whole thing would be a temporary workaround however as there is definitely 
something not right with the current RTF implementation. For example, some 
child objects are stored as single variables meaning that you can't have more 
than one of something unless specifically handled. There are also lots of 
special cases if certain objects are children of others instead of using a more 
generic approach. I am not sure if this is down to the complexities of RTF or 
just the implementation, but it definitely deserves some attention in future.

I hope this points you in the right direction.

Regards,

Robert Meyer

________________________________

Subject: AW: Help needed for RTF
Date: Thu, 21 Feb 2013 16:08:37 +0100
From: markus.sticker.e...@zf.com
To: fop-dev@xmlgraphics.apache.org

Hi Robert,

 

Yes, I think there are just some small parts to change.

Adding the table as child to the textrun of the RtfListItem.

 

I already did the indent and the spacecalc for nasted tables.

(that was a request by our internal users)

Maybe you could be so kind and give me a hint for adding 
the table to the textrun.

 

Thanks for your help and best regards

 

Markus

 

Von: Robert Meyer [mailto:rme...@hotmail.co.uk] 
Gesendet: Donnerstag, 21. Februar 2013 15:42
An: fop-dev@xmlgraphics.apache.org
Betreff: RE: Help needed for RTF

 

Hi Markus,

I had a quick look at this yesterday but didn't get very far with it past 
confirming what you said earlier. The structure being written has the two list 
items containing only the textrun as children with the table being listed 
separately below. I am not sure yet whether it would simply be a case of fixing 
this by adding the table rtf element as a child of the listitem or whether 
there is more to it. 

I did notice that the table has a case to determine if the is table nested 
within a table cell and to perform a special case where it writes the "pard" 
keyword. According to the RTF specification, pard is used to reset the text 
formatting so that may need to be done as well for nested tables in lists. I am 
afraid I am not that familiar with RTF to know whether anything else needs to 
be done in this case, but it might just be worth trying it first and see what 
the result is.

If I get a bit of spare time i'll take another look and see if I can get it to 
correctly add the table as a child item and see what happens. In any case i'll 
let you know what I find.

Regards,

Robert Meyer

________________________________

Subject: Help needed for RTF
Date: Thu, 21 Feb 2013 14:19:09 +0100
From: markus.sticker.e...@zf.com
To: fop-dev@xmlgraphics.apache.org

Hello,

 

I'm looking for Tables nested in Lists.

I need some information about the process that lead to
lists without  nested tables. 

Mit freundlichen Grüßen/Kind regards

Markus Sticker
Technik ZF-Konzern/Operations and Technology ZF Group
Infrastruktur/Infrastructure (OTEP4)

ZF Friedrichshafen AG
88038 Friedrichshafen, Deutschland/Germany
Telefon/Phone  +49 7541 77-7644, Telefax/Fax  +49 7541 77-907644
markus.sticker.e...@zf.com


Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof. Dr. 
Giorgio Behr 
Vorstand/Board of Management: Dr. Stefan Sommer (Vorsitzender/CEO), Dr. 
Konstantin Sauer, Dr. Peter Ottenbruch, Jürgen Holeksa, Dr. Gerhard Wagner, 
Reinhard Buhl, Rolf Lutz, Wilhelm Rehm

Sitz/Headquarters: Friedrichshafen 
Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the 
municipal court of Ulm HRB 630206

 

Reply via email to