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 2020/12/22 10:52:43 UTC
[Bug 65023] New: addNewCol is untested and does not work
https://bz.apache.org/bugzilla/show_bug.cgi?id=65023
Bug ID: 65023
Summary: addNewCol is untested and does not work
Product: POI
Version: unspecified
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: XWPF
Assignee: dev@poi.apache.org
Reporter: pmuldoon@umich.edu
Target Milestone: ---
In src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java, the method
addNewCol() is unused and also untested in the Apache POI project. In the
course of writing a unit test for it, I discovered that the implementation does
not work as it creates new rows instead of using the existing ones.
I am writing a fix for it and will submit a PR via GitHub. I will add a comment
to this report once I have done so - I need to submit this report first in
order to get an issue number.
Test to reproduce the issue:
@Test
public void testAddNewCol() throws IOException {
XWPFDocument doc = new XWPFDocument();
XWPFTable table = doc.createTable(2, 4);
table.addNewCol();
XWPFTableRow lastRow = table.tableRows.get(table.tableRows.size() - 1);
int expected = 5;
int actual = lastRow.getTableCells().size();
assertEquals(expected, actual);
doc.close();
}
--
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
[Bug 65023] addNewCol is untested and does not work
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65023
--- Comment #2 from shubhu shubhu <ge...@ailiking.com> ---
(In reply to Paula Muldoon from comment #1)
> Pull request on GitHub: https://github.com/apache/poi/pull/212
https://technicaldude.tech/
--
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
[Bug 65023] addNewCol is untested and does not work
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65023
PJ Fanning <fa...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
Merged Github PR using r1884794
--
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
[Bug 65023] addNewCol is untested and does not work
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65023
--- Comment #1 from Paula Muldoon <pm...@umich.edu> ---
Pull request on GitHub: https://github.com/apache/poi/pull/212
--
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