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 2021/05/25 18:51:29 UTC

[Bug 65331] New: XWPFTable.setTableAlignment(TableRowAlign tra) wrong implementation (mapping between Enums)

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: dev@poi.apache.org
          Reporter: kszymko@o2.pl
  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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65331] XWPFTable.setTableAlignment(TableRowAlign tra) wrong implementation (mapping between Enums)

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

PJ Fanning <fa...@yahoo.com> changed:

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

-- 
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 65331] XWPFTable.setTableAlignment(TableRowAlign tra) wrong implementation (mapping between Enums)

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

Sayi <sa...@163.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Sayi <sa...@163.com> ---
Thanks, the issue is fixed via r1890234, should be included in the upcoming
Apache POI 5.0.1.

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