private function PHPExcel_Writer_Excel5_Worksheet::_writeSheetProtection in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php \PHPExcel_Writer_Excel5_Worksheet::_writeSheetProtection()
* Write SHEETPROTECTION
1 call to PHPExcel_Writer_Excel5_Worksheet::_writeSheetProtection()
- PHPExcel_Writer_Excel5_Worksheet::close in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Worksheet.php - * Add data to the beginning of the workbook (note the reverse order) * and to the end of the workbook. * * @access public *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Worksheet.php, line 1584
Class
- PHPExcel_Writer_Excel5_Worksheet
- PHPExcel_Writer_Excel5_Worksheet
Code
private function _writeSheetProtection() {
// record identifier
$record = 0x867;
// prepare options
$options = (int) (!$this->_phpSheet
->getProtection()
->getObjects()) | (int) (!$this->_phpSheet
->getProtection()
->getScenarios()) << 1 | (int) (!$this->_phpSheet
->getProtection()
->getFormatCells()) << 2 | (int) (!$this->_phpSheet
->getProtection()
->getFormatColumns()) << 3 | (int) (!$this->_phpSheet
->getProtection()
->getFormatRows()) << 4 | (int) (!$this->_phpSheet
->getProtection()
->getInsertColumns()) << 5 | (int) (!$this->_phpSheet
->getProtection()
->getInsertRows()) << 6 | (int) (!$this->_phpSheet
->getProtection()
->getInsertHyperlinks()) << 7 | (int) (!$this->_phpSheet
->getProtection()
->getDeleteColumns()) << 8 | (int) (!$this->_phpSheet
->getProtection()
->getDeleteRows()) << 9 | (int) (!$this->_phpSheet
->getProtection()
->getSelectLockedCells()) << 10 | (int) (!$this->_phpSheet
->getProtection()
->getSort()) << 11 | (int) (!$this->_phpSheet
->getProtection()
->getAutoFilter()) << 12 | (int) (!$this->_phpSheet
->getProtection()
->getPivotTables()) << 13 | (int) (!$this->_phpSheet
->getProtection()
->getSelectUnlockedCells()) << 14;
// record data
$recordData = pack('vVVCVVvv', 0x867, 0x0, 0x0, 0x0, 0x1000200, 0xffffffff, $options, 0x0);
$length = strlen($recordData);
$header = pack('vv', $record, $length);
$this
->_append($header . $recordData);
}