adding setLocked()

git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@146340 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Xavier Noguer Gallego 2003-12-12 21:05:02 +00:00
parent 0e24b713e5
commit d1c255193b
1 changed files with 12 additions and 2 deletions

View File

@ -270,7 +270,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
$this->_num_format = 0;
$this->_hidden = 0;
$this->_locked = 1;
$this->_locked = 0;
$this->_text_h_align = 0;
$this->_text_wrap = 0;
@ -335,7 +335,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
$atr_pat = (($this->_fg_color != 0x40) ||
($this->_bg_color != 0x41) ||
$this->_pattern)?1:0;
$atr_prot = 0;
$atr_prot = $this->_locked | $this->_hidden;
// Zero the default border colour if the border has not been set.
if ($this->_bottom == 0) {
@ -1000,6 +1000,16 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
$this->_font_script = $script;
}
/**
* Locks a cell.
*
* @access public
*/
function setLocked()
{
$this->_locked = 1;
}
/**
* Unlocks a cell. Useful for unprotecting particular cells of a protected sheet.
*