Build the Worksheet Escher objects.
252 $lastReducedSpId = 0;
255 foreach ($this->_phpExcel->getAllsheets() as $sheet) {
257 $sheetIndex = $sheet->getParent()->getIndex($sheet);
262 $filterRange = $sheet->getAutoFilter()->getRange();
263 if (count($sheet->getDrawingCollection()) == 0 && empty($filterRange)) {
274 $dgId = $sheet->getParent()->getIndex($sheet) + 1;
275 $dgContainer->setDgId($dgId);
276 $escher->setDgContainer($dgContainer);
280 $dgContainer->setSpgrContainer($spgrContainer);
284 $spContainer->setSpgr(
true);
285 $spContainer->setSpType(0);
286 $spContainer->setSpId(($sheet->getParent()->getIndex($sheet) + 1) << 10);
287 $spgrContainer->addChild($spContainer);
291 $countShapes[$sheetIndex] = 0;
293 foreach ($sheet->getDrawingCollection() as $drawing) {
296 ++$countShapes[$sheetIndex];
302 $spContainer->setSpType(0x004B);
304 $spContainer->setSpFlag(0x02);
307 $reducedSpId = $countShapes[$sheetIndex];
309 | ($sheet->getParent()->getIndex($sheet) + 1) << 10;
310 $spContainer->setSpId($spId);
313 $lastReducedSpId = $reducedSpId;
319 $spContainer->setOPT(0x4104, $blipIndex);
322 $coordinates = $drawing->getCoordinates();
323 $offsetX = $drawing->getOffsetX();
324 $offsetY = $drawing->getOffsetY();
325 $width = $drawing->getWidth();
326 $height = $drawing->getHeight();
330 $spContainer->setStartCoordinates($twoAnchor[
'startCoordinates']);
331 $spContainer->setStartOffsetX($twoAnchor[
'startOffsetX']);
332 $spContainer->setStartOffsetY($twoAnchor[
'startOffsetY']);
333 $spContainer->setEndCoordinates($twoAnchor[
'endCoordinates']);
334 $spContainer->setEndOffsetX($twoAnchor[
'endOffsetX']);
335 $spContainer->setEndOffsetY($twoAnchor[
'endOffsetY']);
337 $spgrContainer->addChild($spContainer);
341 if(!empty($filterRange)){
343 $iNumColStart = $rangeBounds[0][0];
344 $iNumColEnd = $rangeBounds[1][0];
346 $iInc = $iNumColStart;
347 while($iInc <= $iNumColEnd){
348 ++$countShapes[$sheetIndex];
354 $oDrawing->setCoordinates($cDrawing);
355 $oDrawing->setWorksheet($sheet);
360 $spContainer->setSpType(0x00C9);
362 $spContainer->setSpFlag(0x01);
365 $reducedSpId = $countShapes[$sheetIndex];
367 | ($sheet->getParent()->getIndex($sheet) + 1) << 10;
368 $spContainer->setSpId($spId);
371 $lastReducedSpId = $reducedSpId;
376 $spContainer->setOPT(0x007F, 0x01040104);
377 $spContainer->setOPT(0x00BF, 0x00080008);
378 $spContainer->setOPT(0x01BF, 0x00010000);
379 $spContainer->setOPT(0x01FF, 0x00080000);
380 $spContainer->setOPT(0x03BF, 0x000A0000);
384 $endCoordinates .= $rangeBounds[0][1] + 1;
386 $spContainer->setStartCoordinates($cDrawing);
387 $spContainer->setStartOffsetX(0);
388 $spContainer->setStartOffsetY(0);
389 $spContainer->setEndCoordinates($endCoordinates);
390 $spContainer->setEndOffsetX(0);
391 $spContainer->setEndOffsetY(0);
393 $spgrContainer->addChild($spContainer);
399 $this->_IDCLs[$dgId] = $lastReducedSpId;
402 $dgContainer->setLastSpId($lastSpId);
405 $this->_writerWorksheets[$sheetIndex]->setEscher($escher);
static rangeBoundaries($pRange='A1:A1')
Calculate range boundaries.
static oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height)
Convert 1-cell anchor coordinates to 2-cell anchor coordinates This function is ported from PEAR Spre...
static stringFromColumnIndex($pColumnIndex=0)
String from columnindex.