Update library PHPExcel to version 1.7.3
This commit is contained in:
@@ -8,12 +8,12 @@
|
||||
* 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
|
||||
@@ -22,22 +22,10 @@
|
||||
* @package PHPExcel_Style
|
||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version 1.7.2, 2010-01-11
|
||||
* @version 1.7.3, 2010-05-17
|
||||
*/
|
||||
|
||||
|
||||
/** PHPExcel root directory */
|
||||
if (!defined('PHPEXCEL_ROOT')) {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
||||
}
|
||||
|
||||
/** PHPExcel_IComparable */
|
||||
require_once PHPEXCEL_ROOT . 'PHPExcel/IComparable.php';
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Style_Alignment
|
||||
*
|
||||
@@ -46,7 +34,7 @@ require_once PHPEXCEL_ROOT . 'PHPExcel/IComparable.php';
|
||||
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
{
|
||||
{
|
||||
/* Horizontal alignment styles */
|
||||
const HORIZONTAL_GENERAL = 'general';
|
||||
const HORIZONTAL_LEFT = 'left';
|
||||
@@ -54,55 +42,55 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
const HORIZONTAL_CENTER = 'center';
|
||||
const HORIZONTAL_CENTER_CONTINUOUS = 'centerContinuous';
|
||||
const HORIZONTAL_JUSTIFY = 'justify';
|
||||
|
||||
|
||||
/* Vertical alignment styles */
|
||||
const VERTICAL_BOTTOM = 'bottom';
|
||||
const VERTICAL_TOP = 'top';
|
||||
const VERTICAL_CENTER = 'center';
|
||||
const VERTICAL_JUSTIFY = 'justify';
|
||||
|
||||
|
||||
/**
|
||||
* Horizontal
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_horizontal;
|
||||
|
||||
|
||||
/**
|
||||
* Vertical
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_vertical;
|
||||
|
||||
|
||||
/**
|
||||
* Text rotation
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $_textRotation;
|
||||
|
||||
|
||||
/**
|
||||
* Wrap text
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_wrapText;
|
||||
|
||||
|
||||
/**
|
||||
* Shrink to fit
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_shrinkToFit;
|
||||
|
||||
|
||||
/**
|
||||
* Indent - only possible with horizontal alignment left and right
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $_indent;
|
||||
|
||||
|
||||
/**
|
||||
* Parent Borders
|
||||
*
|
||||
@@ -219,7 +207,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
|
||||
/**
|
||||
* Apply styles from array
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* $objPHPExcel->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray(
|
||||
* array(
|
||||
@@ -230,7 +218,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
* )
|
||||
* );
|
||||
* </code>
|
||||
*
|
||||
*
|
||||
* @param array $pStyles Array containing style information
|
||||
* @throws Exception
|
||||
* @return PHPExcel_Style_Alignment
|
||||
@@ -264,7 +252,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Horizontal
|
||||
*
|
||||
@@ -276,7 +264,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this->_horizontal;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set Horizontal
|
||||
*
|
||||
@@ -287,7 +275,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
if ($pValue == '') {
|
||||
$pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL;
|
||||
}
|
||||
|
||||
|
||||
if ($this->_isSupervisor) {
|
||||
$styleArray = $this->getStyleArray(array('horizontal' => $pValue));
|
||||
$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
|
||||
@@ -297,7 +285,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Vertical
|
||||
*
|
||||
@@ -309,7 +297,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this->_vertical;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set Vertical
|
||||
*
|
||||
@@ -320,7 +308,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
if ($pValue == '') {
|
||||
$pValue = PHPExcel_Style_Alignment::VERTICAL_BOTTOM;
|
||||
}
|
||||
|
||||
|
||||
if ($this->_isSupervisor) {
|
||||
$styleArray = $this->getStyleArray(array('vertical' => $pValue));
|
||||
$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
|
||||
@@ -329,7 +317,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get TextRotation
|
||||
*
|
||||
@@ -341,7 +329,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this->_textRotation;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set TextRotation
|
||||
*
|
||||
@@ -366,10 +354,10 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
} else {
|
||||
throw new Exception("Text rotation should be a value between -90 and 90.");
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Wrap Text
|
||||
*
|
||||
@@ -381,7 +369,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this->_wrapText;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set Wrap Text
|
||||
*
|
||||
@@ -400,7 +388,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get Shrink to fit
|
||||
*
|
||||
@@ -412,7 +400,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this->_shrinkToFit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set Shrink to fit
|
||||
*
|
||||
@@ -443,7 +431,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this->_indent;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set indent
|
||||
*
|
||||
@@ -464,12 +452,12 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get hash code
|
||||
*
|
||||
* @return string Hash code
|
||||
*/
|
||||
*/
|
||||
public function getHashCode() {
|
||||
if ($this->_isSupervisor) {
|
||||
return $this->getSharedComponent()->getHashCode();
|
||||
@@ -484,7 +472,7 @@ class PHPExcel_Style_Alignment implements PHPExcel_IComparable
|
||||
. __CLASS__
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implement PHP __clone to create a deep clone, not just a shallow copy.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user