composer update
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPExcel
|
||||
* PHPExcel_Comment
|
||||
*
|
||||
* Copyright (c) 2006 - 2014 PHPExcel
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -20,19 +21,10 @@
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Comment
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
{
|
||||
/**
|
||||
@@ -40,63 +32,63 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_author;
|
||||
private $author;
|
||||
|
||||
/**
|
||||
* Rich text comment
|
||||
*
|
||||
* @var PHPExcel_RichText
|
||||
*/
|
||||
private $_text;
|
||||
private $text;
|
||||
|
||||
/**
|
||||
* Comment width (CSS style, i.e. XXpx or YYpt)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_width = '96pt';
|
||||
private $width = '96pt';
|
||||
|
||||
/**
|
||||
* Left margin (CSS style, i.e. XXpx or YYpt)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_marginLeft = '59.25pt';
|
||||
private $marginLeft = '59.25pt';
|
||||
|
||||
/**
|
||||
* Top margin (CSS style, i.e. XXpx or YYpt)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_marginTop = '1.5pt';
|
||||
private $marginTop = '1.5pt';
|
||||
|
||||
/**
|
||||
* Visible
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_visible = false;
|
||||
private $visible = false;
|
||||
|
||||
/**
|
||||
* Comment height (CSS style, i.e. XXpx or YYpt)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_height = '55.5pt';
|
||||
private $height = '55.5pt';
|
||||
|
||||
/**
|
||||
* Comment fill color
|
||||
*
|
||||
* @var PHPExcel_Style_Color
|
||||
*/
|
||||
private $_fillColor;
|
||||
private $fillColor;
|
||||
|
||||
/**
|
||||
* Alignment
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_alignment;
|
||||
private $alignment;
|
||||
|
||||
/**
|
||||
* Create a new PHPExcel_Comment
|
||||
@@ -106,10 +98,10 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
public function __construct()
|
||||
{
|
||||
// Initialise variables
|
||||
$this->_author = 'Author';
|
||||
$this->_text = new PHPExcel_RichText();
|
||||
$this->_fillColor = new PHPExcel_Style_Color('FFFFFFE1');
|
||||
$this->_alignment = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
|
||||
$this->author = 'Author';
|
||||
$this->text = new PHPExcel_RichText();
|
||||
$this->fillColor = new PHPExcel_Style_Color('FFFFFFE1');
|
||||
$this->alignment = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,8 +109,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAuthor() {
|
||||
return $this->_author;
|
||||
public function getAuthor()
|
||||
{
|
||||
return $this->author;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,8 +120,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
* @param string $pValue
|
||||
* @return PHPExcel_Comment
|
||||
*/
|
||||
public function setAuthor($pValue = '') {
|
||||
$this->_author = $pValue;
|
||||
public function setAuthor($pValue = '')
|
||||
{
|
||||
$this->author = $pValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -137,8 +131,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return PHPExcel_RichText
|
||||
*/
|
||||
public function getText() {
|
||||
return $this->_text;
|
||||
public function getText()
|
||||
{
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -147,8 +142,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
* @param PHPExcel_RichText $pValue
|
||||
* @return PHPExcel_Comment
|
||||
*/
|
||||
public function setText(PHPExcel_RichText $pValue) {
|
||||
$this->_text = $pValue;
|
||||
public function setText(PHPExcel_RichText $pValue)
|
||||
{
|
||||
$this->text = $pValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -157,8 +153,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getWidth() {
|
||||
return $this->_width;
|
||||
public function getWidth()
|
||||
{
|
||||
return $this->width;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,8 +164,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
* @param string $value
|
||||
* @return PHPExcel_Comment
|
||||
*/
|
||||
public function setWidth($value = '96pt') {
|
||||
$this->_width = $value;
|
||||
public function setWidth($value = '96pt')
|
||||
{
|
||||
$this->width = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -177,8 +175,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHeight() {
|
||||
return $this->_height;
|
||||
public function getHeight()
|
||||
{
|
||||
return $this->height;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,8 +186,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
* @param string $value
|
||||
* @return PHPExcel_Comment
|
||||
*/
|
||||
public function setHeight($value = '55.5pt') {
|
||||
$this->_height = $value;
|
||||
public function setHeight($value = '55.5pt')
|
||||
{
|
||||
$this->height = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -197,8 +197,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMarginLeft() {
|
||||
return $this->_marginLeft;
|
||||
public function getMarginLeft()
|
||||
{
|
||||
return $this->marginLeft;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,8 +208,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
* @param string $value
|
||||
* @return PHPExcel_Comment
|
||||
*/
|
||||
public function setMarginLeft($value = '59.25pt') {
|
||||
$this->_marginLeft = $value;
|
||||
public function setMarginLeft($value = '59.25pt')
|
||||
{
|
||||
$this->marginLeft = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -217,8 +219,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMarginTop() {
|
||||
return $this->_marginTop;
|
||||
public function getMarginTop()
|
||||
{
|
||||
return $this->marginTop;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -227,8 +230,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
* @param string $value
|
||||
* @return PHPExcel_Comment
|
||||
*/
|
||||
public function setMarginTop($value = '1.5pt') {
|
||||
$this->_marginTop = $value;
|
||||
public function setMarginTop($value = '1.5pt')
|
||||
{
|
||||
$this->marginTop = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -237,8 +241,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getVisible() {
|
||||
return $this->_visible;
|
||||
public function getVisible()
|
||||
{
|
||||
return $this->visible;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -247,8 +252,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
* @param boolean $value
|
||||
* @return PHPExcel_Comment
|
||||
*/
|
||||
public function setVisible($value = false) {
|
||||
$this->_visible = $value;
|
||||
public function setVisible($value = false)
|
||||
{
|
||||
$this->visible = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -257,8 +263,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return PHPExcel_Style_Color
|
||||
*/
|
||||
public function getFillColor() {
|
||||
return $this->_fillColor;
|
||||
public function getFillColor()
|
||||
{
|
||||
return $this->fillColor;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -267,8 +274,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
* @param string $pValue
|
||||
* @return PHPExcel_Comment
|
||||
*/
|
||||
public function setAlignment($pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL) {
|
||||
$this->_alignment = $pValue;
|
||||
public function setAlignment($pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL)
|
||||
{
|
||||
$this->alignment = $pValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -277,8 +285,9 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAlignment() {
|
||||
return $this->_alignment;
|
||||
public function getAlignment()
|
||||
{
|
||||
return $this->alignment;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -286,25 +295,27 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return string Hash code
|
||||
*/
|
||||
public function getHashCode() {
|
||||
public function getHashCode()
|
||||
{
|
||||
return md5(
|
||||
$this->_author
|
||||
. $this->_text->getHashCode()
|
||||
. $this->_width
|
||||
. $this->_height
|
||||
. $this->_marginLeft
|
||||
. $this->_marginTop
|
||||
. ($this->_visible ? 1 : 0)
|
||||
. $this->_fillColor->getHashCode()
|
||||
. $this->_alignment
|
||||
. __CLASS__
|
||||
$this->author .
|
||||
$this->text->getHashCode() .
|
||||
$this->width .
|
||||
$this->height .
|
||||
$this->marginLeft .
|
||||
$this->marginTop .
|
||||
($this->visible ? 1 : 0) .
|
||||
$this->fillColor->getHashCode() .
|
||||
$this->alignment .
|
||||
__CLASS__
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement PHP __clone to create a deep clone, not just a shallow copy.
|
||||
*/
|
||||
public function __clone() {
|
||||
public function __clone()
|
||||
{
|
||||
$vars = get_object_vars($this);
|
||||
foreach ($vars as $key => $value) {
|
||||
if (is_object($value)) {
|
||||
@@ -320,8 +331,8 @@ class PHPExcel_Comment implements PHPExcel_IComparable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString() {
|
||||
return $this->_text->getPlainText();
|
||||
public function __toString()
|
||||
{
|
||||
return $this->text->getPlainText();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user