30 if (!defined(
'PHPEXCEL_ROOT')) {
34 define(
'PHPEXCEL_ROOT', dirname(__FILE__) .
'/../../');
38 require_once PHPEXCEL_ROOT .
'PHPExcel/Style/Color.php';
41 require_once PHPEXCEL_ROOT .
'PHPExcel/IComparable.php';
131 $this->_isSupervisor = $isSupervisor;
135 $this->_rotation = 0;
141 $this->_startColor->bindParent($this,
'_startColor');
142 $this->_endColor->bindParent($this,
'_endColor');
154 $this->_parent = $parent;
176 return $this->_parent->getSharedComponent()->getFill();
186 return $this->_parent->getActiveSheet();
219 return array(
'fill' => $array);
245 if (is_array($pStyles)) {
246 if ($this->_isSupervisor) {
249 if (array_key_exists(
'type', $pStyles)) {
252 if (array_key_exists(
'rotation', $pStyles)) {
255 if (array_key_exists(
'startcolor', $pStyles)) {
256 $this->
getStartColor()->applyFromArray($pStyles[
'startcolor']);
258 if (array_key_exists(
'endcolor', $pStyles)) {
259 $this->
getEndColor()->applyFromArray($pStyles[
'endcolor']);
261 if (array_key_exists(
'color', $pStyles)) {
266 throw new Exception(
"Invalid style array passed.");
277 if ($this->_isSupervisor) {
290 if ($this->_isSupervisor) {
291 $styleArray = $this->
getStyleArray(array(
'type' => $pValue));
294 $this->_fillType = $pValue;
305 if ($this->_isSupervisor) {
318 if ($this->_isSupervisor) {
319 $styleArray = $this->
getStyleArray(array(
'rotation' => $pValue));
322 $this->_rotation = $pValue;
345 $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
347 if ($this->_isSupervisor) {
348 $styleArray = $this->
getStartColor()->getStyleArray(array(
'argb' => $color->getARGB()));
351 $this->_startColor = $color;
374 $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
376 if ($this->_isSupervisor) {
377 $styleArray = $this->
getEndColor()->getStyleArray(array(
'argb' => $color->getARGB()));
380 $this->_endColor = $color;
391 if ($this->_isSupervisor) {
431 $this->_hashIndex = $value;
438 $vars = get_object_vars($this);
439 foreach ($vars as
$key => $value) {
440 if (is_object($value)) {
441 $this->
$key = clone $value;
443 $this->
$key = $value;