You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/05/04 15:15:06 UTC

DO NOT REPLY [Bug 47147] New: XWPFTableCell.getCell() creates an unecessary Paragraph

https://issues.apache.org/bugzilla/show_bug.cgi?id=47147

           Summary: XWPFTableCell.getCell() creates an unecessary
                    Paragraph
           Product: POI
           Version: 3.5-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
        AssignedTo: dev@poi.apache.org
        ReportedBy: luzifer@internet.lu


XWPFTable table = doc.createTable(1,3);
XWPFTableRow row = table.getRow(0);
XWPFTableCell cell = row.getCell(1);
cell = row.getCell(1);
cell = row.getCell(1);
cell = row.getCell(1);
cell = row.getCell(1);
cell = row.getCell(1);
cell.setText("text");

The resulting cell will have mutltiple parapgraphs. 
But only one should be there with the specified text.

The first cell of the table has a similar bug. createTable adds an unecessary
paragraph too.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 47147] XWPFTableCell.getCell() creates an unecessary Paragraph

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47147

--- Comment #2 from Stefan Stern <st...@mind8.com> 2011-05-06 13:11:09 UTC ---
Created attachment 26963
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=26963
Fix issues with "setText".

Looking into the ECM-576 specification, an empty cell always comes with an
empty paragraph. Or, to use Word as reference, create an empty Word DOCX
document, add a table with 2 rows and 2 coloums, save the document and look
into the XML. You'll see that Word creates an empty Paragraph for each Cell. 

What was wrong in the XWPFCell class was the "setText" method. Fixed this
method and another bug in the contructor. There every row created was added to
the "rows" field twice. Once in "createRow" method and afterwards in the
constructor.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 47147] XWPFTableCell.getCell() creates an unecessary Paragraph

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47147

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Nick Burch <ni...@alfresco.com> 2011-05-27 14:48:09 UTC ---
Thanks, applied with tweaks in r1128331.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 47147] XWPFTableCell.getCell() creates an unecessary Paragraph

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47147

--- Comment #1 from Stefan Stern <st...@mind8.com> 2011-05-06 11:31:30 UTC ---
Patch in progress, coming soon.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org