Process the object to be written.
80 switch (get_class($this->_object)) {
82 case 'PHPExcel_Shared_Escher':
83 if ($dggContainer = $this->_object->getDggContainer()) {
85 $this->_data = $writer->close();
86 }
else if ($dgContainer = $this->_object->getDgContainer()) {
88 $this->_data = $writer->close();
89 $this->_spOffsets = $writer->getSpOffsets();
90 $this->_spTypes = $writer->getSpTypes();
94 case 'PHPExcel_Shared_Escher_DggContainer':
102 $recInstance = 0x0000;
105 $recVerInstance = $recVer;
106 $recVerInstance |= $recInstance << 4;
111 , $this->_object->getSpIdMax()
112 , $this->_object->getCDgSaved() + 1
113 , $this->_object->getCSpSaved()
114 , $this->_object->getCDgSaved()
118 $IDCLs = $this->_object->getIDCLs();
120 foreach ($IDCLs as $dgId => $maxReducedSpId) {
121 $dggData .= pack(
'VV', $dgId, $maxReducedSpId + 1);
124 $header = pack(
'vvV', $recVerInstance, $recType, strlen($dggData));
125 $innerData .=
$header . $dggData;
128 if ($bstoreContainer = $this->_object->getBstoreContainer()) {
130 $innerData .= $writer->close();
135 $recInstance = 0x0000;
137 $length = strlen($innerData);
139 $recVerInstance = $recVer;
140 $recVerInstance |= $recInstance << 4;
142 $header = pack(
'vvV', $recVerInstance, $recType, $length);
144 $this->_data =
$header . $innerData;
147 case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer':
154 if ($BSECollection = $this->_object->getBSECollection()) {
155 foreach ($BSECollection as $BSE) {
157 $innerData .= $writer->close();
163 $recInstance = count($this->_object->getBSECollection());
165 $length = strlen($innerData);
167 $recVerInstance = $recVer;
168 $recVerInstance |= $recInstance << 4;
170 $header = pack(
'vvV', $recVerInstance, $recType, $length);
172 $this->_data =
$header . $innerData;
175 case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE':
182 if ($blip = $this->_object->getBlip()) {
184 $innerData .= $writer->close();
190 $btWin32 = $this->_object->getBlipType();
191 $btMacOS = $this->_object->getBlipType();
192 $data .= pack(
'CC', $btWin32, $btMacOS);
194 $rgbUid = pack(
'VVVV', 0,0,0,0);
198 $size = strlen($innerData);
205 $data .= pack(
'vVVVCCCC',
$tag,
$size, $cRef, $foDelay, $unused1, $cbName, $unused2, $unused3);
211 $recInstance = $this->_object->getBlipType();
213 $length = strlen(
$data);
215 $recVerInstance = $recVer;
216 $recVerInstance |= $recInstance << 4;
218 $header = pack(
'vvV', $recVerInstance, $recType, $length);
222 $this->_data .=
$data;
225 case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip':
229 switch ($this->_object->getParent()->getBlipType()) {
235 $rgbUid1 = pack(
'VVVV', 0,0,0,0);
236 $innerData .= $rgbUid1;
239 $innerData .= pack(
'C',
$tag);
241 $innerData .= $this->_object->getData();
244 $recInstance = 0x46A;
246 $length = strlen($innerData);
248 $recVerInstance = $recVer;
249 $recVerInstance |= $recInstance << 4;
251 $header = pack(
'vvV', $recVerInstance, $recType, $length);
255 $this->_data .= $innerData;
262 $rgbUid1 = pack(
'VVVV', 0,0,0,0);
263 $innerData .= $rgbUid1;
266 $innerData .= pack(
'C',
$tag);
268 $innerData .= $this->_object->getData();
271 $recInstance = 0x6E0;
273 $length = strlen($innerData);
275 $recVerInstance = $recVer;
276 $recVerInstance |= $recInstance << 4;
278 $header = pack(
'vvV', $recVerInstance, $recType, $length);
282 $this->_data .= $innerData;
288 case 'PHPExcel_Shared_Escher_DgContainer':
296 $recInstance = $this->_object->getDgId();
300 $recVerInstance = $recVer;
301 $recVerInstance |= $recInstance << 4;
303 $header = pack(
'vvV', $recVerInstance, $recType, $length);
306 $countShapes = count($this->_object->getSpgrContainer()->getChildren());
307 $innerData .=
$header . pack(
'VV', $countShapes, $this->_object->getLastSpId());
311 if ($spgrContainer = $this->_object->getSpgrContainer()) {
313 $innerData .= $writer->close();
316 $spOffsets = $writer->getSpOffsets();
317 $spTypes = $writer->getSpTypes();
320 foreach ($spOffsets as & $spOffset) {
324 $this->_spOffsets = $spOffsets;
325 $this->_spTypes = $spTypes;
330 $recInstance = 0x0000;
332 $length = strlen($innerData);
334 $recVerInstance = $recVer;
335 $recVerInstance |= $recInstance << 4;
337 $header = pack(
'vvV', $recVerInstance, $recType, $length);
339 $this->_data =
$header . $innerData;
342 case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer':
350 $spOffsets =
array();
354 foreach ($this->_object->getChildren() as $spContainer) {
356 $spData = $writer->close();
357 $innerData .= $spData;
360 $totalSize += strlen($spData);
361 $spOffsets[] = $totalSize;
363 $spTypes = array_merge($spTypes, $writer->getSpTypes());
368 $recInstance = 0x0000;
370 $length = strlen($innerData);
372 $recVerInstance = $recVer;
373 $recVerInstance |= $recInstance << 4;
375 $header = pack(
'vvV', $recVerInstance, $recType, $length);
377 $this->_data =
$header . $innerData;
378 $this->_spOffsets = $spOffsets;
379 $this->_spTypes = $spTypes;
382 case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer':
389 if ($this->_object->getSpgr()) {
391 $recInstance = 0x0000;
393 $length = 0x00000010;
395 $recVerInstance = $recVer;
396 $recVerInstance |= $recInstance << 4;
398 $header = pack(
'vvV', $recVerInstance, $recType, $length);
402 $this->_spTypes[] = ($this->_object->getSpType());
406 $recInstance = $this->_object->getSpType();
408 $length = 0x00000008;
410 $recVerInstance = $recVer;
411 $recVerInstance |= $recInstance << 4;
413 $header = pack(
'vvV', $recVerInstance, $recType, $length);
415 $data .=
$header . pack(
'VV', $this->_object->getSpId(), $this->_object->getSpgr() ? 0x0005 : 0x0A00);
419 if ($this->_object->getOPTCollection()) {
423 $recInstance = count($this->_object->getOPTCollection());
425 foreach ($this->_object->getOPTCollection() as $property => $value) {
426 $optData .= pack(
'vV', $property, $value);
428 $length = strlen($optData);
430 $recVerInstance = $recVer;
431 $recVerInstance |= $recInstance << 4;
433 $header = pack(
'vvV', $recVerInstance, $recType, $length);
438 if ($this->_object->getStartCoordinates()) {
439 $clientAnchorData =
'';
451 $startOffsetX = $this->_object->getStartOffsetX();
454 $startOffsetY = $this->_object->getStartOffsetY();
462 $endOffsetX = $this->_object->getEndOffsetX();
465 $endOffsetY = $this->_object->getEndOffsetY();
467 $clientAnchorData = pack(
'vvvvvvvvv', $this->_object->getSpFlag(),
468 $c1, $startOffsetX, $r1, $startOffsetY,
469 $c2, $endOffsetX, $r2, $endOffsetY);
471 $length = strlen($clientAnchorData);
473 $recVerInstance = $recVer;
474 $recVerInstance |= $recInstance << 4;
476 $header = pack(
'vvV', $recVerInstance, $recType, $length);
481 if (!$this->_object->getSpgr()) {
482 $clientDataData =
'';
488 $length = strlen($clientDataData);
490 $recVerInstance = $recVer;
491 $recVerInstance |= $recInstance << 4;
493 $header = pack(
'vvV', $recVerInstance, $recType, $length);
499 $recInstance = 0x0000;
501 $length = strlen(
$data);
503 $recVerInstance = $recVer;
504 $recVerInstance |= $recInstance << 4;
506 $header = pack(
'vvV', $recVerInstance, $recType, $length);
static coordinateFromString($pCoordinateString='A1')
Coordinate from string.
$_data
The written binary data.
Create styles array
The data for the language used.
static columnIndexFromString($pString='A')
Column index from string.
if(function_exists('posix_getuid') &&posix_getuid()===0) if(!array_key_exists('t', $options)) $tag