See OOO excelfileformat.pdf sec 4.18.2 'Sheet Protection in a Workbook (BIFF5-BIFF8)'
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProtectRecord | |
| private PasswordRecord | |
| private ProtectRecord | |
| private ScenarioProtectRecord |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addRecords(RecordStream rs)
This method reads WorksheetProtectionBlock records from the supplied RecordStream until the first non-WorksheetProtectionBlock record is encountered. |
| private void | |
| private static ObjectProtectRecord | |
| private static PasswordRecord | |
| private static ScenarioProtectRecord | |
| public ScenarioProtectRecord | |
| private PasswordRecord | Returns: the PasswordRecord. If one is not contained in the sheet, then one is created.
|
| public int | |
| public PasswordRecord | |
| private ProtectRecord | |
| public static boolean | Returns: true if the specified Record sid is one belonging to
the 'Page Settings Block'.
|
| public boolean | |
| public boolean | |
| public boolean | |
| public void | protectSheet(String
to set. Pass password, boolean null to remove all protectionare protected shouldProtectObjects, boolean are protected shouldProtectScenarios)protect a spreadsheet with a password (not encrypted, just sets protect flags and the password. |
| private boolean | |
| public void | visitContainedRecords(RecordAggregate.
The visitor to use for callbacks while walking this object rvImplements abstract org. Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file. |
| private static void |
| _objectProtectRecord | back to summary |
|---|---|
| private ObjectProtectRecord _objectProtectRecord | |
| _passwordRecord | back to summary |
|---|---|
| private PasswordRecord _passwordRecord | |
| _protectRecord | back to summary |
|---|---|
| private ProtectRecord _protectRecord | |
| _scenarioProtectRecord | back to summary |
|---|---|
| private ScenarioProtectRecord _scenarioProtectRecord | |
| WorksheetProtectionBlock | back to summary |
|---|---|
| public WorksheetProtectionBlock() Creates an empty WorksheetProtectionBlock | |
| addRecords | back to summary |
|---|---|
| public void addRecords(RecordStream rs) This method reads WorksheetProtectionBlock records from the supplied RecordStream until the first non-WorksheetProtectionBlock record is encountered. As each record is read, it is incorporated into this WorksheetProtectionBlock. As per the OOO documentation, the protection block records can be expected to be written together (with no intervening records), but earlier versions of POI (prior to Jun 2009) didn't do this. Workbooks with sheet protection created by those earlier POI versions seemed to be valid (Excel opens them OK). So PO allows continues to support reading of files with non continuous worksheet protection blocks. Note - when POI writes out this WorksheetProtectionBlock, the records will always be written in one consolidated block (in the standard ordering) regardless of how scattered the records were when they were originally read. | |
| checkNotPresent | back to summary |
|---|---|
| private void checkNotPresent(Record rec) | |
| createObjectProtect | back to summary |
|---|---|
| private static ObjectProtectRecord createObjectProtect() creates an ObjectProtect record with protect set to false. | |
| createPassword | back to summary |
|---|---|
| private static PasswordRecord createPassword() creates a Password record with password set to 0x0000. | |
| createScenarioProtect | back to summary |
|---|---|
| private static ScenarioProtectRecord createScenarioProtect() creates a ScenarioProtect record with protect set to false. | |
| getHCenter | back to summary |
|---|---|
| public ScenarioProtectRecord getHCenter() | |
| getPassword | back to summary |
|---|---|
private PasswordRecord getPassword()
| |
| getPasswordHash | back to summary |
|---|---|
| public int getPasswordHash() | |
| getPasswordRecord | back to summary |
|---|---|
| public PasswordRecord getPasswordRecord() | |
| getProtect | back to summary |
|---|---|
private ProtectRecord getProtect()
| |
| isComponentRecord | back to summary |
|---|---|
public static boolean isComponentRecord(int sid)
| |
| isObjectProtected | back to summary |
|---|---|
| public boolean isObjectProtected() | |
| isScenarioProtected | back to summary |
|---|---|
| public boolean isScenarioProtected() | |
| isSheetProtected | back to summary |
|---|---|
| public boolean isSheetProtected() | |
| protectSheet | back to summary |
|---|---|
| public void protectSheet(String password, boolean shouldProtectObjects, boolean shouldProtectScenarios) protect a spreadsheet with a password (not encrypted, just sets protect flags and the password.
| |
| readARecord | back to summary |
|---|---|
| private boolean readARecord(RecordStream rs) | |
| visitContainedRecords | back to summary |
|---|---|
| public void visitContainedRecords(RecordAggregate. Implements abstract org. Doc from org. Visit each of the atomic BIFF records contained in this RecordAggregate in the order
that they should be written to file. Implementors may or may not return the actual
| |
| visitIfPresent | back to summary |
|---|---|
| private static void visitIfPresent(Record r, RecordAggregate. | |