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 protectedXSSFSheetProtection(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetProtection protection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAutoFilter()booleanisDeleteColumns()booleanisDeleteRows()booleanisFormatCells()booleanisFormatColumns()booleanisFormatRows()booleanisInsertColumns()booleanisInsertHyperlinks()booleanisInsertRows()booleanisObjects()booleanisPivotTables()booleanisScenarios()booleanisSelectLockedCells()booleanisSelectUnlockedCells()booleanisSort()voidsetAutoFilter(boolean flag)Enable Autofilters locking.voidsetDeleteColumns(boolean flag)Enable Deleting columns locking.voidsetDeleteRows(boolean flag)Enable Deleting rows locking.voidsetFormatCells(boolean flag)Enable Formatting cells locking.voidsetFormatColumns(boolean flag)Enable Formatting columns locking.voidsetFormatRows(boolean flag)Enable Formatting rows locking.voidsetInsertColumns(boolean flag)Enable Inserting columns locking.voidsetInsertHyperlinks(boolean flag)Enable Inserting hyperlinks locking.voidsetInsertRows(boolean flag)Enable Inserting rows locking.voidsetObjects(boolean flag)Enable Objects locking.voidsetPivotTables(boolean flag)Enable Pivot Tables locking.voidsetScenarios(boolean flag)Enable Scenarios locking.voidsetSelectLockedCells(boolean flag)Enable Selection of locked cells locking.voidsetSelectUnlockedCells(boolean flag)Enable Selection of unlocked cells locking.voidsetSort(boolean flag)Enable Sort locking.
-
-
-
Method Detail
-
isAutoFilter
public boolean isAutoFilter()
- Specified by:
isAutoFilterin interfaceSheetProtection- Returns:
- true when Autofilters are locked and the sheet is protected.
-
isDeleteColumns
public boolean isDeleteColumns()
- Specified by:
isDeleteColumnsin interfaceSheetProtection- Returns:
- true when Deleting columns is locked and the sheet is protected.
-
isDeleteRows
public boolean isDeleteRows()
- Specified by:
isDeleteRowsin interfaceSheetProtection- Returns:
- true when Deleting rows is locked and the sheet is protected.
-
isFormatCells
public boolean isFormatCells()
- Specified by:
isFormatCellsin interfaceSheetProtection- Returns:
- true when Formatting cells is locked and the sheet is protected.
-
isFormatColumns
public boolean isFormatColumns()
- Specified by:
isFormatColumnsin interfaceSheetProtection- Returns:
- true when Formatting columns is locked and the sheet is protected.
-
isFormatRows
public boolean isFormatRows()
- Specified by:
isFormatRowsin interfaceSheetProtection- Returns:
- true when Formatting rows is locked and the sheet is protected.
-
isInsertColumns
public boolean isInsertColumns()
- Specified by:
isInsertColumnsin interfaceSheetProtection- Returns:
- true when Inserting columns is locked and the sheet is protected.
-
isInsertHyperlinks
public boolean isInsertHyperlinks()
- Specified by:
isInsertHyperlinksin interfaceSheetProtection- Returns:
- true when Inserting hyperlinks is locked and the sheet is protected.
-
isInsertRows
public boolean isInsertRows()
- Specified by:
isInsertRowsin interfaceSheetProtection- Returns:
- true when Inserting rows is locked and the sheet is protected.
-
isPivotTables
public boolean isPivotTables()
- Specified by:
isPivotTablesin interfaceSheetProtection- Returns:
- true when Pivot tables are locked and the sheet is protected.
-
isSort
public boolean isSort()
- Specified by:
isSortin interfaceSheetProtection- Returns:
- true when Sorting is locked and the sheet is protected.
-
isObjects
public boolean isObjects()
- Specified by:
isObjectsin interfaceSheetProtection- Returns:
- true when Objects are locked and the sheet is protected.
-
isScenarios
public boolean isScenarios()
- Specified by:
isScenariosin interfaceSheetProtection- Returns:
- true when Scenarios are locked and the sheet is protected.
-
isSelectLockedCells
public boolean isSelectLockedCells()
- Specified by:
isSelectLockedCellsin interfaceSheetProtection- Returns:
- true when Selection of locked cells is locked and the sheet is protected.
-
isSelectUnlockedCells
public boolean isSelectUnlockedCells()
- Specified by:
isSelectUnlockedCellsin 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:
setAutoFilterin interfaceSheetProtection
-
setDeleteColumns
public void setDeleteColumns(boolean flag)
Enable Deleting columns locking. This does not modify sheet protection status.- Specified by:
setDeleteColumnsin interfaceSheetProtection
-
setDeleteRows
public void setDeleteRows(boolean flag)
Enable Deleting rows locking. This does not modify sheet protection status.- Specified by:
setDeleteRowsin interfaceSheetProtection
-
setFormatCells
public void setFormatCells(boolean flag)
Enable Formatting cells locking. This does not modify sheet protection status.- Specified by:
setFormatCellsin interfaceSheetProtection
-
setFormatColumns
public void setFormatColumns(boolean flag)
Enable Formatting columns locking. This does not modify sheet protection status.- Specified by:
setFormatColumnsin interfaceSheetProtection
-
setFormatRows
public void setFormatRows(boolean flag)
Enable Formatting rows locking. This does not modify sheet protection status.- Specified by:
setFormatRowsin interfaceSheetProtection
-
setInsertColumns
public void setInsertColumns(boolean flag)
Enable Inserting columns locking. This does not modify sheet protection status.- Specified by:
setInsertColumnsin interfaceSheetProtection
-
setInsertHyperlinks
public void setInsertHyperlinks(boolean flag)
Enable Inserting hyperlinks locking. This does not modify sheet protection status.- Specified by:
setInsertHyperlinksin interfaceSheetProtection
-
setInsertRows
public void setInsertRows(boolean flag)
Enable Inserting rows locking. This does not modify sheet protection status.- Specified by:
setInsertRowsin interfaceSheetProtection
-
setPivotTables
public void setPivotTables(boolean flag)
Enable Pivot Tables locking. This does not modify sheet protection status.- Specified by:
setPivotTablesin interfaceSheetProtection
-
setSort
public void setSort(boolean flag)
Enable Sort locking. This does not modify sheet protection status.- Specified by:
setSortin interfaceSheetProtection
-
setObjects
public void setObjects(boolean flag)
Enable Objects locking. This does not modify sheet protection status.- Specified by:
setObjectsin interfaceSheetProtection
-
setScenarios
public void setScenarios(boolean flag)
Enable Scenarios locking. This does not modify sheet protection status.- Specified by:
setScenariosin interfaceSheetProtection
-
setSelectLockedCells
public void setSelectLockedCells(boolean flag)
Enable Selection of locked cells locking. This does not modify sheet protection status.- Specified by:
setSelectLockedCellsin interfaceSheetProtection
-
setSelectUnlockedCells
public void setSelectUnlockedCells(boolean flag)
Enable Selection of unlocked cells locking. This does not modify sheet protection status.- Specified by:
setSelectUnlockedCellsin interfaceSheetProtection
-
-