Bug 44292

Summary: [PATCH] TableCell skip its last Paragraphs
Product: POI Reporter: Jean-Philippe Gagnon <jgagnon>
Component: HWPFAssignee: POI Developers List <dev>
Severity: normal CC: domenico.napoletano
Priority: P2    
Version: 3.0-FINAL   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: class TableRow patched
Test program to demonstrate the bug
test word document

Description Jean-Philippe Gagnon 2008-01-24 08:54:55 UTC
TableCells created in the TableRow contructor have a paragraph missing. So when
parsing a cell with more than one Paragraph, the last one is skipped.

Fix in TableRow should call TableCell constructor with "end+1" instead of "end"

_cells[cellIndex] = new TableCell(start, end, this, levelNum,                  
Comment 1 Jean-Philippe Gagnon 2008-01-24 08:58:53 UTC
Created attachment 21422 [details]
class TableRow patched

second parameter of the call to the TableCell constructor is replaced with
Comment 2 Nick Burch 2008-01-24 08:59:23 UTC
Thanks for this. Any chance you could upload a file that shows the problem, and
post a few lines of code that shows it now works properly (ideally as a unit
test, but otherwise just some consise code that shows it we can generate a unit
test from)
Comment 3 Jean-Philippe Gagnon 2008-01-24 09:27:24 UTC
Created attachment 21423 [details]
Test program  to demonstrate the bug

simple main file to demonstrate the bug, path to the file must be adjusted
Comment 4 Jean-Philippe Gagnon 2008-01-24 09:28:40 UTC
Created attachment 21424 [details]
test word document 

Word document used by the test program TableRowTest.java
Comment 5 Nick Burch 2008-01-25 03:53:01 UTC
Thanks for this fix and test, applied to svn
Comment 6 dnapoletano 2008-06-10 00:20:59 UTC
Even reverting end + 1 with end (fixing bug 45062) table cell content is retrieved correctly: should revert be committed?
Comment 7 Nick Burch 2008-09-21 12:31:50 UTC
Just re-tested against svn trunk, and hwpf behaves properly