private function PHPExcel_Writer_Excel5_Worksheet::_writeMsoDrawing in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php \PHPExcel_Writer_Excel5_Worksheet::_writeMsoDrawing()
* Write MSODRAWING record
1 call to PHPExcel_Writer_Excel5_Worksheet::_writeMsoDrawing()
- PHPExcel_Writer_Excel5_Worksheet::close in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Worksheet.php - * Add data to the beginning of the workbook (note the reverse order) * and to the end of the workbook. * * @access public *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ Excel5/ Worksheet.php, line 2733
Class
- PHPExcel_Writer_Excel5_Worksheet
- PHPExcel_Writer_Excel5_Worksheet
Code
private function _writeMsoDrawing() {
// write the Escher stream if necessary
if (isset($this->_escher)) {
$writer = new PHPExcel_Writer_Excel5_Escher($this->_escher);
$data = $writer
->close();
$spOffsets = $writer
->getSpOffsets();
$spTypes = $writer
->getSpTypes();
// write the neccesary MSODRAWING, OBJ records
// split the Escher stream
$spOffsets[0] = 0;
$nm = count($spOffsets) - 1;
// number of shapes excluding first shape
for ($i = 1; $i <= $nm; ++$i) {
// MSODRAWING record
$record = 0xec;
// Record identifier
// chunk of Escher stream for one shape
$dataChunk = substr($data, $spOffsets[$i - 1], $spOffsets[$i] - $spOffsets[$i - 1]);
$length = strlen($dataChunk);
$header = pack("vv", $record, $length);
$this
->_append($header . $dataChunk);
// OBJ record
$record = 0x5d;
// record identifier
$objData = '';
// ftCmo
if ($spTypes[$i] == 0xc9) {
// Add ftCmo (common object data) subobject
$objData .= pack('vvvvvVVV', 0x15, 0x12, 0x14, $i, 0x2101, 0, 0, 0);
// Add ftSbs Scroll bar subobject
$objData .= pack('vv', 0xc, 0x14);
$objData .= pack('H*', '0000000000000000640001000A00000010000100');
// Add ftLbsData (List box data) subobject
$objData .= pack('vv', 0x13, 0x1fee);
$objData .= pack('H*', '00000000010001030000020008005700');
}
else {
// Add ftCmo (common object data) subobject
$objData .= pack('vvvvvVVV', 0x15, 0x12, 0x8, $i, 0x6011, 0, 0, 0);
}
// ftEnd
$objData .= pack('vv', 0x0, 0x0);
$length = strlen($objData);
$header = pack('vv', $record, $length);
$this
->_append($header . $objData);
}
}
}