Source for file Comment.php
Documentation is available at Comment.php
* Copyright (c) 2006 - 2011 PHPExcel
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.6, 2011-02-27
* @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
* Comment width (CSS style, i.e. XXpx or YYpt)
private $_width = '96pt';
* Left margin (CSS style, i.e. XXpx or YYpt)
private $_marginLeft = '59.25pt';
* Top margin (CSS style, i.e. XXpx or YYpt)
private $_marginTop = '1.5pt';
private $_visible = false;
* Comment height (CSS style, i.e. XXpx or YYpt)
private $_height = '55.5pt';
* @var PHPExcel_Style_Color
* Create a new PHPExcel_Comment
$this->_author = 'Author';
* @return PHPExcel_Comment
$this->_author = $pValue;
* @return PHPExcel_RichText
* @param PHPExcel_RichText $pValue
* @return PHPExcel_Comment
public function setText(PHPExcel_RichText $pValue) {
* Get comment width (CSS style, i.e. XXpx or YYpt)
* Set comment width (CSS style, i.e. XXpx or YYpt)
* @return PHPExcel_Comment
public function setWidth($value = '96pt') {
* Get comment height (CSS style, i.e. XXpx or YYpt)
* Set comment height (CSS style, i.e. XXpx or YYpt)
* @return PHPExcel_Comment
public function setHeight($value = '55.5pt') {
* Get left margin (CSS style, i.e. XXpx or YYpt)
return $this->_marginLeft;
* Set left margin (CSS style, i.e. XXpx or YYpt)
* @return PHPExcel_Comment
$this->_marginLeft = $value;
* Get top margin (CSS style, i.e. XXpx or YYpt)
return $this->_marginTop;
* Set top margin (CSS style, i.e. XXpx or YYpt)
* @return PHPExcel_Comment
$this->_marginTop = $value;
* Is the comment visible by default?
* Set comment default visibility
* @return PHPExcel_Comment
$this->_visible = $value;
* @return PHPExcel_Style_Color
return $this->_fillColor;
* @return PHPExcel_Comment
public function setAlignment($pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL) {
$this->_alignment = $pValue;
return $this->_alignment;
* @return string Hash code
. $this->_text->getHashCode()
. ($this->_visible ? 1 : 0)
. $this->_fillColor->getHashCode()
* Implement PHP __clone to create a deep clone, not just a shallow copy.
foreach ($vars as $key => $value) {
$this->$key = clone $value;
|