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,8 +150,8 @@ 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
|
||||
* )
|
||||
|
@ -159,8 +159,8 @@ class Alignment extends Supervisor implements \PHPExcel\IComparable
|
|||
* </code>
|
||||
*
|
||||
* @param array $pStyles Array containing style information
|
||||
* @throws PHPExcel_Exception
|
||||
* @return PHPExcel_Style_Alignment
|
||||
* @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()
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ class Border extends Supervisor implements \PHPExcel\IComparable
|
|||
* </code>
|
||||
*
|
||||
* @param array $pStyles Array containing style information
|
||||
* @throws PHPExcel_Exception
|
||||
* @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
|
||||
* @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;
|
||||
|
|
|
@ -215,7 +215,7 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
|||
* </code>
|
||||
*
|
||||
* @param array $pStyles Array containing style information
|
||||
* @throws PHPExcel_Exception
|
||||
* @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;
|
||||
}
|
||||
|
@ -309,12 +309,12 @@ class Borders extends Supervisor implements \PHPExcel\IComparable
|
|||
* Get AllBorders (pseudo-border). Only applies to supervisor.
|
||||
*
|
||||
* @return Border
|
||||
* @throws PHPExcel_Exception
|
||||
* @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,7 +357,7 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
|||
|
||||
// Indexed colors
|
||||
if (is_null(self::$indexedColors)) {
|
||||
self::$indexedColors = array(
|
||||
self::$indexedColors = [
|
||||
1 => 'FF000000', // System Colour #1 - Black
|
||||
2 => 'FFFFFFFF', // System Colour #2 - White
|
||||
3 => 'FFFF0000', // System Colour #3 - Red
|
||||
|
@ -414,17 +414,17 @@ class Color extends Supervisor implements \PHPExcel\IComparable
|
|||
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;
|
||||
|
|
|
@ -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