https://issues.apache.org/bugzilla/show_bug.cgi?id=49878

Yegor Kozlov <[email protected]> changed:

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

--- Comment #3 from Yegor Kozlov <[email protected]> 2010-09-05 09:09:48 EDT ---
Fixed in r992772.

Nick is right, it was a off-by-one issue. On the low level, the 'hidden'
argument is converted into a XmlBeans enum and in XmlBeans ordinals of enums
start with 1. 

I also improved the API. Passing an anonymous constant as the second argument
of setSheetHidden(int sheetIx, int hidden) is not good. 

I added three constants to the Workbook interface:

Workbook.SHEET_STATE_VISIBLE
Workbook.SHEET_STATE_HIDDEN
Workbook.SHEET_STATE_VERY_HIDDEN

the correct usage of setSheetHidden is as  follows:

workbook.setSheetHidden(sheetIx, Workbook.SHEET_STATE_HIDDEN).

The method throws IllegalArgumentException if the view state is invalid.


Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]

Reply via email to