30 if (!defined(
'PHPEXCEL_ROOT')) {
34 define(
'PHPEXCEL_ROOT', dirname(__FILE__) .
'/../../');
38 require_once PHPEXCEL_ROOT .
'PHPExcel/IComparable.php';
96 $this->_isSupervisor = $isSupervisor;
111 $this->_parent = $parent;
133 return $this->_parent->getSharedComponent()->getProtection();
143 return $this->_parent->getActiveSheet();
176 return array(
'protection' => $array);
191 if (is_array($pStyles)) {
192 if ($this->_isSupervisor) {
195 if (array_key_exists(
'locked', $pStyles)) {
198 if (array_key_exists(
'hidden', $pStyles)) {
203 throw new Exception(
"Invalid style array passed.");
214 if ($this->_isSupervisor) {
226 public function setLocked($pValue = self::PROTECTION_INHERIT) {
227 if ($this->_isSupervisor) {
228 $styleArray = $this->
getStyleArray(array(
'locked' => $pValue));
231 $this->_locked = $pValue;
242 if ($this->_isSupervisor) {
254 public function setHidden($pValue = self::PROTECTION_INHERIT) {
255 if ($this->_isSupervisor) {
256 $styleArray = $this->
getStyleArray(array(
'hidden' => $pValue));
259 $this->_hidden = $pValue;
270 if ($this->_isSupervisor) {
308 $this->_hashIndex = $value;
315 $vars = get_object_vars($this);
316 foreach ($vars as
$key => $value) {
317 if (is_object($value)) {
318 $this->
$key = clone $value;
320 $this->
$key = $value;