RE: list-item-label (bullets)
"Conal Tuohy" <[email protected]> Tue, 4 Feb 2003 16:35:57 +1300
| Newsgroups | gmane.text.xml.jfor.devel |
|---|---|
| Message-ID | <[email protected]> |
I've just got on to dealing with this problem now. It turned out that the list bullets are specified both in RtfListItem and RtfListTable. In older versions of MS Word the list bullets were specified "in-line" as part of each paragraph. In more recent versions of Word the list bullets are specified in a stylesheet-like data structure in the file header, called a "listtable". So Word 2000 (my target platform) reads the bullets as specified in the list table and ignores the bullets in the list itself. I haven't produced a good solution; my quick fix was to hack RtfListTable.java and replace the 'b7 character with a hyphen "-" which renders the same on both Mac and Windows (ugly, but better than a greek sigma character). Alternatively, using 'a5 produced bullets on the Mac, but a Yen symbol on Windows. The /bullet control word (which is defined to mean different code points on Mac and Windows) isn't available in the listtable which requires SDATA (hex codes). So I had to use hyphen :-( I'm no expert in RTF, but I really wonder if the listtable approach is really correct for jfor? The XSL-FO model has list-item-labels "inline", but this doesn't correspond to how the list is done now. I think the way jfor USED to do it (before ListItemTable.java was contributed) had more in common with XSL-FO's model. Cheers! Con > -----Original Message----- > From: Bertrand Delacretaz [mailto:[email protected]] > Sent: Friday, 17 January 2003 11:46 p.m. > To: Conal Tuohy; [email protected] > Subject: Re: [jfor-devel] list-item-label (bullets) > > > Hi, > > >. . . > > Currently the fo:list-item-label elements are rendered as > > small bullets, ignoring the actual content of the list-item-label > > in the source FO document. > >. . . > > I *think* these bullets are generated by the following code in > org.jfor.jfor.rtflib.rtfdoc.RtfListItem: > > writeGroupMark(true); > writeControlWord("pntext"); > writeControlWord("f" + > RtfFontManager.getInstance().getFontNumber("Symbol")); > writeControlWord("'b7"); > writeControlWord("tab"); > writeGroupMark(false); > > And if I remember right 'b7 is the bullet character that is generated, > you can easily check by trying to replace this constant with > something else. > > If that's the case, the fix would be to improve the handling of > fo:list-item-label in the converter package, and add an option to > RtfListItem to specify the bullet character to use, keeping the existing > font and character as defaults. > > It might also be that the "Symbol" font is defined incorrectly by jfor > or not available on your target platform, and it would be a good idea to > set the font specified in fo:list-item-label as well. > > Hope this helps! ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com