text: public void ProtectSheet(String password, bool shouldProtectObjects,bool shouldProtectScenarios){if (password == null){_passwordRecord = null;_protectRecord = null;_objectProtectRecord = null;_scenarioProtectRecord = null;return;}ProtectRecord prec = this.Protect;PasswordRecord pass = this.Password;prec.Protect = true;pass.Password = (PasswordRecord.HashPassword(password));if (_objectProtectRecord == null && shouldProtectObjects){ObjectProtectRecord rec = CreateObjectProtect();rec.Protect = (true);_objectProtectRecord = rec;}if (_scenarioProtectRecord == null && shouldProtectScenarios){ScenarioProtectRecord srec = CreateScenarioProtect();srec.Protect = (true);_scenarioProtectRecord = srec;}}