[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer 5 * 6 * Copyright (c) 2006 - 2015 PHPExcel 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 * 22 * @category PHPExcel 23 * @package PHPExcel_Shared_Escher 24 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) 25 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 26 * @version ##VERSION##, ##DATE## 27 */ 28 class PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer 29 { 30 /** 31 * Parent Shape Group Container 32 * 33 * @var PHPExcel_Shared_Escher_DgContainer_SpgrContainer 34 */ 35 private $parent; 36 37 /** 38 * Is this a group shape? 39 * 40 * @var boolean 41 */ 42 private $spgr = false; 43 44 /** 45 * Shape type 46 * 47 * @var int 48 */ 49 private $spType; 50 51 /** 52 * Shape flag 53 * 54 * @var int 55 */ 56 private $spFlag; 57 58 /** 59 * Shape index (usually group shape has index 0, and the rest: 1,2,3...) 60 * 61 * @var boolean 62 */ 63 private $spId; 64 65 /** 66 * Array of options 67 * 68 * @var array 69 */ 70 private $OPT; 71 72 /** 73 * Cell coordinates of upper-left corner of shape, e.g. 'A1' 74 * 75 * @var string 76 */ 77 private $startCoordinates; 78 79 /** 80 * Horizontal offset of upper-left corner of shape measured in 1/1024 of column width 81 * 82 * @var int 83 */ 84 private $startOffsetX; 85 86 /** 87 * Vertical offset of upper-left corner of shape measured in 1/256 of row height 88 * 89 * @var int 90 */ 91 private $startOffsetY; 92 93 /** 94 * Cell coordinates of bottom-right corner of shape, e.g. 'B2' 95 * 96 * @var string 97 */ 98 private $endCoordinates; 99 100 /** 101 * Horizontal offset of bottom-right corner of shape measured in 1/1024 of column width 102 * 103 * @var int 104 */ 105 private $endOffsetX; 106 107 /** 108 * Vertical offset of bottom-right corner of shape measured in 1/256 of row height 109 * 110 * @var int 111 */ 112 private $endOffsetY; 113 114 /** 115 * Set parent Shape Group Container 116 * 117 * @param PHPExcel_Shared_Escher_DgContainer_SpgrContainer $parent 118 */ 119 public function setParent($parent) 120 { 121 $this->parent = $parent; 122 } 123 124 /** 125 * Get the parent Shape Group Container 126 * 127 * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer 128 */ 129 public function getParent() 130 { 131 return $this->parent; 132 } 133 134 /** 135 * Set whether this is a group shape 136 * 137 * @param boolean $value 138 */ 139 public function setSpgr($value = false) 140 { 141 $this->spgr = $value; 142 } 143 144 /** 145 * Get whether this is a group shape 146 * 147 * @return boolean 148 */ 149 public function getSpgr() 150 { 151 return $this->spgr; 152 } 153 154 /** 155 * Set the shape type 156 * 157 * @param int $value 158 */ 159 public function setSpType($value) 160 { 161 $this->spType = $value; 162 } 163 164 /** 165 * Get the shape type 166 * 167 * @return int 168 */ 169 public function getSpType() 170 { 171 return $this->spType; 172 } 173 174 /** 175 * Set the shape flag 176 * 177 * @param int $value 178 */ 179 public function setSpFlag($value) 180 { 181 $this->spFlag = $value; 182 } 183 184 /** 185 * Get the shape flag 186 * 187 * @return int 188 */ 189 public function getSpFlag() 190 { 191 return $this->spFlag; 192 } 193 194 /** 195 * Set the shape index 196 * 197 * @param int $value 198 */ 199 public function setSpId($value) 200 { 201 $this->spId = $value; 202 } 203 204 /** 205 * Get the shape index 206 * 207 * @return int 208 */ 209 public function getSpId() 210 { 211 return $this->spId; 212 } 213 214 /** 215 * Set an option for the Shape Group Container 216 * 217 * @param int $property The number specifies the option 218 * @param mixed $value 219 */ 220 public function setOPT($property, $value) 221 { 222 $this->OPT[$property] = $value; 223 } 224 225 /** 226 * Get an option for the Shape Group Container 227 * 228 * @param int $property The number specifies the option 229 * @return mixed 230 */ 231 public function getOPT($property) 232 { 233 if (isset($this->OPT[$property])) { 234 return $this->OPT[$property]; 235 } 236 return null; 237 } 238 239 /** 240 * Get the collection of options 241 * 242 * @return array 243 */ 244 public function getOPTCollection() 245 { 246 return $this->OPT; 247 } 248 249 /** 250 * Set cell coordinates of upper-left corner of shape 251 * 252 * @param string $value 253 */ 254 public function setStartCoordinates($value = 'A1') 255 { 256 $this->startCoordinates = $value; 257 } 258 259 /** 260 * Get cell coordinates of upper-left corner of shape 261 * 262 * @return string 263 */ 264 public function getStartCoordinates() 265 { 266 return $this->startCoordinates; 267 } 268 269 /** 270 * Set offset in x-direction of upper-left corner of shape measured in 1/1024 of column width 271 * 272 * @param int $startOffsetX 273 */ 274 public function setStartOffsetX($startOffsetX = 0) 275 { 276 $this->startOffsetX = $startOffsetX; 277 } 278 279 /** 280 * Get offset in x-direction of upper-left corner of shape measured in 1/1024 of column width 281 * 282 * @return int 283 */ 284 public function getStartOffsetX() 285 { 286 return $this->startOffsetX; 287 } 288 289 /** 290 * Set offset in y-direction of upper-left corner of shape measured in 1/256 of row height 291 * 292 * @param int $startOffsetY 293 */ 294 public function setStartOffsetY($startOffsetY = 0) 295 { 296 $this->startOffsetY = $startOffsetY; 297 } 298 299 /** 300 * Get offset in y-direction of upper-left corner of shape measured in 1/256 of row height 301 * 302 * @return int 303 */ 304 public function getStartOffsetY() 305 { 306 return $this->startOffsetY; 307 } 308 309 /** 310 * Set cell coordinates of bottom-right corner of shape 311 * 312 * @param string $value 313 */ 314 public function setEndCoordinates($value = 'A1') 315 { 316 $this->endCoordinates = $value; 317 } 318 319 /** 320 * Get cell coordinates of bottom-right corner of shape 321 * 322 * @return string 323 */ 324 public function getEndCoordinates() 325 { 326 return $this->endCoordinates; 327 } 328 329 /** 330 * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width 331 * 332 * @param int $startOffsetX 333 */ 334 public function setEndOffsetX($endOffsetX = 0) 335 { 336 $this->endOffsetX = $endOffsetX; 337 } 338 339 /** 340 * Get offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width 341 * 342 * @return int 343 */ 344 public function getEndOffsetX() 345 { 346 return $this->endOffsetX; 347 } 348 349 /** 350 * Set offset in y-direction of bottom-right corner of shape measured in 1/256 of row height 351 * 352 * @param int $endOffsetY 353 */ 354 public function setEndOffsetY($endOffsetY = 0) 355 { 356 $this->endOffsetY = $endOffsetY; 357 } 358 359 /** 360 * Get offset in y-direction of bottom-right corner of shape measured in 1/256 of row height 361 * 362 * @return int 363 */ 364 public function getEndOffsetY() 365 { 366 return $this->endOffsetY; 367 } 368 369 /** 370 * Get the nesting level of this spContainer. This is the number of spgrContainers between this spContainer and 371 * the dgContainer. A value of 1 = immediately within first spgrContainer 372 * Higher nesting level occurs if and only if spContainer is part of a shape group 373 * 374 * @return int Nesting level 375 */ 376 public function getNestingLevel() 377 { 378 $nestingLevel = 0; 379 380 $parent = $this->getParent(); 381 while ($parent instanceof PHPExcel_Shared_Escher_DgContainer_SpgrContainer) { 382 ++$nestingLevel; 383 $parent = $parent->getParent(); 384 } 385 386 return $nestingLevel; 387 } 388 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |