https://bz.apache.org/bugzilla/show_bug.cgi?id=65331

            Bug ID: 65331
           Summary: XWPFTable.setTableAlignment(TableRowAlign tra) wrong
                    implementation (mapping between Enums)
           Product: POI
           Version: 5.0.0-FINAL
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: XWPF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Wrong mapping of TableRowAlign LEFT(1), CENTER(2), RIGHT(3) into 
org.openxmlformats.schemas.wordprocessingml.x2006.main.STJcTable    
CENTER = 1; END = 2; LEFT = 3; RIGHT = 4; START = 5; leads to setting wrong
value for alignment of table in the document.

    // 1 = TableRowAlign.LEFT => center
    // 2 = TableRowAlign.CENTER => end
    // 3 = TableRowAlign.RIGHT => left
    // 4 => right
    // 5 => start

public void setTableAlignment(TableRowAlign tra) {
    CTTblPr tPr = getTblPr(true);
    CTJcTable jc = tPr.isSetJc() ? tPr.getJc() : tPr.addNewJc();
    jc.setVal(STJcTable.Enum.forInt(tra.getValue()));
}

-- 
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