Bug 49689 - Can't set the user style name on custom cell styles
Summary: Can't set the user style name on custom cell styles
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.7-dev
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2010-08-02 12:49 UTC by Nick Burch
Modified: 2010-08-03 11:36 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Nick Burch 2010-08-02 12:49:08 UTC
As reported on the mailing list at: http://mail-archives.apache.org/mod_mbox/poi-user/201007.mbox/%3C000901cb2fd1$7eb48060$7c1d8120$@studer@mirai-solutions.com%3E

HSSFWorkbook wb = ...
HSSFCellStyle cs = wb.createCellStyle();

However, when I try to do that I get an "Unable to set user specified style
names for built in styles!" exception. When I'm creating a new cell style, I
shouldn't be getting a built-in style, should I?
Comment 1 Nick Burch 2010-08-03 11:36:35 UTC
Should be fixed in r981930 - because all StyleRecords have the builtin flag set when created, we now also check the index to decide if they need to remain that way