Update style classes for namespacing
This commit is contained in:
parent
99ac714a56
commit
fe51b5e4fa
|
@ -101,7 +101,7 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
protected $readorder = 0;
|
protected $readorder = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Alignment
|
* Create a new Alignment
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -126,7 +126,7 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -150,17 +150,17 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* <code>
|
* <code>
|
||||||
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray(
|
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray(
|
||||||
* array(
|
* array(
|
||||||
* 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
|
* 'horizontal' => \PHPExcel\Style\Alignment::HORIZONTAL_CENTER,
|
||||||
* 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,
|
* 'vertical' => \PHPExcel\Style\Alignment::VERTICAL_CENTER,
|
||||||
* 'rotation' => 0,
|
* 'rotation' => 0,
|
||||||
* 'wrap' => TRUE
|
* 'wrap' => TRUE
|
||||||
* )
|
* )
|
||||||
* );
|
* );
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -192,7 +192,7 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new \PHPExcel\Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -214,12 +214,12 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set Horizontal
|
* Set Horizontal
|
||||||
*
|
*
|
||||||
* @param string $pValue
|
* @param string $pValue
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function setHorizontal($pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL)
|
public function setHorizontal($pValue = self::HORIZONTAL_GENERAL)
|
||||||
{
|
{
|
||||||
if ($pValue == '') {
|
if ($pValue == '') {
|
||||||
$pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
|
$pValue = self::HORIZONTAL_GENERAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isSupervisor) {
|
if ($this->isSupervisor) {
|
||||||
|
@ -248,12 +248,12 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set Vertical
|
* Set Vertical
|
||||||
*
|
*
|
||||||
* @param string $pValue
|
* @param string $pValue
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function setVertical($pValue = PHPExcel_Style_Alignment::VERTICAL_BOTTOM)
|
public function setVertical($pValue = self::VERTICAL_BOTTOM)
|
||||||
{
|
{
|
||||||
if ($pValue == '') {
|
if ($pValue == '') {
|
||||||
$pValue = PHPExcel_Style_Alignment::VERTICAL_BOTTOM;
|
$pValue = self::VERTICAL_BOTTOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isSupervisor) {
|
if ($this->isSupervisor) {
|
||||||
|
@ -282,8 +282,8 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set TextRotation
|
* Set TextRotation
|
||||||
*
|
*
|
||||||
* @param int $pValue
|
* @param int $pValue
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function setTextRotation($pValue = 0)
|
public function setTextRotation($pValue = 0)
|
||||||
{
|
{
|
||||||
|
@ -301,7 +301,7 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
$this->textRotation = $pValue;
|
$this->textRotation = $pValue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Text rotation should be a value between -90 and 90.");
|
throw new \PHPExcel\Exception("Text rotation should be a value between -90 and 90.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -324,7 +324,7 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set Wrap Text
|
* Set Wrap Text
|
||||||
*
|
*
|
||||||
* @param boolean $pValue
|
* @param boolean $pValue
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function setWrapText($pValue = false)
|
public function setWrapText($pValue = false)
|
||||||
{
|
{
|
||||||
|
@ -357,7 +357,7 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set Shrink to fit
|
* Set Shrink to fit
|
||||||
*
|
*
|
||||||
* @param boolean $pValue
|
* @param boolean $pValue
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function setShrinkToFit($pValue = false)
|
public function setShrinkToFit($pValue = false)
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set indent
|
* Set indent
|
||||||
*
|
*
|
||||||
* @param int $pValue
|
* @param int $pValue
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function setIndent($pValue = 0)
|
public function setIndent($pValue = 0)
|
||||||
{
|
{
|
||||||
|
@ -427,7 +427,7 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set read order
|
* Set read order
|
||||||
*
|
*
|
||||||
* @param int $pValue
|
* @param int $pValue
|
||||||
* @return PHPExcel_Style_Alignment
|
* @return Alignment
|
||||||
*/
|
*/
|
||||||
public function setReadorder($pValue = 0)
|
public function setReadorder($pValue = 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Border extends Supervisor implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Border color
|
* Border color
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Color
|
* @var Color
|
||||||
*/
|
*/
|
||||||
protected $color;
|
protected $color;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class Border extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return Border
|
* @return Border
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -173,9 +173,9 @@ class Border extends Supervisor implements \PHPExcel\IComparable
|
||||||
* );
|
* );
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -237,7 +237,7 @@ class Border extends Supervisor implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Get Border Color
|
* Get Border Color
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function getColor()
|
public function getColor()
|
||||||
{
|
{
|
||||||
|
@ -247,11 +247,11 @@ class Border extends Supervisor implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Set Border Color
|
* Set Border Color
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style_Color $pValue
|
* @param Color $pValue
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return Border
|
* @return Border
|
||||||
*/
|
*/
|
||||||
public function setColor(PHPExcel_Style_Color $pValue = null)
|
public function setColor(Color $pValue = null)
|
||||||
{
|
{
|
||||||
// make sure parameter is a real color and not a supervisor
|
// make sure parameter is a real color and not a supervisor
|
||||||
$color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
|
$color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue;
|
||||||
|
|
|
@ -214,9 +214,9 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
* );
|
* );
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return Borders
|
* @return Borders
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -250,7 +250,7 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new \PHPExcel\Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -308,13 +308,13 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Get AllBorders (pseudo-border). Only applies to supervisor.
|
* Get AllBorders (pseudo-border). Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @return Border
|
* @return Border
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function getAllBorders()
|
public function getAllBorders()
|
||||||
{
|
{
|
||||||
if (!$this->isSupervisor) {
|
if (!$this->isSupervisor) {
|
||||||
throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.');
|
throw new \PHPExcel\Exception('Can only get pseudo-border for supervisor.');
|
||||||
}
|
}
|
||||||
return $this->allBorders;
|
return $this->allBorders;
|
||||||
}
|
}
|
||||||
|
@ -323,12 +323,12 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Get Outline (pseudo-border). Only applies to supervisor.
|
* Get Outline (pseudo-border). Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function getOutline()
|
public function getOutline()
|
||||||
{
|
{
|
||||||
if (!$this->isSupervisor) {
|
if (!$this->isSupervisor) {
|
||||||
throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.');
|
throw new \PHPExcel\Exception('Can only get pseudo-border for supervisor.');
|
||||||
}
|
}
|
||||||
return $this->outline;
|
return $this->outline;
|
||||||
}
|
}
|
||||||
|
@ -337,12 +337,12 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Get Inside (pseudo-border). Only applies to supervisor.
|
* Get Inside (pseudo-border). Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function getInside()
|
public function getInside()
|
||||||
{
|
{
|
||||||
if (!$this->isSupervisor) {
|
if (!$this->isSupervisor) {
|
||||||
throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.');
|
throw new \PHPExcel\Exception('Can only get pseudo-border for supervisor.');
|
||||||
}
|
}
|
||||||
return $this->inside;
|
return $this->inside;
|
||||||
}
|
}
|
||||||
|
@ -351,12 +351,12 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Get Vertical (pseudo-border). Only applies to supervisor.
|
* Get Vertical (pseudo-border). Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @return Border
|
* @return Border
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function getVertical()
|
public function getVertical()
|
||||||
{
|
{
|
||||||
if (!$this->isSupervisor) {
|
if (!$this->isSupervisor) {
|
||||||
throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.');
|
throw new \PHPExcel\Exception('Can only get pseudo-border for supervisor.');
|
||||||
}
|
}
|
||||||
return $this->vertical;
|
return $this->vertical;
|
||||||
}
|
}
|
||||||
|
@ -365,12 +365,12 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Get Horizontal (pseudo-border). Only applies to supervisor.
|
* Get Horizontal (pseudo-border). Only applies to supervisor.
|
||||||
*
|
*
|
||||||
* @return Border
|
* @return Border
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
*/
|
*/
|
||||||
public function getHorizontal()
|
public function getHorizontal()
|
||||||
{
|
{
|
||||||
if (!$this->isSupervisor) {
|
if (!$this->isSupervisor) {
|
||||||
throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.');
|
throw new \PHPExcel\Exception('Can only get pseudo-border for supervisor.');
|
||||||
}
|
}
|
||||||
return $this->horizontal;
|
return $this->horizontal;
|
||||||
}
|
}
|
||||||
|
@ -394,10 +394,10 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
||||||
* @param int $pValue
|
* @param int $pValue
|
||||||
* @return Borders
|
* @return Borders
|
||||||
*/
|
*/
|
||||||
public function setDiagonalDirection($pValue = Borders::DIAGONAL_NONE)
|
public function setDiagonalDirection($pValue = self::DIAGONAL_NONE)
|
||||||
{
|
{
|
||||||
if ($pValue == '') {
|
if ($pValue == '') {
|
||||||
$pValue = Borders::DIAGONAL_NONE;
|
$pValue = self::DIAGONAL_NONE;
|
||||||
}
|
}
|
||||||
if ($this->isSupervisor) {
|
if ($this->isSupervisor) {
|
||||||
$styleArray = $this->getStyleArray(array('diagonaldirection' => $pValue));
|
$styleArray = $this->getStyleArray(array('diagonaldirection' => $pValue));
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Color
|
* Create a new Color
|
||||||
*
|
*
|
||||||
* @param string $pARGB ARGB value for the colour
|
* @param string $pARGB ARGB value for the colour
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
|
@ -74,7 +74,7 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
* its ramifications are
|
* its ramifications are
|
||||||
*/
|
*/
|
||||||
public function __construct($pARGB = PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor = false, $isConditional = false)
|
public function __construct($pARGB = self::COLOR_BLACK, $isSupervisor = false, $isConditional = false)
|
||||||
{
|
{
|
||||||
// Supervisor?
|
// Supervisor?
|
||||||
parent::__construct($isSupervisor);
|
parent::__construct($isSupervisor);
|
||||||
|
@ -90,7 +90,7 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
*
|
*
|
||||||
* @param mixed $parent
|
* @param mixed $parent
|
||||||
* @param string $parentPropertyName
|
* @param string $parentPropertyName
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function bindParent($parent, $parentPropertyName = null)
|
public function bindParent($parent, $parentPropertyName = null)
|
||||||
{
|
{
|
||||||
|
@ -103,7 +103,7 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -148,8 +148,8 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -165,7 +165,7 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new \PHPExcel\Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -187,12 +187,12 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set ARGB
|
* Set ARGB
|
||||||
*
|
*
|
||||||
* @param string $pValue
|
* @param string $pValue
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function setARGB($pValue = PHPExcel_Style_Color::COLOR_BLACK)
|
public function setARGB($pValue = self::COLOR_BLACK)
|
||||||
{
|
{
|
||||||
if ($pValue == '') {
|
if ($pValue == '') {
|
||||||
$pValue = PHPExcel_Style_Color::COLOR_BLACK;
|
$pValue = self::COLOR_BLACK;
|
||||||
}
|
}
|
||||||
if ($this->isSupervisor) {
|
if ($this->isSupervisor) {
|
||||||
$styleArray = $this->getStyleArray(array('argb' => $pValue));
|
$styleArray = $this->getStyleArray(array('argb' => $pValue));
|
||||||
|
@ -220,7 +220,7 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set RGB
|
* Set RGB
|
||||||
*
|
*
|
||||||
* @param string $pValue RGB value
|
* @param string $pValue RGB value
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public function setRGB($pValue = '000000')
|
public function setRGB($pValue = '000000')
|
||||||
{
|
{
|
||||||
|
@ -348,7 +348,7 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
* @param int $pIndex Index entry point into the colour array
|
* @param int $pIndex Index entry point into the colour array
|
||||||
* @param boolean $background Flag to indicate whether default background or foreground colour
|
* @param boolean $background Flag to indicate whether default background or foreground colour
|
||||||
* should be returned if the indexed colour doesn't exist
|
* should be returned if the indexed colour doesn't exist
|
||||||
* @return PHPExcel_Style_Color
|
* @return Color
|
||||||
*/
|
*/
|
||||||
public static function indexedColor($pIndex, $background = false)
|
public static function indexedColor($pIndex, $background = false)
|
||||||
{
|
{
|
||||||
|
@ -357,74 +357,74 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
||||||
|
|
||||||
// Indexed colors
|
// Indexed colors
|
||||||
if (is_null(self::$indexedColors)) {
|
if (is_null(self::$indexedColors)) {
|
||||||
self::$indexedColors = array(
|
self::$indexedColors = [
|
||||||
1 => 'FF000000', // System Colour #1 - Black
|
1 => 'FF000000', // System Colour #1 - Black
|
||||||
2 => 'FFFFFFFF', // System Colour #2 - White
|
2 => 'FFFFFFFF', // System Colour #2 - White
|
||||||
3 => 'FFFF0000', // System Colour #3 - Red
|
3 => 'FFFF0000', // System Colour #3 - Red
|
||||||
4 => 'FF00FF00', // System Colour #4 - Green
|
4 => 'FF00FF00', // System Colour #4 - Green
|
||||||
5 => 'FF0000FF', // System Colour #5 - Blue
|
5 => 'FF0000FF', // System Colour #5 - Blue
|
||||||
6 => 'FFFFFF00', // System Colour #6 - Yellow
|
6 => 'FFFFFF00', // System Colour #6 - Yellow
|
||||||
7 => 'FFFF00FF', // System Colour #7- Magenta
|
7 => 'FFFF00FF', // System Colour #7- Magenta
|
||||||
8 => 'FF00FFFF', // System Colour #8- Cyan
|
8 => 'FF00FFFF', // System Colour #8- Cyan
|
||||||
9 => 'FF800000', // Standard Colour #9
|
9 => 'FF800000', // Standard Colour #9
|
||||||
10 => 'FF008000', // Standard Colour #10
|
10 => 'FF008000', // Standard Colour #10
|
||||||
11 => 'FF000080', // Standard Colour #11
|
11 => 'FF000080', // Standard Colour #11
|
||||||
12 => 'FF808000', // Standard Colour #12
|
12 => 'FF808000', // Standard Colour #12
|
||||||
13 => 'FF800080', // Standard Colour #13
|
13 => 'FF800080', // Standard Colour #13
|
||||||
14 => 'FF008080', // Standard Colour #14
|
14 => 'FF008080', // Standard Colour #14
|
||||||
15 => 'FFC0C0C0', // Standard Colour #15
|
15 => 'FFC0C0C0', // Standard Colour #15
|
||||||
16 => 'FF808080', // Standard Colour #16
|
16 => 'FF808080', // Standard Colour #16
|
||||||
17 => 'FF9999FF', // Chart Fill Colour #17
|
17 => 'FF9999FF', // Chart Fill Colour #17
|
||||||
18 => 'FF993366', // Chart Fill Colour #18
|
18 => 'FF993366', // Chart Fill Colour #18
|
||||||
19 => 'FFFFFFCC', // Chart Fill Colour #19
|
19 => 'FFFFFFCC', // Chart Fill Colour #19
|
||||||
20 => 'FFCCFFFF', // Chart Fill Colour #20
|
20 => 'FFCCFFFF', // Chart Fill Colour #20
|
||||||
21 => 'FF660066', // Chart Fill Colour #21
|
21 => 'FF660066', // Chart Fill Colour #21
|
||||||
22 => 'FFFF8080', // Chart Fill Colour #22
|
22 => 'FFFF8080', // Chart Fill Colour #22
|
||||||
23 => 'FF0066CC', // Chart Fill Colour #23
|
23 => 'FF0066CC', // Chart Fill Colour #23
|
||||||
24 => 'FFCCCCFF', // Chart Fill Colour #24
|
24 => 'FFCCCCFF', // Chart Fill Colour #24
|
||||||
25 => 'FF000080', // Chart Line Colour #25
|
25 => 'FF000080', // Chart Line Colour #25
|
||||||
26 => 'FFFF00FF', // Chart Line Colour #26
|
26 => 'FFFF00FF', // Chart Line Colour #26
|
||||||
27 => 'FFFFFF00', // Chart Line Colour #27
|
27 => 'FFFFFF00', // Chart Line Colour #27
|
||||||
28 => 'FF00FFFF', // Chart Line Colour #28
|
28 => 'FF00FFFF', // Chart Line Colour #28
|
||||||
29 => 'FF800080', // Chart Line Colour #29
|
29 => 'FF800080', // Chart Line Colour #29
|
||||||
30 => 'FF800000', // Chart Line Colour #30
|
30 => 'FF800000', // Chart Line Colour #30
|
||||||
31 => 'FF008080', // Chart Line Colour #31
|
31 => 'FF008080', // Chart Line Colour #31
|
||||||
32 => 'FF0000FF', // Chart Line Colour #32
|
32 => 'FF0000FF', // Chart Line Colour #32
|
||||||
33 => 'FF00CCFF', // Standard Colour #33
|
33 => 'FF00CCFF', // Standard Colour #33
|
||||||
34 => 'FFCCFFFF', // Standard Colour #34
|
34 => 'FFCCFFFF', // Standard Colour #34
|
||||||
35 => 'FFCCFFCC', // Standard Colour #35
|
35 => 'FFCCFFCC', // Standard Colour #35
|
||||||
36 => 'FFFFFF99', // Standard Colour #36
|
36 => 'FFFFFF99', // Standard Colour #36
|
||||||
37 => 'FF99CCFF', // Standard Colour #37
|
37 => 'FF99CCFF', // Standard Colour #37
|
||||||
38 => 'FFFF99CC', // Standard Colour #38
|
38 => 'FFFF99CC', // Standard Colour #38
|
||||||
39 => 'FFCC99FF', // Standard Colour #39
|
39 => 'FFCC99FF', // Standard Colour #39
|
||||||
40 => 'FFFFCC99', // Standard Colour #40
|
40 => 'FFFFCC99', // Standard Colour #40
|
||||||
41 => 'FF3366FF', // Standard Colour #41
|
41 => 'FF3366FF', // Standard Colour #41
|
||||||
42 => 'FF33CCCC', // Standard Colour #42
|
42 => 'FF33CCCC', // Standard Colour #42
|
||||||
43 => 'FF99CC00', // Standard Colour #43
|
43 => 'FF99CC00', // Standard Colour #43
|
||||||
44 => 'FFFFCC00', // Standard Colour #44
|
44 => 'FFFFCC00', // Standard Colour #44
|
||||||
45 => 'FFFF9900', // Standard Colour #45
|
45 => 'FFFF9900', // Standard Colour #45
|
||||||
46 => 'FFFF6600', // Standard Colour #46
|
46 => 'FFFF6600', // Standard Colour #46
|
||||||
47 => 'FF666699', // Standard Colour #47
|
47 => 'FF666699', // Standard Colour #47
|
||||||
48 => 'FF969696', // Standard Colour #48
|
48 => 'FF969696', // Standard Colour #48
|
||||||
49 => 'FF003366', // Standard Colour #49
|
49 => 'FF003366', // Standard Colour #49
|
||||||
50 => 'FF339966', // Standard Colour #50
|
50 => 'FF339966', // Standard Colour #50
|
||||||
51 => 'FF003300', // Standard Colour #51
|
51 => 'FF003300', // Standard Colour #51
|
||||||
52 => 'FF333300', // Standard Colour #52
|
52 => 'FF333300', // Standard Colour #52
|
||||||
53 => 'FF993300', // Standard Colour #53
|
53 => 'FF993300', // Standard Colour #53
|
||||||
54 => 'FF993366', // Standard Colour #54
|
54 => 'FF993366', // Standard Colour #54
|
||||||
55 => 'FF333399', // Standard Colour #55
|
55 => 'FF333399', // Standard Colour #55
|
||||||
56 => 'FF333333' // Standard Colour #56
|
56 => 'FF333333' // Standard Colour #56
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists($pIndex, self::$indexedColors)) {
|
if (array_key_exists($pIndex, self::$indexedColors)) {
|
||||||
return new PHPExcel_Style_Color(self::$indexedColors[$pIndex]);
|
return new Color(self::$indexedColors[$pIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($background) {
|
if ($background) {
|
||||||
return new PHPExcel_Style_Color(self::COLOR_WHITE);
|
return new Color(self::COLOR_WHITE);
|
||||||
}
|
}
|
||||||
return new PHPExcel_Style_Color(self::COLOR_BLACK);
|
return new Color(self::COLOR_BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -80,21 +80,21 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Style
|
* Style
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style
|
* @var \PHPExcel\Style
|
||||||
*/
|
*/
|
||||||
private $style;
|
private $style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Conditional
|
* Create a new Conditional
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
// Initialise values
|
// Initialise values
|
||||||
$this->conditionType = PHPExcel_Style_Conditional::CONDITION_NONE;
|
$this->conditionType = self::CONDITION_NONE;
|
||||||
$this->operatorType = PHPExcel_Style_Conditional::OPERATOR_NONE;
|
$this->operatorType = self::OPERATOR_NONE;
|
||||||
$this->text = null;
|
$this->text = null;
|
||||||
$this->condition = array();
|
$this->condition = array();
|
||||||
$this->style = new PHPExcel_Style(false, true);
|
$this->style = new \PHPExcel\Style(false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -110,10 +110,10 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Set Condition type
|
* Set Condition type
|
||||||
*
|
*
|
||||||
* @param string $pValue PHPExcel_Style_Conditional condition type
|
* @param string $pValue Condition type
|
||||||
* @return PHPExcel_Style_Conditional
|
* @return Conditional
|
||||||
*/
|
*/
|
||||||
public function setConditionType($pValue = PHPExcel_Style_Conditional::CONDITION_NONE)
|
public function setConditionType($pValue = self::CONDITION_NONE)
|
||||||
{
|
{
|
||||||
$this->conditionType = $pValue;
|
$this->conditionType = $pValue;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -132,10 +132,10 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Set Operator type
|
* Set Operator type
|
||||||
*
|
*
|
||||||
* @param string $pValue PHPExcel_Style_Conditional operator type
|
* @param string $pValue Conditional operator type
|
||||||
* @return PHPExcel_Style_Conditional
|
* @return Conditional
|
||||||
*/
|
*/
|
||||||
public function setOperatorType($pValue = PHPExcel_Style_Conditional::OPERATOR_NONE)
|
public function setOperatorType($pValue = self::OPERATOR_NONE)
|
||||||
{
|
{
|
||||||
$this->operatorType = $pValue;
|
$this->operatorType = $pValue;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -155,7 +155,7 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
* Set text
|
* Set text
|
||||||
*
|
*
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* @return PHPExcel_Style_Conditional
|
* @return Conditional
|
||||||
*/
|
*/
|
||||||
public function setText($value = null)
|
public function setText($value = null)
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,7 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
*
|
*
|
||||||
* @deprecated Deprecated, use setConditions instead
|
* @deprecated Deprecated, use setConditions instead
|
||||||
* @param string $pValue Condition
|
* @param string $pValue Condition
|
||||||
* @return PHPExcel_Style_Conditional
|
* @return Conditional
|
||||||
*/
|
*/
|
||||||
public function setCondition($pValue = '')
|
public function setCondition($pValue = '')
|
||||||
{
|
{
|
||||||
|
@ -208,7 +208,7 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
* Set Conditions
|
* Set Conditions
|
||||||
*
|
*
|
||||||
* @param string[] $pValue Condition
|
* @param string[] $pValue Condition
|
||||||
* @return PHPExcel_Style_Conditional
|
* @return Conditional
|
||||||
*/
|
*/
|
||||||
public function setConditions($pValue)
|
public function setConditions($pValue)
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,7 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
* Add Condition
|
* Add Condition
|
||||||
*
|
*
|
||||||
* @param string $pValue Condition
|
* @param string $pValue Condition
|
||||||
* @return PHPExcel_Style_Conditional
|
* @return Conditional
|
||||||
*/
|
*/
|
||||||
public function addCondition($pValue = '')
|
public function addCondition($pValue = '')
|
||||||
{
|
{
|
||||||
|
@ -234,7 +234,7 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Get Style
|
* Get Style
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style
|
* @return \PHPExcel\Style
|
||||||
*/
|
*/
|
||||||
public function getStyle()
|
public function getStyle()
|
||||||
{
|
{
|
||||||
|
@ -244,11 +244,11 @@ class Conditional implements \PHPExcel\IComparable
|
||||||
/**
|
/**
|
||||||
* Set Style
|
* Set Style
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Style $pValue
|
* @param \PHPExcel\Style $pValue
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Conditional
|
* @return Conditional
|
||||||
*/
|
*/
|
||||||
public function setStyle(PHPExcel_Style $pValue = null)
|
public function setStyle(\PHPExcel\Style $pValue = null)
|
||||||
{
|
{
|
||||||
$this->style = $pValue;
|
$this->style = $pValue;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -162,12 +162,12 @@ class Font extends Supervisor implements \PHPExcel\IComparable
|
||||||
* <code>
|
* <code>
|
||||||
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray(
|
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray(
|
||||||
* array(
|
* array(
|
||||||
* 'name' => 'Arial',
|
* 'name' => 'Arial',
|
||||||
* 'bold' => TRUE,
|
* 'bold' => TRUE,
|
||||||
* 'italic' => FALSE,
|
* 'italic' => FALSE,
|
||||||
* 'underline' => \PHPExcel\Style\Font::UNDERLINE_DOUBLE,
|
* 'underline' => \PHPExcel\Style\Font::UNDERLINE_DOUBLE,
|
||||||
* 'strike' => FALSE,
|
* 'strike' => FALSE,
|
||||||
* 'color' => array(
|
* 'color' => array(
|
||||||
* 'rgb' => '808080'
|
* 'rgb' => '808080'
|
||||||
* )
|
* )
|
||||||
* )
|
* )
|
||||||
|
|
|
@ -152,7 +152,7 @@ class NumberFormat extends Supervisor implements \PHPExcel\IComparable
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return NumberFormat
|
* @return NumberFormat
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
|
@ -166,7 +166,7 @@ class NumberFormat extends Supervisor implements \PHPExcel\IComparable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new \PHPExcel\Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ class NumberFormat extends Supervisor implements \PHPExcel\IComparable
|
||||||
$format = strtr($format, self::$dateFormatReplacements12);
|
$format = strtr($format, self::$dateFormatReplacements12);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dateObj = PHPExcel_Shared_Date::ExcelToPHPObject($value);
|
$dateObj = \PHPExcel\Shared\Date::ExcelToPHPObject($value);
|
||||||
$value = $dateObj->format($format);
|
$value = $dateObj->format($format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ class NumberFormat extends Supervisor implements \PHPExcel\IComparable
|
||||||
$decimalLength = strlen($decimalPart);
|
$decimalLength = strlen($decimalPart);
|
||||||
$decimalDivisor = pow(10, $decimalLength);
|
$decimalDivisor = pow(10, $decimalLength);
|
||||||
|
|
||||||
$GCD = PHPExcel_Calculation_MathTrig::GCD($decimalPart, $decimalDivisor);
|
$GCD = \PHPExcel\Calculation\MathTrig::GCD($decimalPart, $decimalDivisor);
|
||||||
|
|
||||||
$adjustedDecimalPart = $decimalPart/$GCD;
|
$adjustedDecimalPart = $decimalPart/$GCD;
|
||||||
$adjustedDecimalDivisor = $decimalDivisor/$GCD;
|
$adjustedDecimalDivisor = $decimalDivisor/$GCD;
|
||||||
|
@ -668,8 +668,8 @@ class NumberFormat extends Supervisor implements \PHPExcel\IComparable
|
||||||
$value = number_format(
|
$value = number_format(
|
||||||
$value,
|
$value,
|
||||||
strlen($right),
|
strlen($right),
|
||||||
PHPExcel_Shared_String::getDecimalSeparator(),
|
\PHPExcel\Shared\String::getDecimalSeparator(),
|
||||||
PHPExcel_Shared_String::getThousandsSeparator()
|
\PHPExcel\Shared\String::getThousandsSeparator()
|
||||||
);
|
);
|
||||||
$value = preg_replace($number_regex, $value, $format);
|
$value = preg_replace($number_regex, $value, $format);
|
||||||
} else {
|
} else {
|
||||||
|
@ -692,7 +692,7 @@ class NumberFormat extends Supervisor implements \PHPExcel\IComparable
|
||||||
$currencyCode = $m[1];
|
$currencyCode = $m[1];
|
||||||
list($currencyCode) = explode('-', $currencyCode);
|
list($currencyCode) = explode('-', $currencyCode);
|
||||||
if ($currencyCode == '') {
|
if ($currencyCode == '') {
|
||||||
$currencyCode = PHPExcel_Shared_String::getCurrencyCode();
|
$currencyCode = \PHPExcel\Shared\String::getCurrencyCode();
|
||||||
}
|
}
|
||||||
$value = preg_replace('/\[\$([^\]]*)\]/u', $currencyCode, $value);
|
$value = preg_replace('/\[\$([^\]]*)\]/u', $currencyCode, $value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ class Protection extends Supervisor implements \PHPExcel\IComparable
|
||||||
protected $hidden;
|
protected $hidden;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Protection
|
* Create a new Protection
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -74,7 +74,7 @@ class Protection extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Get the shared style component for the currently active cell in currently active sheet.
|
* Get the shared style component for the currently active cell in currently active sheet.
|
||||||
* Only used for style supervisor
|
* Only used for style supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Style_Protection
|
* @return Protection
|
||||||
*/
|
*/
|
||||||
public function getSharedComponent()
|
public function getSharedComponent()
|
||||||
{
|
{
|
||||||
|
@ -105,8 +105,8 @@ class Protection extends Supervisor implements \PHPExcel\IComparable
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param array $pStyles Array containing style information
|
* @param array $pStyles Array containing style information
|
||||||
* @throws PHPExcel_Exception
|
* @throws \PHPExcel\Exception
|
||||||
* @return PHPExcel_Style_Protection
|
* @return Protection
|
||||||
*/
|
*/
|
||||||
public function applyFromArray($pStyles = null)
|
public function applyFromArray($pStyles = null)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ class Protection extends Supervisor implements \PHPExcel\IComparable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new PHPExcel_Exception("Invalid style array passed.");
|
throw new \PHPExcel\Exception("Invalid style array passed.");
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ class Protection extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set locked
|
* Set locked
|
||||||
*
|
*
|
||||||
* @param string $pValue
|
* @param string $pValue
|
||||||
* @return PHPExcel_Style_Protection
|
* @return Protection
|
||||||
*/
|
*/
|
||||||
public function setLocked($pValue = self::PROTECTION_INHERIT)
|
public function setLocked($pValue = self::PROTECTION_INHERIT)
|
||||||
{
|
{
|
||||||
|
@ -174,7 +174,7 @@ class Protection extends Supervisor implements \PHPExcel\IComparable
|
||||||
* Set hidden
|
* Set hidden
|
||||||
*
|
*
|
||||||
* @param string $pValue
|
* @param string $pValue
|
||||||
* @return PHPExcel_Style_Protection
|
* @return Protection
|
||||||
*/
|
*/
|
||||||
public function setHidden($pValue = self::PROTECTION_INHERIT)
|
public function setHidden($pValue = self::PROTECTION_INHERIT)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,12 +39,12 @@ abstract class Supervisor
|
||||||
/**
|
/**
|
||||||
* Parent. Only used for supervisor
|
* Parent. Only used for supervisor
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style
|
* @var \PHPExcel\Style
|
||||||
*/
|
*/
|
||||||
protected $parent;
|
protected $parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Style_Alignment
|
* Create a new Supervisor
|
||||||
*
|
*
|
||||||
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
* @param boolean $isSupervisor Flag indicating if this is a supervisor or not
|
||||||
* Leave this value at default unless you understand exactly what
|
* Leave this value at default unless you understand exactly what
|
||||||
|
@ -60,7 +60,7 @@ abstract class Supervisor
|
||||||
* Bind parent. Only used for supervisor
|
* Bind parent. Only used for supervisor
|
||||||
*
|
*
|
||||||
* @param PHPExcel $parent
|
* @param PHPExcel $parent
|
||||||
* @return PHPExcel_Style_Supervisor
|
* @return Supervisor
|
||||||
*/
|
*/
|
||||||
public function bindParent($parent, $parentPropertyName = null)
|
public function bindParent($parent, $parentPropertyName = null)
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,7 @@ abstract class Supervisor
|
||||||
/**
|
/**
|
||||||
* Get the currently active sheet. Only used for supervisor
|
* Get the currently active sheet. Only used for supervisor
|
||||||
*
|
*
|
||||||
* @return PHPExcel_Worksheet
|
* @return \PHPExcel\Worksheet
|
||||||
*/
|
*/
|
||||||
public function getActiveSheet()
|
public function getActiveSheet()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue