Bug 50163 - Problem with list containing multi-line items in RTF
Summary: Problem with list containing multi-line items in RTF
Status: CLOSED WORKSFORME
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: rtf (show other bugs)
Version: 1.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 07:53 UTC by dmitro
Modified: 2012-04-01 13:42 UTC (History)
1 user (show)



Attachments
Fixed the Problem with list containing multi-line items in RTF (3.72 KB, patch)
2010-12-21 07:59 UTC, Jerry Fan
Details | Diff
My fo file (3.41 KB, application/octet-stream)
2010-12-21 08:05 UTC, Jerry Fan
Details
The generated rtf file (2.24 KB, application/msword)
2010-12-21 08:07 UTC, Jerry Fan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dmitro 2010-10-27 07:53:57 UTC
I have a problem rendering a list with multi-line items in RTF.

I have html

<ul>
  <li>
    <p>
    Item 1 Line 1<br />
    Item 1 Line 2<br /> 
    Item 1 Line 3
    </p>
  </li>
  <li>
    <p>
    Item 2 Line 1<br />
    Item 2 Line 2<br /> 
    Item 2 Line 3
    </p>
  </li>
</ul>

which gets transformed into fo as

<fo:list-block>
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block>
        <fo:inline>•</fo:inline>
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>
        Item 1 Line 1
      </fo:block>
      <fo:block>
        Item 1 Line 2
      </fo:block>
      <fo:block>
        Item 1 Line 3
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block>
        <fo:inline>•</fo:inline>
      </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>
        Item 2 Line 1
      </fo:block>
      <fo:block>
        Item 2 Line 2
      </fo:block>
      <fo:block>
        Item 2 Line 3
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
</fo:list-block>

It renders to PDF correctly as

* Item 1 Line 1
  Item 1 Line 2
  Item 1 Line 3
* Item 2 Line 1
  Item 2 Line 2
  Item 2 Line 3

but in RTF it appears as

* Item 1 Line 1
* Item 1 Line 2
* Item 1 Line 3
* Item 2 Line 1
* Item 2 Line 2
* Item 2 Line 3
Comment 1 Jerry Fan 2010-12-21 07:59:49 UTC
Created attachment 26433 [details]
Fixed the Problem with list containing multi-line items in RTF 

I have tried it on my fo file and it works
Comment 2 Jerry Fan 2010-12-21 08:05:08 UTC
Created attachment 26434 [details]
My fo file

The orignal fo file
Comment 3 Jerry Fan 2010-12-21 08:07:01 UTC
Created attachment 26435 [details]
The generated rtf file

The generated rtf file
Comment 4 Jerry Fan 2010-12-21 08:08:30 UTC
The uploaded patch does work for me.
Comment 5 Glenn Adams 2012-04-01 13:42:46 UTC
batch transition to closed for remaining resolved bugs