https://bz.apache.org/bugzilla/show_bug.cgi?id=66360
Bug ID: 66360
Summary: Row Span borders render not correctly working with
RegionUtil
Product: POI
Version: 5.2.2-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: SS Common
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 38438
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38438&action=edit
Expected borders and reality
Hi there,
I'm facing an issue trying to set borders on an merged region applying a Row
Span. The version I uesd is 5.2.3 but not listed here.
the code used bellow :
if (!BorderStyle.NONE.equals(excelStyle.getBorderBottom())) {
RegionUtil.setBorderBottom(excelStyle.getBorderBottom(), mergedRegion,
excelSheet);
RegionUtil.setBottomBorderColor(excelStyle.getBottomBorderColor(),
mergedRegion, excelSheet);
}
if (!BorderStyle.NONE.equals(excelStyle.getBorderTop())) {
RegionUtil.setBorderTop(excelStyle.getBorderTop(), mergedRegion, excelSheet);
RegionUtil.setTopBorderColor(excelStyle.getTopBorderColor(), mergedRegion,
excelSheet);
}
if (!BorderStyle.NONE.equals(excelStyle.getBorderLeft())) {
RegionUtil.setBorderLeft(excelStyle.getBorderLeft(), mergedRegion,
excelSheet);
RegionUtil.setLeftBorderColor(excelStyle.getLeftBorderColor(), mergedRegion,
excelSheet);
}
if (!BorderStyle.NONE.equals(excelStyle.getBorderRight())) {
RegionUtil.setBorderRight(excelStyle.getBorderRight(), mergedRegion,
excelSheet);
RegionUtil.setRightBorderColor(excelStyle.getRightBorderColor(),
mergedRegion, excelSheet);
}
In my tests i go throughout all conditions, this works good for the Column
span, But for the Row span the behavior of the borders isn't the one I expected
(see the attachments).
The script of the code is this :
- I compute the XSSFCellStyle
- Then I apply the style to the current cell
- And finaly, if a span is defined on this cell, I create a CellRangeAddress,
add it to the merged regions and apply the borders with the code above.
I try differents scripts (create the merged region before applying styles...)
but the result is always the same as the attachment.
Is this a bug or I missused RegionUtil ?
Thanks.
--
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]