poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51483] XSSF locking of specific features not working
Date Thu, 07 Jul 2011 07:55:14 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51483

Alex Panayotopoulos <Alex.Panayotopoulos@vianet.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|                            |All

--- Comment #1 from Alex Panayotopoulos <Alex.Panayotopoulos@vianet.co.uk> 2011-07-07
07:55:14 UTC ---
N.B. I have discovered a work-around, and that is to follow the call to
s.enableLocking() with a call to s.getCTWorksheet().getSheetProtection(); this
yields a CTSheetProtection object. CTSheetProtection is not documented in the
official JavaDoc API, but has methods

setSelectLockedCells(boolean);
setSelectUnlockedCells(boolean);
setFormatCells(boolean);
setFormatColumns(boolean);
setFormatRows(boolean);
setInsertColumns(boolean);
setInsertRows(boolean);
setInsertHyperlinks(boolean);
setDeleteColumns(boolean);
setDeleteRows(boolean);
setSort(boolean);
setAutoFilter(boolean);
setPivotTables(boolean);
setObjects(boolean);
setScenarios(boolean);

All of which take "true" to enable locking of this aspect, and "false" to
disable locking.

Hope this comes in handy for anybody who stumbles across this issue!

-- 
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message