Package org.apache.poi.xssf.usermodel
Class XSSFSheetProtection
- java.lang.Object
-
- org.apache.poi.xssf.usermodel.XSSFSheetProtection
-
- All Implemented Interfaces:
SheetProtection
public class XSSFSheetProtection extends Object implements SheetProtection
zss-576: enhanced protection. Very wired way to present "checked" in sheet protection dialog in xlsx file. + sheet protected: + selectLockedCells: NA or false -> checked; true -> unchecked + selectUnlockedCells: NA or false -> checked; true -> unchecked + scenarios: NA or false -> checked; true -> unchecked + objects: NA or false -> checked; true -> unchecked + other Xxx: false -> checked; NA or true -> unchecked + sheet unprotected: + selectLockedCells: NA or false -> checked; true -> unchecked + selectUnlockedCells: NA or false -> checked; true -> unchecked + scenarios: NA, true, or false -> unchecked + objects: NA, true, or false -> unchecked + other Xxx: false -> checked; NA or true -> unchecked- Author:
- henri
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XSSFSheetProtection(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetProtection protection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAutoFilter()
boolean
isDeleteColumns()
boolean
isDeleteRows()
boolean
isFormatCells()
boolean
isFormatColumns()
boolean
isFormatRows()
boolean
isInsertColumns()
boolean
isInsertHyperlinks()
boolean
isInsertRows()
boolean
isObjects()
boolean
isPivotTables()
boolean
isScenarios()
boolean
isSelectLockedCells()
boolean
isSelectUnlockedCells()
boolean
isSort()
void
setAutoFilter(boolean flag)
Enable Autofilters locking.void
setDeleteColumns(boolean flag)
Enable Deleting columns locking.void
setDeleteRows(boolean flag)
Enable Deleting rows locking.void
setFormatCells(boolean flag)
Enable Formatting cells locking.void
setFormatColumns(boolean flag)
Enable Formatting columns locking.void
setFormatRows(boolean flag)
Enable Formatting rows locking.void
setInsertColumns(boolean flag)
Enable Inserting columns locking.void
setInsertHyperlinks(boolean flag)
Enable Inserting hyperlinks locking.void
setInsertRows(boolean flag)
Enable Inserting rows locking.void
setObjects(boolean flag)
Enable Objects locking.void
setPivotTables(boolean flag)
Enable Pivot Tables locking.void
setScenarios(boolean flag)
Enable Scenarios locking.void
setSelectLockedCells(boolean flag)
Enable Selection of locked cells locking.void
setSelectUnlockedCells(boolean flag)
Enable Selection of unlocked cells locking.void
setSort(boolean flag)
Enable Sort locking.
-
-
-
Method Detail
-
isAutoFilter
public boolean isAutoFilter()
- Specified by:
isAutoFilter
in interfaceSheetProtection
- Returns:
- true when Autofilters are locked and the sheet is protected.
-
isDeleteColumns
public boolean isDeleteColumns()
- Specified by:
isDeleteColumns
in interfaceSheetProtection
- Returns:
- true when Deleting columns is locked and the sheet is protected.
-
isDeleteRows
public boolean isDeleteRows()
- Specified by:
isDeleteRows
in interfaceSheetProtection
- Returns:
- true when Deleting rows is locked and the sheet is protected.
-
isFormatCells
public boolean isFormatCells()
- Specified by:
isFormatCells
in interfaceSheetProtection
- Returns:
- true when Formatting cells is locked and the sheet is protected.
-
isFormatColumns
public boolean isFormatColumns()
- Specified by:
isFormatColumns
in interfaceSheetProtection
- Returns:
- true when Formatting columns is locked and the sheet is protected.
-
isFormatRows
public boolean isFormatRows()
- Specified by:
isFormatRows
in interfaceSheetProtection
- Returns:
- true when Formatting rows is locked and the sheet is protected.
-
isInsertColumns
public boolean isInsertColumns()
- Specified by:
isInsertColumns
in interfaceSheetProtection
- Returns:
- true when Inserting columns is locked and the sheet is protected.
-
isInsertHyperlinks
public boolean isInsertHyperlinks()
- Specified by:
isInsertHyperlinks
in interfaceSheetProtection
- Returns:
- true when Inserting hyperlinks is locked and the sheet is protected.
-
isInsertRows
public boolean isInsertRows()
- Specified by:
isInsertRows
in interfaceSheetProtection
- Returns:
- true when Inserting rows is locked and the sheet is protected.
-
isPivotTables
public boolean isPivotTables()
- Specified by:
isPivotTables
in interfaceSheetProtection
- Returns:
- true when Pivot tables are locked and the sheet is protected.
-
isSort
public boolean isSort()
- Specified by:
isSort
in interfaceSheetProtection
- Returns:
- true when Sorting is locked and the sheet is protected.
-
isObjects
public boolean isObjects()
- Specified by:
isObjects
in interfaceSheetProtection
- Returns:
- true when Objects are locked and the sheet is protected.
-
isScenarios
public boolean isScenarios()
- Specified by:
isScenarios
in interfaceSheetProtection
- Returns:
- true when Scenarios are locked and the sheet is protected.
-
isSelectLockedCells
public boolean isSelectLockedCells()
- Specified by:
isSelectLockedCells
in interfaceSheetProtection
- Returns:
- true when Selection of locked cells is locked and the sheet is protected.
-
isSelectUnlockedCells
public boolean isSelectUnlockedCells()
- Specified by:
isSelectUnlockedCells
in interfaceSheetProtection
- Returns:
- true when Selection of unlocked cells is locked and the sheet is protected.
-
setAutoFilter
public void setAutoFilter(boolean flag)
Enable Autofilters locking. This does not modify sheet protection status.- Specified by:
setAutoFilter
in interfaceSheetProtection
-
setDeleteColumns
public void setDeleteColumns(boolean flag)
Enable Deleting columns locking. This does not modify sheet protection status.- Specified by:
setDeleteColumns
in interfaceSheetProtection
-
setDeleteRows
public void setDeleteRows(boolean flag)
Enable Deleting rows locking. This does not modify sheet protection status.- Specified by:
setDeleteRows
in interfaceSheetProtection
-
setFormatCells
public void setFormatCells(boolean flag)
Enable Formatting cells locking. This does not modify sheet protection status.- Specified by:
setFormatCells
in interfaceSheetProtection
-
setFormatColumns
public void setFormatColumns(boolean flag)
Enable Formatting columns locking. This does not modify sheet protection status.- Specified by:
setFormatColumns
in interfaceSheetProtection
-
setFormatRows
public void setFormatRows(boolean flag)
Enable Formatting rows locking. This does not modify sheet protection status.- Specified by:
setFormatRows
in interfaceSheetProtection
-
setInsertColumns
public void setInsertColumns(boolean flag)
Enable Inserting columns locking. This does not modify sheet protection status.- Specified by:
setInsertColumns
in interfaceSheetProtection
-
setInsertHyperlinks
public void setInsertHyperlinks(boolean flag)
Enable Inserting hyperlinks locking. This does not modify sheet protection status.- Specified by:
setInsertHyperlinks
in interfaceSheetProtection
-
setInsertRows
public void setInsertRows(boolean flag)
Enable Inserting rows locking. This does not modify sheet protection status.- Specified by:
setInsertRows
in interfaceSheetProtection
-
setPivotTables
public void setPivotTables(boolean flag)
Enable Pivot Tables locking. This does not modify sheet protection status.- Specified by:
setPivotTables
in interfaceSheetProtection
-
setSort
public void setSort(boolean flag)
Enable Sort locking. This does not modify sheet protection status.- Specified by:
setSort
in interfaceSheetProtection
-
setObjects
public void setObjects(boolean flag)
Enable Objects locking. This does not modify sheet protection status.- Specified by:
setObjects
in interfaceSheetProtection
-
setScenarios
public void setScenarios(boolean flag)
Enable Scenarios locking. This does not modify sheet protection status.- Specified by:
setScenarios
in interfaceSheetProtection
-
setSelectLockedCells
public void setSelectLockedCells(boolean flag)
Enable Selection of locked cells locking. This does not modify sheet protection status.- Specified by:
setSelectLockedCells
in interfaceSheetProtection
-
setSelectUnlockedCells
public void setSelectUnlockedCells(boolean flag)
Enable Selection of unlocked cells locking. This does not modify sheet protection status.- Specified by:
setSelectUnlockedCells
in interfaceSheetProtection
-
-