https://issues.apache.org/bugzilla/show_bug.cgi?id=55385
Bug ID: 55385
Summary: XSSFFont.setBoldweight(short) to 300 but getBoldweight
return 400
Product: POI
Version: 3.10-dev
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
execute the code:
Workbook workbook = new XSSFWorkbook();
Sheet createSheet = workbook.createSheet();
Row row = createSheet.createRow(0);
Cell cell = row.createCell(0);
CellStyle cellStyle = workbook.createCellStyle();
Font createFont = workbook.createFont();
createFont.setBoldweight((short)300);
cellStyle.setFont(createFont);
cell.setCellStyle(cellStyle);
short fontIndex = cell.getCellStyle().getFontIndex();
Font fontAt = workbook.getFontAt(fontIndex);
System.out.println(fontAt.getBoldweight());
the boldweight can't be set to 300. due to :
public short getBoldweight()
{
return getBold() ? BOLDWEIGHT_BOLD : BOLDWEIGHT_NORMAL;
}
org.apache.poi.xssf.usermodel.XSSFFont.getBoldweight()
is 400 or 700 only. if so, why provide the setBoldweight() to set any short
value?
--
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]