1 | <?php |
||
27 | class SpContainer |
||
28 | { |
||
29 | /** |
||
30 | * Parent Shape Group Container. |
||
31 | * |
||
32 | * @var \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer |
||
33 | */ |
||
34 | private $parent; |
||
35 | |||
36 | /** |
||
37 | * Is this a group shape? |
||
38 | * |
||
39 | * @var bool |
||
40 | */ |
||
41 | private $spgr = false; |
||
42 | |||
43 | /** |
||
44 | * Shape type. |
||
45 | * |
||
46 | * @var int |
||
47 | */ |
||
48 | private $spType; |
||
49 | |||
50 | /** |
||
51 | * Shape flag. |
||
52 | * |
||
53 | * @var int |
||
54 | */ |
||
55 | private $spFlag; |
||
56 | |||
57 | /** |
||
58 | * Shape index (usually group shape has index 0, and the rest: 1,2,3...). |
||
59 | * |
||
60 | * @var int |
||
61 | */ |
||
62 | private $spId; |
||
63 | |||
64 | /** |
||
65 | * Array of options. |
||
66 | * |
||
67 | * @var array |
||
68 | */ |
||
69 | private $OPT; |
||
70 | |||
71 | /** |
||
72 | * Cell coordinates of upper-left corner of shape, e.g. 'A1'. |
||
73 | * |
||
74 | * @var string |
||
75 | */ |
||
76 | private $startCoordinates; |
||
77 | |||
78 | /** |
||
79 | * Horizontal offset of upper-left corner of shape measured in 1/1024 of column width. |
||
80 | * |
||
81 | * @var int |
||
82 | */ |
||
83 | private $startOffsetX; |
||
84 | |||
85 | /** |
||
86 | * Vertical offset of upper-left corner of shape measured in 1/256 of row height. |
||
87 | * |
||
88 | * @var int |
||
89 | */ |
||
90 | private $startOffsetY; |
||
91 | |||
92 | /** |
||
93 | * Cell coordinates of bottom-right corner of shape, e.g. 'B2'. |
||
94 | * |
||
95 | * @var string |
||
96 | */ |
||
97 | private $endCoordinates; |
||
98 | |||
99 | /** |
||
100 | * Horizontal offset of bottom-right corner of shape measured in 1/1024 of column width. |
||
101 | * |
||
102 | * @var int |
||
103 | */ |
||
104 | private $endOffsetX; |
||
105 | |||
106 | /** |
||
107 | * Vertical offset of bottom-right corner of shape measured in 1/256 of row height. |
||
108 | * |
||
109 | * @var int |
||
110 | */ |
||
111 | private $endOffsetY; |
||
112 | |||
113 | /** |
||
114 | * Set parent Shape Group Container. |
||
115 | * |
||
116 | * @param \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer $parent |
||
117 | */ |
||
118 | 10 | public function setParent($parent) |
|
122 | |||
123 | /** |
||
124 | * Get the parent Shape Group Container. |
||
125 | * |
||
126 | * @return \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer |
||
127 | */ |
||
128 | 3 | public function getParent() |
|
132 | |||
133 | /** |
||
134 | * Set whether this is a group shape. |
||
135 | * |
||
136 | * @param bool $value |
||
137 | */ |
||
138 | 10 | public function setSpgr($value = false) |
|
142 | |||
143 | /** |
||
144 | * Get whether this is a group shape. |
||
145 | * |
||
146 | * @return bool |
||
147 | */ |
||
148 | 10 | public function getSpgr() |
|
149 | { |
||
150 | 10 | return $this->spgr; |
|
151 | } |
||
152 | |||
153 | /** |
||
154 | * Set the shape type. |
||
155 | * |
||
156 | * @param int $value |
||
157 | */ |
||
158 | 10 | public function setSpType($value) |
|
162 | |||
163 | /** |
||
164 | * Get the shape type. |
||
165 | * |
||
166 | * @return int |
||
167 | */ |
||
168 | 10 | public function getSpType() |
|
169 | { |
||
170 | 10 | return $this->spType; |
|
171 | } |
||
172 | |||
173 | /** |
||
174 | * Set the shape flag. |
||
175 | * |
||
176 | * @param int $value |
||
177 | */ |
||
178 | 10 | public function setSpFlag($value) |
|
182 | |||
183 | /** |
||
184 | * Get the shape flag. |
||
185 | * |
||
186 | * @return int |
||
187 | */ |
||
188 | 10 | public function getSpFlag() |
|
189 | { |
||
190 | 10 | return $this->spFlag; |
|
191 | } |
||
192 | |||
193 | /** |
||
194 | * Set the shape index. |
||
195 | * |
||
196 | * @param int $value |
||
197 | */ |
||
198 | 10 | public function setSpId($value) |
|
202 | |||
203 | /** |
||
204 | * Get the shape index. |
||
205 | * |
||
206 | * @return int |
||
207 | */ |
||
208 | 10 | public function getSpId() |
|
209 | { |
||
210 | 10 | return $this->spId; |
|
211 | } |
||
212 | |||
213 | /** |
||
214 | * Set an option for the Shape Group Container. |
||
215 | * |
||
216 | * @param int $property The number specifies the option |
||
217 | * @param mixed $value |
||
218 | */ |
||
219 | 10 | public function setOPT($property, $value) |
|
223 | |||
224 | /** |
||
225 | * Get an option for the Shape Group Container. |
||
226 | * |
||
227 | * @param int $property The number specifies the option |
||
228 | * |
||
229 | * @return mixed |
||
230 | */ |
||
231 | 3 | public function getOPT($property) |
|
239 | |||
240 | /** |
||
241 | * Get the collection of options. |
||
242 | * |
||
243 | * @return array |
||
244 | */ |
||
245 | 10 | public function getOPTCollection() |
|
246 | { |
||
247 | 10 | return $this->OPT; |
|
248 | } |
||
249 | |||
250 | /** |
||
251 | * Set cell coordinates of upper-left corner of shape. |
||
252 | * |
||
253 | * @param string $value |
||
254 | */ |
||
255 | 10 | public function setStartCoordinates($value = 'A1') |
|
259 | |||
260 | /** |
||
261 | * Get cell coordinates of upper-left corner of shape. |
||
262 | * |
||
263 | * @return string |
||
264 | */ |
||
265 | 10 | public function getStartCoordinates() |
|
269 | |||
270 | /** |
||
271 | * Set offset in x-direction of upper-left corner of shape measured in 1/1024 of column width. |
||
272 | * |
||
273 | * @param int $startOffsetX |
||
274 | */ |
||
275 | 10 | public function setStartOffsetX($startOffsetX = 0) |
|
279 | |||
280 | /** |
||
281 | * Get offset in x-direction of upper-left corner of shape measured in 1/1024 of column width. |
||
282 | * |
||
283 | * @return int |
||
284 | */ |
||
285 | 10 | public function getStartOffsetX() |
|
289 | |||
290 | /** |
||
291 | * Set offset in y-direction of upper-left corner of shape measured in 1/256 of row height. |
||
292 | * |
||
293 | * @param int $startOffsetY |
||
294 | */ |
||
295 | 10 | public function setStartOffsetY($startOffsetY = 0) |
|
299 | |||
300 | /** |
||
301 | * Get offset in y-direction of upper-left corner of shape measured in 1/256 of row height. |
||
302 | * |
||
303 | * @return int |
||
304 | */ |
||
305 | 10 | public function getStartOffsetY() |
|
309 | |||
310 | /** |
||
311 | * Set cell coordinates of bottom-right corner of shape. |
||
312 | * |
||
313 | * @param string $value |
||
314 | */ |
||
315 | 10 | public function setEndCoordinates($value = 'A1') |
|
319 | |||
320 | /** |
||
321 | * Get cell coordinates of bottom-right corner of shape. |
||
322 | * |
||
323 | * @return string |
||
324 | */ |
||
325 | 10 | public function getEndCoordinates() |
|
329 | |||
330 | /** |
||
331 | * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width. |
||
332 | * |
||
333 | * @param int $endOffsetX |
||
334 | */ |
||
335 | 10 | public function setEndOffsetX($endOffsetX = 0) |
|
339 | |||
340 | /** |
||
341 | * Get offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width. |
||
342 | * |
||
343 | * @return int |
||
344 | */ |
||
345 | 10 | public function getEndOffsetX() |
|
349 | |||
350 | /** |
||
351 | * Set offset in y-direction of bottom-right corner of shape measured in 1/256 of row height. |
||
352 | * |
||
353 | * @param int $endOffsetY |
||
354 | */ |
||
355 | 10 | public function setEndOffsetY($endOffsetY = 0) |
|
359 | |||
360 | /** |
||
361 | * Get offset in y-direction of bottom-right corner of shape measured in 1/256 of row height. |
||
362 | * |
||
363 | * @return int |
||
364 | */ |
||
365 | 10 | public function getEndOffsetY() |
|
369 | |||
370 | /** |
||
371 | * Get the nesting level of this spContainer. This is the number of spgrContainers between this spContainer and |
||
372 | * the dgContainer. A value of 1 = immediately within first spgrContainer |
||
373 | * Higher nesting level occurs if and only if spContainer is part of a shape group. |
||
374 | * |
||
375 | * @return int Nesting level |
||
376 | */ |
||
377 | 3 | public function getNestingLevel() |
|
389 | } |
||
390 |