| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | /** | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |  * PHPExcel_Worksheet_ColumnDimension | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |  * Copyright (c) 2006 - 2015 PHPExcel | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * 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. | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |  * 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. | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |  * 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 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @category   PHPExcel | 
					
						
							|  |  |  |  * @package    PHPExcel_Worksheet | 
					
						
							| 
									
										
										
										
											2015-05-02 22:50:37 +00:00
										 |  |  |  * @copyright  Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) | 
					
						
							| 
									
										
										
										
											2015-05-12 09:22:06 +00:00
										 |  |  |  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |  * @version    ##VERSION##, ##DATE##
 | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  | class PHPExcel_Worksheet_ColumnDimension extends PHPExcel_Worksheet_Dimension | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Column index | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var int | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |     private $columnIndex; | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Column width | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * When this is set to a negative value, the column width should be ignored by IWriter | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var double | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |     private $width = -1; | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Auto size? | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var bool | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |     private $autoSize = false; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Create a new PHPExcel_Worksheet_ColumnDimension | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $pIndex Character column index | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function __construct($pIndex = 'A') | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |         // Initialise values
 | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |         $this->columnIndex = $pIndex; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |         // set dimension as unformatted by default
 | 
					
						
							|  |  |  |         parent::__construct(0); | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Get ColumnIndex | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return string | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     public function getColumnIndex() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |         return $this->columnIndex; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set ColumnIndex | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $pValue | 
					
						
							|  |  |  |      * @return PHPExcel_Worksheet_ColumnDimension | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     public function setColumnIndex($pValue) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |         $this->columnIndex = $pValue; | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |         return $this; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Get Width | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return double | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     public function getWidth() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |         return $this->width; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set Width | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param double $pValue | 
					
						
							|  |  |  |      * @return PHPExcel_Worksheet_ColumnDimension | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     public function setWidth($pValue = -1) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |         $this->width = $pValue; | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |         return $this; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Get Auto Size | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return bool | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     public function getAutoSize() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |         return $this->autoSize; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2010-12-09 12:07:50 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Set Auto Size | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param bool $pValue | 
					
						
							|  |  |  |      * @return PHPExcel_Worksheet_ColumnDimension | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |     public function setAutoSize($pValue = false) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2015-05-17 09:22:51 +00:00
										 |  |  |         $this->autoSize = $pValue; | 
					
						
							| 
									
										
										
										
											2015-05-07 00:14:36 +00:00
										 |  |  |         return $this; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | } |