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

             Bug #: 51643
           Summary: XWPFTable.createRow() uses first row as a template
           Product: POI
           Version: 3.8-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


Currently createRow method of XWPFTableRow uses first row as template (number
of columns). This looks to be a bit confusing when adding a new row in table,
since it is not like previous one.

I suggest to apply following modification to XWPFTables class -- columns'
number is taken from last row and not from the first one.

    public XWPFTableRow createRow() {
        int sizeCol = ctTbl.sizeOfTrArray() > 0 ?
ctTbl.getTrArray(ctTbl.sizeOfTrArray() - 1).sizeOfTcArray() : 0;
        ...
    }

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to