Class 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 Detail

      • XSSFSheetProtection

        protected XSSFSheetProtection​(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetProtection protection)
    • Method Detail

      • isAutoFilter

        public boolean isAutoFilter()
        Specified by:
        isAutoFilter in interface SheetProtection
        Returns:
        true when Autofilters are locked and the sheet is protected.
      • isDeleteColumns

        public boolean isDeleteColumns()
        Specified by:
        isDeleteColumns in interface SheetProtection
        Returns:
        true when Deleting columns is locked and the sheet is protected.
      • isDeleteRows

        public boolean isDeleteRows()
        Specified by:
        isDeleteRows in interface SheetProtection
        Returns:
        true when Deleting rows is locked and the sheet is protected.
      • isFormatCells

        public boolean isFormatCells()
        Specified by:
        isFormatCells in interface SheetProtection
        Returns:
        true when Formatting cells is locked and the sheet is protected.
      • isFormatColumns

        public boolean isFormatColumns()
        Specified by:
        isFormatColumns in interface SheetProtection
        Returns:
        true when Formatting columns is locked and the sheet is protected.
      • isFormatRows

        public boolean isFormatRows()
        Specified by:
        isFormatRows in interface SheetProtection
        Returns:
        true when Formatting rows is locked and the sheet is protected.
      • isInsertColumns

        public boolean isInsertColumns()
        Specified by:
        isInsertColumns in interface SheetProtection
        Returns:
        true when Inserting columns is locked and the sheet is protected.
      • isInsertHyperlinks

        public boolean isInsertHyperlinks()
        Specified by:
        isInsertHyperlinks in interface SheetProtection
        Returns:
        true when Inserting hyperlinks is locked and the sheet is protected.
      • isInsertRows

        public boolean isInsertRows()
        Specified by:
        isInsertRows in interface SheetProtection
        Returns:
        true when Inserting rows is locked and the sheet is protected.
      • isPivotTables

        public boolean isPivotTables()
        Specified by:
        isPivotTables in interface SheetProtection
        Returns:
        true when Pivot tables are locked and the sheet is protected.
      • isSort

        public boolean isSort()
        Specified by:
        isSort in interface SheetProtection
        Returns:
        true when Sorting is locked and the sheet is protected.
      • isObjects

        public boolean isObjects()
        Specified by:
        isObjects in interface SheetProtection
        Returns:
        true when Objects are locked and the sheet is protected.
      • isScenarios

        public boolean isScenarios()
        Specified by:
        isScenarios in interface SheetProtection
        Returns:
        true when Scenarios are locked and the sheet is protected.
      • isSelectLockedCells

        public boolean isSelectLockedCells()
        Specified by:
        isSelectLockedCells in interface SheetProtection
        Returns:
        true when Selection of locked cells is locked and the sheet is protected.
      • isSelectUnlockedCells

        public boolean isSelectUnlockedCells()
        Specified by:
        isSelectUnlockedCells in interface SheetProtection
        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 interface SheetProtection
      • setDeleteColumns

        public void setDeleteColumns​(boolean flag)
        Enable Deleting columns locking. This does not modify sheet protection status.
        Specified by:
        setDeleteColumns in interface SheetProtection
      • setDeleteRows

        public void setDeleteRows​(boolean flag)
        Enable Deleting rows locking. This does not modify sheet protection status.
        Specified by:
        setDeleteRows in interface SheetProtection
      • setFormatCells

        public void setFormatCells​(boolean flag)
        Enable Formatting cells locking. This does not modify sheet protection status.
        Specified by:
        setFormatCells in interface SheetProtection
      • setFormatColumns

        public void setFormatColumns​(boolean flag)
        Enable Formatting columns locking. This does not modify sheet protection status.
        Specified by:
        setFormatColumns in interface SheetProtection
      • setFormatRows

        public void setFormatRows​(boolean flag)
        Enable Formatting rows locking. This does not modify sheet protection status.
        Specified by:
        setFormatRows in interface SheetProtection
      • setInsertColumns

        public void setInsertColumns​(boolean flag)
        Enable Inserting columns locking. This does not modify sheet protection status.
        Specified by:
        setInsertColumns in interface SheetProtection
      • setInsertHyperlinks

        public void setInsertHyperlinks​(boolean flag)
        Enable Inserting hyperlinks locking. This does not modify sheet protection status.
        Specified by:
        setInsertHyperlinks in interface SheetProtection
      • setInsertRows

        public void setInsertRows​(boolean flag)
        Enable Inserting rows locking. This does not modify sheet protection status.
        Specified by:
        setInsertRows in interface SheetProtection
      • setPivotTables

        public void setPivotTables​(boolean flag)
        Enable Pivot Tables locking. This does not modify sheet protection status.
        Specified by:
        setPivotTables in interface SheetProtection
      • setSort

        public void setSort​(boolean flag)
        Enable Sort locking. This does not modify sheet protection status.
        Specified by:
        setSort in interface SheetProtection
      • setObjects

        public void setObjects​(boolean flag)
        Enable Objects locking. This does not modify sheet protection status.
        Specified by:
        setObjects in interface SheetProtection
      • setScenarios

        public void setScenarios​(boolean flag)
        Enable Scenarios locking. This does not modify sheet protection status.
        Specified by:
        setScenarios in interface SheetProtection
      • setSelectLockedCells

        public void setSelectLockedCells​(boolean flag)
        Enable Selection of locked cells locking. This does not modify sheet protection status.
        Specified by:
        setSelectLockedCells in interface SheetProtection
      • setSelectUnlockedCells

        public void setSelectUnlockedCells​(boolean flag)
        Enable Selection of unlocked cells locking. This does not modify sheet protection status.
        Specified by:
        setSelectUnlockedCells in interface SheetProtection