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