5
* Copyright (c) 2006 - 2009 PHPExcel
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
* @package PHPExcel_Worksheet
23
* @copyright Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)
24
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25
* @version 1.7.0, 2009-08-10
30
* PHPExcel_Worksheet_SheetView
33
* @package PHPExcel_Worksheet
34
* @copyright Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)
36
class PHPExcel_Worksheet_SheetView
41
* Valid values range from 10 to 400.
50
* Valid values range from 10 to 400.
54
private $_zoomScaleNormal;
57
* Create a new PHPExcel_Worksheet_SheetView
59
public function __construct()
62
$this->_zoomScale = 100;
63
$this->_zoomScaleNormal = 100;
71
public function getZoomScale() {
72
return $this->_zoomScale;
78
* Valid values range from 10 to 400.
82
* @return PHPExcel_Worksheet_SheetView
84
public function setZoomScale($pValue = 100) {
85
if (($pValue >= 10 && $pValue <= 400) || is_null($pValue)) {
86
$this->_zoomScale = $pValue;
88
throw new Exception("Valid scale is between 10 and 400.");
98
public function getZoomScaleNormal() {
99
return $this->_zoomScaleNormal;
105
* Valid values range from 10 to 400.
109
* @return PHPExcel_Worksheet_SheetView
111
public function setZoomScaleNormal($pValue = 100) {
112
if (($pValue >= 10 && $pValue <= 400) || is_null($pValue)) {
113
$this->_zoomScaleNormal = $pValue;
115
throw new Exception("Valid scale is between 10 and 400.");
121
* Implement PHP __clone to create a deep clone, not just a shallow copy.
123
public function __clone() {
124
$vars = get_object_vars($this);
125
foreach ($vars as $key => $value) {
126
if (is_object($value)) {
127
$this->$key = clone $value;
129
$this->$key = $value;