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 2016/09/29 12:39:21 UTC

[Bug 60187] New: RegionUtil should use new enum style classes

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

            Bug ID: 60187
           Summary: RegionUtil should use new enum style classes
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: camusg@free.fr

RegionUtil has to change some methods to switch old int/short value to new
enums classes (like BorderStyle, HorizontalAlignment, FillPatternType...)

Actually, with version 3.15, we have some output lines like :
BorderStyle short usage

I use RegionUtil with merged zones, to put some border, with the following code
:
protected static void addMergedRegion(Sheet sheet, int iRowMin, int iRowMax,
int iColMin, int iColMax) {
    CellRangeAddress cellZone = new CellRangeAddress(iRowMin, iRowMax, iColMin,
iColMax);
    sheet.addMergedRegion(cellZone);

    Cell cell = sheet.getRow(iRowMin).getCell(iColMin);
    if (cell != null) {
       
RegionUtil.setBorderBottom(cell.getCellStyle().getBorderBottomEnum().getCode(),
cellZone, sheet);
       
RegionUtil.setBorderTop(cell.getCellStyle().getBorderTopEnum().getCode(),
cellZone, sheet);
       
RegionUtil.setBorderLeft(cell.getCellStyle().getBorderLeftEnum().getCode(),
cellZone, sheet);
       
RegionUtil.setBorderRight(cell.getCellStyle().getBorderRightEnum().getCode(),
cellZone, sheet);

       
RegionUtil.setBottomBorderColor(cell.getCellStyle().getBottomBorderColor(),
cellZone, sheet);
        RegionUtil.setTopBorderColor(cell.getCellStyle().getTopBorderColor(),
cellZone, sheet);
        RegionUtil.setLeftBorderColor(cell.getCellStyle().getLeftBorderColor(),
cellZone, sheet);
       
RegionUtil.setRightBorderColor(cell.getCellStyle().getRightBorderColor(),
cellZone, sheet);
    }
}


Maybe, there is a new way to do the same thing, but I don't find it.

I have submitted a question here :
http://stackoverflow.com/questions/39765675/

-- 
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 60187] RegionUtil should use new enum style classes

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

--- Comment #2 from Javen O'Neal <on...@apache.org> ---
And r1762859 so that the new methods don't log a BorderStyle short usage
warning in the POI logger.

-- 
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 60187] RegionUtil should use new enum style classes

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

Javen O'Neal <on...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Blocks|                            |59836
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Javen O'Neal <on...@apache.org> ---
Added in r1762856.

I believe only BorderStyle applies to setBorderLeft|Right|Top|Bottom. Fill
pattern and text alignment in a cell is currently not handled by
RegionUtil.setBorderLeft|Right|Top|Bottom.

See bug 58787 for some potential future changes to work with multi-cell
regions.

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