List indention and justify alignment

[email protected] Wed, 5 Mar 2003 16:32:55 +0100 (MET)
Newsgroups gmane.text.xml.jfor.general
Message-ID <[email protected]>
Hello,

I have problems when i set the alignment in a table cell to "justify"
because it has no effect to the generated RTF document. If i set the alignment to
"right" it works. The problem happens if only one block is in a cell. If the
cell has several blocks, the problem happens only to the last block. I had a
quick look to the source code of RTFList.java. Is it possible that the RTF
control word "pard" can be used to fix this problem?

An other problem which i has is that the second and third line of my example
has the same indention as the list in front of the table.

My Environment:

- I use the current version of jfor which i have checked out yesterday (5th
may 03) from the 
  CVS repository. 
- I open the generated documents with Microsoft Word 97.


My XSL-FO looks as follows:

<?xml version="1.0" encoding="utf-8"?>
<!-- tell cocoon to use jfor to convert this to RTF format -->
<?cocoon-format type="xslfo/rtf"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="contract" page-height="29.7cm"
page-width="21cm" margin-top="2cm" margin-bottom="1.2cm" margin-left="1.8cm"
margin-right="1.5cm">
      <fo:region-body margin-top="3cm"/>
      <fo:region-before extent="3cm"/>
      <fo:region-after extent="3cm"/>
      <fo:region-start extent="2cm"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="contract">

    <fo:flow flow-name="xsl-region-body">
      <fo:table table-layout="fixed" padding="0pt">
        <fo:table-column column-width="81mm"/>
        <fo:table-column column-width="81mm"/>
        <fo:table-body>
          <fo:table-row>
            <fo:table-cell>    
              <fo:list-block provisional-distance-between-starts="6pt">
                <fo:list-item>
                  <fo:list-item-label end-indent="label-end()">
                    <fo:block text-align="justify">-</fo:block>
                  </fo:list-item-label>
                  <fo:list-item-body start-indent="body-start()">
                    <fo:block text-align="justify"
space-after="3pt">Hello</fo:block>
                  </fo:list-item-body>
                </fo:list-item>
              </fo:list-block>
              <fo:block text-align="justify">The quick brown fox jumps over
the lazy dog. The quick brown fox jumps over the lazy dog</fo:block>
            </fo:table-cell>
            <fo:table-cell>
              <fo:block text-align="justify">The quick brown fox jumps over
the lazy dog. The quick brown fox jumps over the lazy dog</fo:block>
            </fo:table-cell>  
          </fo:table-row>
        </fo:table-body>  
      </fo:table>
    </fo:flow>
  
  </fo:page-sequence>
</fo:root>  


The RTF result is:

*  
Hello
¦-----------------------------------------¦-----------------------------------------¦
¦ The quick brown fox jumps over the lazy ¦ The quick brown fox jumps over
the lazy ¦
¦   dog. The quick brown fox jumps over   ¦   dog. The quick brown fox jumps
over   ¦
¦   the lazy dog                          ¦   the lazy dog                  
      
¦
¦-----------------------------------------¦-----------------------------------------¦
   
   
What i would expect is:


*  
Hello
¦-----------------------------------------¦-----------------------------------------¦
¦ The quick brown fox jumps over the lazy ¦ The quick brown fox jumps over
the lazy ¦
¦ dog. The quick brown fox jumps over the ¦ dog. The quick brown fox jumps
over the ¦
¦ lazy dog                                ¦ lazy dog                        
      
¦
¦-----------------------------------------¦-----------------------------------------¦
   

Is it possible to walk around these problems or will they be fixed?

Any help appriciated.

Thanks in advance
Rico

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com