Merge branch 'psr2' into develop
This commit is contained in:
commit
4c0434d608
|
@ -43,7 +43,7 @@ class PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Shared_Escher_DggContainer_BstoreContainer
|
* @var PHPExcel_Shared_Escher_DggContainer_BstoreContainer
|
||||||
*/
|
*/
|
||||||
private $_parent;
|
private $parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The BLIP (Big Large Image or Picture)
|
* The BLIP (Big Large Image or Picture)
|
||||||
|
@ -66,7 +66,7 @@ class PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE
|
||||||
*/
|
*/
|
||||||
public function setParent($parent)
|
public function setParent($parent)
|
||||||
{
|
{
|
||||||
$this->_parent = $parent;
|
$this->parent = $parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -73,7 +73,7 @@ class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_Write
|
||||||
// Loop through comments
|
// Loop through comments
|
||||||
$objWriter->startElement('commentList');
|
$objWriter->startElement('commentList');
|
||||||
foreach ($comments as $key => $value) {
|
foreach ($comments as $key => $value) {
|
||||||
$this->_writeComment($objWriter, $key, $value, $authors);
|
$this->writeComment($objWriter, $key, $value, $authors);
|
||||||
}
|
}
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_Write
|
||||||
* @param array $pAuthors Array of authors
|
* @param array $pAuthors Array of authors
|
||||||
* @throws PHPExcel_Writer_Exception
|
* @throws PHPExcel_Writer_Exception
|
||||||
*/
|
*/
|
||||||
public function _writeComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null, $pAuthors = null)
|
private function writeComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null, $pAuthors = null)
|
||||||
{
|
{
|
||||||
// comment
|
// comment
|
||||||
$objWriter->startElement('comment');
|
$objWriter->startElement('comment');
|
||||||
|
@ -170,7 +170,7 @@ class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_Write
|
||||||
|
|
||||||
// Loop through comments
|
// Loop through comments
|
||||||
foreach ($comments as $key => $value) {
|
foreach ($comments as $key => $value) {
|
||||||
$this->_writeVMLComment($objWriter, $key, $value);
|
$this->writeVMLComment($objWriter, $key, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
|
@ -187,7 +187,7 @@ class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_Write
|
||||||
* @param PHPExcel_Comment $pComment Comment
|
* @param PHPExcel_Comment $pComment Comment
|
||||||
* @throws PHPExcel_Writer_Exception
|
* @throws PHPExcel_Writer_Exception
|
||||||
*/
|
*/
|
||||||
public function _writeVMLComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null)
|
private function writeVMLComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null)
|
||||||
{
|
{
|
||||||
// Metadata
|
// Metadata
|
||||||
list($column, $row) = PHPExcel_Cell::coordinateFromString($pCellReference);
|
list($column, $row) = PHPExcel_Cell::coordinateFromString($pCellReference);
|
||||||
|
|
|
@ -58,7 +58,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$iterator = $pWorksheet->getDrawingCollection()->getIterator();
|
$iterator = $pWorksheet->getDrawingCollection()->getIterator();
|
||||||
while ($iterator->valid()) {
|
while ($iterator->valid()) {
|
||||||
$this->_writeDrawing($objWriter, $iterator->current(), $i);
|
$this->writeDrawing($objWriter, $iterator->current(), $i);
|
||||||
|
|
||||||
$iterator->next();
|
$iterator->next();
|
||||||
++$i;
|
++$i;
|
||||||
|
@ -69,7 +69,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
|
||||||
// Loop through charts and write the chart position
|
// Loop through charts and write the chart position
|
||||||
if ($chartCount > 0) {
|
if ($chartCount > 0) {
|
||||||
for ($c = 0; $c < $chartCount; ++$c) {
|
for ($c = 0; $c < $chartCount; ++$c) {
|
||||||
$this->_writeChart($objWriter, $pWorksheet->getChartByIndex($c), $c+$i);
|
$this->writeChart($objWriter, $pWorksheet->getChartByIndex($c), $c+$i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
|
||||||
* @param int $pRelationId
|
* @param int $pRelationId
|
||||||
* @throws PHPExcel_Writer_Exception
|
* @throws PHPExcel_Writer_Exception
|
||||||
*/
|
*/
|
||||||
public function _writeChart(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Chart $pChart = null, $pRelationId = -1)
|
public function writeChart(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Chart $pChart = null, $pRelationId = -1)
|
||||||
{
|
{
|
||||||
$tl = $pChart->getTopLeftPosition();
|
$tl = $pChart->getTopLeftPosition();
|
||||||
$tl['colRow'] = PHPExcel_Cell::coordinateFromString($tl['cell']);
|
$tl['colRow'] = PHPExcel_Cell::coordinateFromString($tl['cell']);
|
||||||
|
@ -160,7 +160,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
|
||||||
* @param int $pRelationId
|
* @param int $pRelationId
|
||||||
* @throws PHPExcel_Writer_Exception
|
* @throws PHPExcel_Writer_Exception
|
||||||
*/
|
*/
|
||||||
public function _writeDrawing(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet_BaseDrawing $pDrawing = null, $pRelationId = -1)
|
public function writeDrawing(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet_BaseDrawing $pDrawing = null, $pRelationId = -1)
|
||||||
{
|
{
|
||||||
if ($pRelationId >= 0) {
|
if ($pRelationId >= 0) {
|
||||||
// xdr:oneCellAnchor
|
// xdr:oneCellAnchor
|
||||||
|
@ -508,7 +508,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
|
||||||
|
|
||||||
// Loop through images
|
// Loop through images
|
||||||
foreach ($images as $key => $value) {
|
foreach ($images as $key => $value) {
|
||||||
$this->_writeVMLHeaderFooterImage($objWriter, $key, $value);
|
$this->writeVMLHeaderFooterImage($objWriter, $key, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
|
@ -525,7 +525,7 @@ class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_Writer
|
||||||
* @param PHPExcel_Worksheet_HeaderFooterDrawing $pImage Image
|
* @param PHPExcel_Worksheet_HeaderFooterDrawing $pImage Image
|
||||||
* @throws PHPExcel_Writer_Exception
|
* @throws PHPExcel_Writer_Exception
|
||||||
*/
|
*/
|
||||||
public function _writeVMLHeaderFooterImage(PHPExcel_Shared_XMLWriter $objWriter = null, $pReference = '', PHPExcel_Worksheet_HeaderFooterDrawing $pImage = null)
|
private function writeVMLHeaderFooterImage(PHPExcel_Shared_XMLWriter $objWriter = null, $pReference = '', PHPExcel_Worksheet_HeaderFooterDrawing $pImage = null)
|
||||||
{
|
{
|
||||||
// Calculate object id
|
// Calculate object id
|
||||||
preg_match('{(\d+)}', md5($pReference), $m);
|
preg_match('{(\d+)}', md5($pReference), $m);
|
||||||
|
|
|
@ -123,12 +123,12 @@ class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExce
|
||||||
$this->colors = array();
|
$this->colors = array();
|
||||||
|
|
||||||
// Initialise workbook writer
|
// Initialise workbook writer
|
||||||
$this->_writerWorkbook = new PHPExcel_Writer_Excel5_Workbook($this->phpExcel, $this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser);
|
$this->writerWorkbook = new PHPExcel_Writer_Excel5_Workbook($this->phpExcel, $this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser);
|
||||||
|
|
||||||
// Initialise worksheet writers
|
// Initialise worksheet writers
|
||||||
$countSheets = $this->phpExcel->getSheetCount();
|
$countSheets = $this->phpExcel->getSheetCount();
|
||||||
for ($i = 0; $i < $countSheets; ++$i) {
|
for ($i = 0; $i < $countSheets; ++$i) {
|
||||||
$this->_writerWorksheets[$i] = new PHPExcel_Writer_Excel5_Worksheet($this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser, $this->preCalculateFormulas, $this->phpExcel->getSheet($i));
|
$this->writerWorksheets[$i] = new PHPExcel_Writer_Excel5_Worksheet($this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser, $this->preCalculateFormulas, $this->phpExcel->getSheet($i));
|
||||||
}
|
}
|
||||||
|
|
||||||
// build Escher objects. Escher objects for workbooks needs to be build before Escher object for workbook.
|
// build Escher objects. Escher objects for workbooks needs to be build before Escher object for workbook.
|
||||||
|
@ -139,25 +139,25 @@ class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExce
|
||||||
// for now, we use the first cellXf instead of cellStyleXf
|
// for now, we use the first cellXf instead of cellStyleXf
|
||||||
$cellXfCollection = $this->phpExcel->getCellXfCollection();
|
$cellXfCollection = $this->phpExcel->getCellXfCollection();
|
||||||
for ($i = 0; $i < 15; ++$i) {
|
for ($i = 0; $i < 15; ++$i) {
|
||||||
$this->_writerWorkbook->addXfWriter($cellXfCollection[0], true);
|
$this->writerWorkbook->addXfWriter($cellXfCollection[0], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add all the cell Xfs
|
// add all the cell Xfs
|
||||||
foreach ($this->phpExcel->getCellXfCollection() as $style) {
|
foreach ($this->phpExcel->getCellXfCollection() as $style) {
|
||||||
$this->_writerWorkbook->addXfWriter($style, false);
|
$this->writerWorkbook->addXfWriter($style, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add fonts from rich text eleemnts
|
// add fonts from rich text eleemnts
|
||||||
for ($i = 0; $i < $countSheets; ++$i) {
|
for ($i = 0; $i < $countSheets; ++$i) {
|
||||||
foreach ($this->_writerWorksheets[$i]->_phpSheet->getCellCollection() as $cellID) {
|
foreach ($this->writerWorksheets[$i]->_phpSheet->getCellCollection() as $cellID) {
|
||||||
$cell = $this->_writerWorksheets[$i]->_phpSheet->getCell($cellID);
|
$cell = $this->writerWorksheets[$i]->_phpSheet->getCell($cellID);
|
||||||
$cVal = $cell->getValue();
|
$cVal = $cell->getValue();
|
||||||
if ($cVal instanceof PHPExcel_RichText) {
|
if ($cVal instanceof PHPExcel_RichText) {
|
||||||
$elements = $cVal->getRichTextElements();
|
$elements = $cVal->getRichTextElements();
|
||||||
foreach ($elements as $element) {
|
foreach ($elements as $element) {
|
||||||
if ($element instanceof PHPExcel_RichText_Run) {
|
if ($element instanceof PHPExcel_RichText_Run) {
|
||||||
$font = $element->getFont();
|
$font = $element->getFont();
|
||||||
$this->_writerWorksheets[$i]->_fntHashIndex[$font->getHashCode()] = $this->_writerWorkbook->_addFont($font);
|
$this->writerWorksheets[$i]->_fntHashIndex[$font->getHashCode()] = $this->writerWorkbook->addFont($font);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,16 +172,16 @@ class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExce
|
||||||
// because the byte sizes of these are needed in the global workbook stream
|
// because the byte sizes of these are needed in the global workbook stream
|
||||||
$worksheetSizes = array();
|
$worksheetSizes = array();
|
||||||
for ($i = 0; $i < $countSheets; ++$i) {
|
for ($i = 0; $i < $countSheets; ++$i) {
|
||||||
$this->_writerWorksheets[$i]->close();
|
$this->writerWorksheets[$i]->close();
|
||||||
$worksheetSizes[] = $this->_writerWorksheets[$i]->_datasize;
|
$worksheetSizes[] = $this->writerWorksheets[$i]->_datasize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add binary data for global workbook stream
|
// add binary data for global workbook stream
|
||||||
$OLE->append($this->_writerWorkbook->writeWorkbook($worksheetSizes));
|
$OLE->append($this->writerWorkbook->writeWorkbook($worksheetSizes));
|
||||||
|
|
||||||
// add binary data for sheet streams
|
// add binary data for sheet streams
|
||||||
for ($i = 0; $i < $countSheets; ++$i) {
|
for ($i = 0; $i < $countSheets; ++$i) {
|
||||||
$OLE->append($this->_writerWorksheets[$i]->getData());
|
$OLE->append($this->writerWorksheets[$i]->getData());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->documentSummaryInformation = $this->writeDocumentSummaryInformation();
|
$this->documentSummaryInformation = $this->writeDocumentSummaryInformation();
|
||||||
|
@ -391,7 +391,7 @@ class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExce
|
||||||
$dgContainer->setLastSpId($lastSpId);
|
$dgContainer->setLastSpId($lastSpId);
|
||||||
|
|
||||||
// set the Escher object
|
// set the Escher object
|
||||||
$this->_writerWorksheets[$sheetIndex]->setEscher($escher);
|
$this->writerWorksheets[$sheetIndex]->setEscher($escher);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the Escher object
|
// Set the Escher object
|
||||||
$this->_writerWorkbook->setEscher($escher);
|
$this->writerWorkbook->setEscher($escher);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -58,15 +59,6 @@
|
||||||
// * License along with this library; if not, write to the Free Software
|
// * License along with this library; if not, write to the Free Software
|
||||||
// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
// */
|
// */
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Writer_Excel5_BIFFwriter
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Writer_Excel5
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Writer_Excel5_BIFFwriter
|
class PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -88,11 +80,11 @@ class PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
public $_datasize;
|
public $_datasize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum length for a BIFF record (excluding record header and length field). See _addContinue()
|
* The maximum length for a BIFF record (excluding record header and length field). See addContinue()
|
||||||
* @var integer
|
* @var integer
|
||||||
* @see _addContinue()
|
* @see addContinue()
|
||||||
*/
|
*/
|
||||||
public $_limit = 8224;
|
private $limit = 8224;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@ -101,7 +93,7 @@ class PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
{
|
{
|
||||||
$this->_data = '';
|
$this->_data = '';
|
||||||
$this->_datasize = 0;
|
$this->_datasize = 0;
|
||||||
// $this->_limit = 8224;
|
// $this->limit = 8224;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -136,25 +128,25 @@ class PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
* @param string $data binary data to append
|
* @param string $data binary data to append
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
public function _append($data)
|
protected function append($data)
|
||||||
{
|
{
|
||||||
if (strlen($data) - 4 > $this->_limit) {
|
if (strlen($data) - 4 > $this->limit) {
|
||||||
$data = $this->_addContinue($data);
|
$data = $this->addContinue($data);
|
||||||
}
|
}
|
||||||
$this->_data .= $data;
|
$this->_data .= $data;
|
||||||
$this->_datasize += strlen($data);
|
$this->_datasize += strlen($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* General storage function like _append, but returns string instead of modifying $this->_data
|
* General storage function like append, but returns string instead of modifying $this->_data
|
||||||
*
|
*
|
||||||
* @param string $data binary data to write
|
* @param string $data binary data to write
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function writeData($data)
|
public function writeData($data)
|
||||||
{
|
{
|
||||||
if (strlen($data) - 4 > $this->_limit) {
|
if (strlen($data) - 4 > $this->limit) {
|
||||||
$data = $this->_addContinue($data);
|
$data = $this->addContinue($data);
|
||||||
}
|
}
|
||||||
$this->_datasize += strlen($data);
|
$this->_datasize += strlen($data);
|
||||||
|
|
||||||
|
@ -169,7 +161,7 @@ class PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
* 0x0010 Worksheet.
|
* 0x0010 Worksheet.
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
public function _storeBof($type)
|
protected function storeBof($type)
|
||||||
{
|
{
|
||||||
$record = 0x0809; // Record identifier (BIFF5-BIFF8)
|
$record = 0x0809; // Record identifier (BIFF5-BIFF8)
|
||||||
$length = 0x0010;
|
$length = 0x0010;
|
||||||
|
@ -184,7 +176,7 @@ class PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvvv", $version, $type, $build, $year);
|
$data = pack("vvvv", $version, $type, $build, $year);
|
||||||
$this->_append($header . $data . $unknown);
|
$this->append($header . $data . $unknown);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -192,13 +184,13 @@ class PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
public function _storeEof()
|
protected function storeEof()
|
||||||
{
|
{
|
||||||
$record = 0x000A; // Record identifier
|
$record = 0x000A; // Record identifier
|
||||||
$length = 0x0000; // Number of bytes to follow
|
$length = 0x0000; // Number of bytes to follow
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$this->_append($header);
|
$this->append($header);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -226,9 +218,9 @@ class PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
* @return string A very convenient string of continue blocks
|
* @return string A very convenient string of continue blocks
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
public function _addContinue($data)
|
private function addContinue($data)
|
||||||
{
|
{
|
||||||
$limit = $this->_limit;
|
$limit = $this->limit;
|
||||||
$record = 0x003C; // Record identifier
|
$record = 0x003C; // Record identifier
|
||||||
|
|
||||||
// The first 2080/8224 bytes remain intact. However, we have to change
|
// The first 2080/8224 bytes remain intact. However, we have to change
|
||||||
|
|
|
@ -38,26 +38,26 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
/**
|
/**
|
||||||
* The object we are writing
|
* The object we are writing
|
||||||
*/
|
*/
|
||||||
private $_object;
|
private $object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The written binary data
|
* The written binary data
|
||||||
*/
|
*/
|
||||||
private $_data;
|
private $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shape offsets. Positions in binary stream where a new shape record begins
|
* Shape offsets. Positions in binary stream where a new shape record begins
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $_spOffsets;
|
private $spOffsets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shape types.
|
* Shape types.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $_spTypes;
|
private $spTypes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@ -66,7 +66,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
*/
|
*/
|
||||||
public function __construct($object)
|
public function __construct($object)
|
||||||
{
|
{
|
||||||
$this->_object = $object;
|
$this->object = $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,18 +75,18 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
public function close()
|
public function close()
|
||||||
{
|
{
|
||||||
// initialize
|
// initialize
|
||||||
$this->_data = '';
|
$this->data = '';
|
||||||
|
|
||||||
switch (get_class($this->_object)) {
|
switch (get_class($this->object)) {
|
||||||
case 'PHPExcel_Shared_Escher':
|
case 'PHPExcel_Shared_Escher':
|
||||||
if ($dggContainer = $this->_object->getDggContainer()) {
|
if ($dggContainer = $this->object->getDggContainer()) {
|
||||||
$writer = new PHPExcel_Writer_Excel5_Escher($dggContainer);
|
$writer = new PHPExcel_Writer_Excel5_Escher($dggContainer);
|
||||||
$this->_data = $writer->close();
|
$this->data = $writer->close();
|
||||||
} elseif ($dgContainer = $this->_object->getDgContainer()) {
|
} elseif ($dgContainer = $this->object->getDgContainer()) {
|
||||||
$writer = new PHPExcel_Writer_Excel5_Escher($dgContainer);
|
$writer = new PHPExcel_Writer_Excel5_Escher($dgContainer);
|
||||||
$this->_data = $writer->close();
|
$this->data = $writer->close();
|
||||||
$this->_spOffsets = $writer->getSpOffsets();
|
$this->spOffsets = $writer->getSpOffsets();
|
||||||
$this->_spTypes = $writer->getSpTypes();
|
$this->spTypes = $writer->getSpTypes();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'PHPExcel_Shared_Escher_DggContainer':
|
case 'PHPExcel_Shared_Escher_DggContainer':
|
||||||
|
@ -107,14 +107,14 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$dggData =
|
$dggData =
|
||||||
pack(
|
pack(
|
||||||
'VVVV',
|
'VVVV',
|
||||||
$this->_object->getSpIdMax(), // maximum shape identifier increased by one
|
$this->object->getSpIdMax(), // maximum shape identifier increased by one
|
||||||
$this->_object->getCDgSaved() + 1, // number of file identifier clusters increased by one
|
$this->object->getCDgSaved() + 1, // number of file identifier clusters increased by one
|
||||||
$this->_object->getCSpSaved(),
|
$this->object->getCSpSaved(),
|
||||||
$this->_object->getCDgSaved() // count total number of drawings saved
|
$this->object->getCDgSaved() // count total number of drawings saved
|
||||||
);
|
);
|
||||||
|
|
||||||
// add file identifier clusters (one per drawing)
|
// add file identifier clusters (one per drawing)
|
||||||
$IDCLs = $this->_object->getIDCLs();
|
$IDCLs = $this->object->getIDCLs();
|
||||||
|
|
||||||
foreach ($IDCLs as $dgId => $maxReducedSpId) {
|
foreach ($IDCLs as $dgId => $maxReducedSpId) {
|
||||||
$dggData .= pack('VV', $dgId, $maxReducedSpId + 1);
|
$dggData .= pack('VV', $dgId, $maxReducedSpId + 1);
|
||||||
|
@ -124,7 +124,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$innerData .= $header . $dggData;
|
$innerData .= $header . $dggData;
|
||||||
|
|
||||||
// write the bstoreContainer
|
// write the bstoreContainer
|
||||||
if ($bstoreContainer = $this->_object->getBstoreContainer()) {
|
if ($bstoreContainer = $this->object->getBstoreContainer()) {
|
||||||
$writer = new PHPExcel_Writer_Excel5_Escher($bstoreContainer);
|
$writer = new PHPExcel_Writer_Excel5_Escher($bstoreContainer);
|
||||||
$innerData .= $writer->close();
|
$innerData .= $writer->close();
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$this->_data = $header . $innerData;
|
$this->data = $header . $innerData;
|
||||||
break;
|
break;
|
||||||
case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer':
|
case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer':
|
||||||
// this is a container record
|
// this is a container record
|
||||||
|
@ -149,7 +149,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$innerData = '';
|
$innerData = '';
|
||||||
|
|
||||||
// treat the inner data
|
// treat the inner data
|
||||||
if ($BSECollection = $this->_object->getBSECollection()) {
|
if ($BSECollection = $this->object->getBSECollection()) {
|
||||||
foreach ($BSECollection as $BSE) {
|
foreach ($BSECollection as $BSE) {
|
||||||
$writer = new PHPExcel_Writer_Excel5_Escher($BSE);
|
$writer = new PHPExcel_Writer_Excel5_Escher($BSE);
|
||||||
$innerData .= $writer->close();
|
$innerData .= $writer->close();
|
||||||
|
@ -158,7 +158,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
// write the record
|
// write the record
|
||||||
$recVer = 0xF;
|
$recVer = 0xF;
|
||||||
$recInstance = count($this->_object->getBSECollection());
|
$recInstance = count($this->object->getBSECollection());
|
||||||
$recType = 0xF001;
|
$recType = 0xF001;
|
||||||
$length = strlen($innerData);
|
$length = strlen($innerData);
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$this->_data = $header . $innerData;
|
$this->data = $header . $innerData;
|
||||||
break;
|
break;
|
||||||
case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE':
|
case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE':
|
||||||
// this is a semi-container record
|
// this is a semi-container record
|
||||||
|
@ -176,7 +176,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$innerData = '';
|
$innerData = '';
|
||||||
|
|
||||||
// here we treat the inner data
|
// here we treat the inner data
|
||||||
if ($blip = $this->_object->getBlip()) {
|
if ($blip = $this->object->getBlip()) {
|
||||||
$writer = new PHPExcel_Writer_Excel5_Escher($blip);
|
$writer = new PHPExcel_Writer_Excel5_Escher($blip);
|
||||||
$innerData .= $writer->close();
|
$innerData .= $writer->close();
|
||||||
}
|
}
|
||||||
|
@ -184,8 +184,8 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
// initialize
|
// initialize
|
||||||
$data = '';
|
$data = '';
|
||||||
|
|
||||||
$btWin32 = $this->_object->getBlipType();
|
$btWin32 = $this->object->getBlipType();
|
||||||
$btMacOS = $this->_object->getBlipType();
|
$btMacOS = $this->object->getBlipType();
|
||||||
$data .= pack('CC', $btWin32, $btMacOS);
|
$data .= pack('CC', $btWin32, $btMacOS);
|
||||||
|
|
||||||
$rgbUid = pack('VVVV', 0, 0, 0, 0); // todo
|
$rgbUid = pack('VVVV', 0, 0, 0, 0); // todo
|
||||||
|
@ -205,7 +205,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
// write the record
|
// write the record
|
||||||
$recVer = 0x2;
|
$recVer = 0x2;
|
||||||
$recInstance = $this->_object->getBlipType();
|
$recInstance = $this->object->getBlipType();
|
||||||
$recType = 0xF007;
|
$recType = 0xF007;
|
||||||
$length = strlen($data);
|
$length = strlen($data);
|
||||||
|
|
||||||
|
@ -214,15 +214,15 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$this->_data = $header;
|
$this->data = $header;
|
||||||
|
|
||||||
$this->_data .= $data;
|
$this->data .= $data;
|
||||||
break;
|
break;
|
||||||
case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip':
|
case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip':
|
||||||
// this is an atom record
|
// this is an atom record
|
||||||
|
|
||||||
// write the record
|
// write the record
|
||||||
switch ($this->_object->getParent()->getBlipType()) {
|
switch ($this->object->getParent()->getBlipType()) {
|
||||||
case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_JPEG:
|
case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_JPEG:
|
||||||
// initialize
|
// initialize
|
||||||
$innerData = '';
|
$innerData = '';
|
||||||
|
@ -233,7 +233,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$tag = 0xFF; // todo
|
$tag = 0xFF; // todo
|
||||||
$innerData .= pack('C', $tag);
|
$innerData .= pack('C', $tag);
|
||||||
|
|
||||||
$innerData .= $this->_object->getData();
|
$innerData .= $this->object->getData();
|
||||||
|
|
||||||
$recVer = 0x0;
|
$recVer = 0x0;
|
||||||
$recInstance = 0x46A;
|
$recInstance = 0x46A;
|
||||||
|
@ -245,9 +245,9 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$this->_data = $header;
|
$this->data = $header;
|
||||||
|
|
||||||
$this->_data .= $innerData;
|
$this->data .= $innerData;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG:
|
case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG:
|
||||||
|
@ -260,7 +260,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$tag = 0xFF; // todo
|
$tag = 0xFF; // todo
|
||||||
$innerData .= pack('C', $tag);
|
$innerData .= pack('C', $tag);
|
||||||
|
|
||||||
$innerData .= $this->_object->getData();
|
$innerData .= $this->object->getData();
|
||||||
|
|
||||||
$recVer = 0x0;
|
$recVer = 0x0;
|
||||||
$recInstance = 0x6E0;
|
$recInstance = 0x6E0;
|
||||||
|
@ -272,9 +272,9 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$this->_data = $header;
|
$this->data = $header;
|
||||||
|
|
||||||
$this->_data .= $innerData;
|
$this->data .= $innerData;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -286,7 +286,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
// write the dg
|
// write the dg
|
||||||
$recVer = 0x0;
|
$recVer = 0x0;
|
||||||
$recInstance = $this->_object->getDgId();
|
$recInstance = $this->object->getDgId();
|
||||||
$recType = 0xF008;
|
$recType = 0xF008;
|
||||||
$length = 8;
|
$length = 8;
|
||||||
|
|
||||||
|
@ -296,12 +296,12 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
// number of shapes in this drawing (including group shape)
|
// number of shapes in this drawing (including group shape)
|
||||||
$countShapes = count($this->_object->getSpgrContainer()->getChildren());
|
$countShapes = count($this->object->getSpgrContainer()->getChildren());
|
||||||
$innerData .= $header . pack('VV', $countShapes, $this->_object->getLastSpId());
|
$innerData .= $header . pack('VV', $countShapes, $this->object->getLastSpId());
|
||||||
//$innerData .= $header . pack('VV', 0, 0);
|
//$innerData .= $header . pack('VV', 0, 0);
|
||||||
|
|
||||||
// write the spgrContainer
|
// write the spgrContainer
|
||||||
if ($spgrContainer = $this->_object->getSpgrContainer()) {
|
if ($spgrContainer = $this->object->getSpgrContainer()) {
|
||||||
$writer = new PHPExcel_Writer_Excel5_Escher($spgrContainer);
|
$writer = new PHPExcel_Writer_Excel5_Escher($spgrContainer);
|
||||||
$innerData .= $writer->close();
|
$innerData .= $writer->close();
|
||||||
|
|
||||||
|
@ -314,8 +314,8 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes)
|
$spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_spOffsets = $spOffsets;
|
$this->spOffsets = $spOffsets;
|
||||||
$this->_spTypes = $spTypes;
|
$this->spTypes = $spTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
// write the record
|
// write the record
|
||||||
|
@ -329,7 +329,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$this->_data = $header . $innerData;
|
$this->data = $header . $innerData;
|
||||||
break;
|
break;
|
||||||
case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer':
|
case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer':
|
||||||
// this is a container record
|
// this is a container record
|
||||||
|
@ -343,7 +343,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$spTypes = array();
|
$spTypes = array();
|
||||||
|
|
||||||
// treat the inner data
|
// treat the inner data
|
||||||
foreach ($this->_object->getChildren() as $spContainer) {
|
foreach ($this->object->getChildren() as $spContainer) {
|
||||||
$writer = new PHPExcel_Writer_Excel5_Escher($spContainer);
|
$writer = new PHPExcel_Writer_Excel5_Escher($spContainer);
|
||||||
$spData = $writer->close();
|
$spData = $writer->close();
|
||||||
$innerData .= $spData;
|
$innerData .= $spData;
|
||||||
|
@ -366,9 +366,9 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$this->_data = $header . $innerData;
|
$this->data = $header . $innerData;
|
||||||
$this->_spOffsets = $spOffsets;
|
$this->spOffsets = $spOffsets;
|
||||||
$this->_spTypes = $spTypes;
|
$this->spTypes = $spTypes;
|
||||||
break;
|
break;
|
||||||
case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer':
|
case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer':
|
||||||
// initialize
|
// initialize
|
||||||
|
@ -377,7 +377,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
// build the data
|
// build the data
|
||||||
|
|
||||||
// write group shape record, if necessary?
|
// write group shape record, if necessary?
|
||||||
if ($this->_object->getSpgr()) {
|
if ($this->object->getSpgr()) {
|
||||||
$recVer = 0x1;
|
$recVer = 0x1;
|
||||||
$recInstance = 0x0000;
|
$recInstance = 0x0000;
|
||||||
$recType = 0xF009;
|
$recType = 0xF009;
|
||||||
|
@ -390,11 +390,11 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$data .= $header . pack('VVVV', 0, 0, 0, 0);
|
$data .= $header . pack('VVVV', 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
$this->_spTypes[] = ($this->_object->getSpType());
|
$this->spTypes[] = ($this->object->getSpType());
|
||||||
|
|
||||||
// write the shape record
|
// write the shape record
|
||||||
$recVer = 0x2;
|
$recVer = 0x2;
|
||||||
$recInstance = $this->_object->getSpType(); // shape type
|
$recInstance = $this->object->getSpType(); // shape type
|
||||||
$recType = 0xF00A;
|
$recType = 0xF00A;
|
||||||
$length = 0x00000008;
|
$length = 0x00000008;
|
||||||
|
|
||||||
|
@ -403,17 +403,17 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$data .= $header . pack('VV', $this->_object->getSpId(), $this->_object->getSpgr() ? 0x0005 : 0x0A00);
|
$data .= $header . pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00);
|
||||||
|
|
||||||
|
|
||||||
// the options
|
// the options
|
||||||
if ($this->_object->getOPTCollection()) {
|
if ($this->object->getOPTCollection()) {
|
||||||
$optData = '';
|
$optData = '';
|
||||||
|
|
||||||
$recVer = 0x3;
|
$recVer = 0x3;
|
||||||
$recInstance = count($this->_object->getOPTCollection());
|
$recInstance = count($this->object->getOPTCollection());
|
||||||
$recType = 0xF00B;
|
$recType = 0xF00B;
|
||||||
foreach ($this->_object->getOPTCollection() as $property => $value) {
|
foreach ($this->object->getOPTCollection() as $property => $value) {
|
||||||
$optData .= pack('vV', $property, $value);
|
$optData .= pack('vV', $property, $value);
|
||||||
}
|
}
|
||||||
$length = strlen($optData);
|
$length = strlen($optData);
|
||||||
|
@ -426,7 +426,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
}
|
}
|
||||||
|
|
||||||
// the client anchor
|
// the client anchor
|
||||||
if ($this->_object->getStartCoordinates()) {
|
if ($this->object->getStartCoordinates()) {
|
||||||
$clientAnchorData = '';
|
$clientAnchorData = '';
|
||||||
|
|
||||||
$recVer = 0x0;
|
$recVer = 0x0;
|
||||||
|
@ -434,28 +434,28 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
$recType = 0xF010;
|
$recType = 0xF010;
|
||||||
|
|
||||||
// start coordinates
|
// start coordinates
|
||||||
list($column, $row) = PHPExcel_Cell::coordinateFromString($this->_object->getStartCoordinates());
|
list($column, $row) = PHPExcel_Cell::coordinateFromString($this->object->getStartCoordinates());
|
||||||
$c1 = PHPExcel_Cell::columnIndexFromString($column) - 1;
|
$c1 = PHPExcel_Cell::columnIndexFromString($column) - 1;
|
||||||
$r1 = $row - 1;
|
$r1 = $row - 1;
|
||||||
|
|
||||||
// start offsetX
|
// start offsetX
|
||||||
$startOffsetX = $this->_object->getStartOffsetX();
|
$startOffsetX = $this->object->getStartOffsetX();
|
||||||
|
|
||||||
// start offsetY
|
// start offsetY
|
||||||
$startOffsetY = $this->_object->getStartOffsetY();
|
$startOffsetY = $this->object->getStartOffsetY();
|
||||||
|
|
||||||
// end coordinates
|
// end coordinates
|
||||||
list($column, $row) = PHPExcel_Cell::coordinateFromString($this->_object->getEndCoordinates());
|
list($column, $row) = PHPExcel_Cell::coordinateFromString($this->object->getEndCoordinates());
|
||||||
$c2 = PHPExcel_Cell::columnIndexFromString($column) - 1;
|
$c2 = PHPExcel_Cell::columnIndexFromString($column) - 1;
|
||||||
$r2 = $row - 1;
|
$r2 = $row - 1;
|
||||||
|
|
||||||
// end offsetX
|
// end offsetX
|
||||||
$endOffsetX = $this->_object->getEndOffsetX();
|
$endOffsetX = $this->object->getEndOffsetX();
|
||||||
|
|
||||||
// end offsetY
|
// end offsetY
|
||||||
$endOffsetY = $this->_object->getEndOffsetY();
|
$endOffsetY = $this->object->getEndOffsetY();
|
||||||
|
|
||||||
$clientAnchorData = pack('vvvvvvvvv', $this->_object->getSpFlag(), $c1, $startOffsetX, $r1, $startOffsetY, $c2, $endOffsetX, $r2, $endOffsetY);
|
$clientAnchorData = pack('vvvvvvvvv', $this->object->getSpFlag(), $c1, $startOffsetX, $r1, $startOffsetY, $c2, $endOffsetX, $r2, $endOffsetY);
|
||||||
|
|
||||||
$length = strlen($clientAnchorData);
|
$length = strlen($clientAnchorData);
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
}
|
}
|
||||||
|
|
||||||
// the client data, just empty for now
|
// the client data, just empty for now
|
||||||
if (!$this->_object->getSpgr()) {
|
if (!$this->object->getSpgr()) {
|
||||||
$clientDataData = '';
|
$clientDataData = '';
|
||||||
|
|
||||||
$recVer = 0x0;
|
$recVer = 0x0;
|
||||||
|
@ -494,11 +494,11 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
|
|
||||||
$header = pack('vvV', $recVerInstance, $recType, $length);
|
$header = pack('vvV', $recVerInstance, $recType, $length);
|
||||||
|
|
||||||
$this->_data = $header . $data;
|
$this->data = $header . $data;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->_data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -508,7 +508,7 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
*/
|
*/
|
||||||
public function getSpOffsets()
|
public function getSpOffsets()
|
||||||
{
|
{
|
||||||
return $this->_spOffsets;
|
return $this->spOffsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -518,6 +518,6 @@ class PHPExcel_Writer_Excel5_Escher
|
||||||
*/
|
*/
|
||||||
public function getSpTypes()
|
public function getSpTypes()
|
||||||
{
|
{
|
||||||
return $this->_spTypes;
|
return $this->spTypes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Writer_Excel5_Font
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -24,15 +25,6 @@
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version ##VERSION##, ##DATE##
|
* @version ##VERSION##, ##DATE##
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Writer_Excel5_Font
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Writer_Excel5
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Writer_Excel5_Font
|
class PHPExcel_Writer_Excel5_Font
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -40,14 +32,14 @@ class PHPExcel_Writer_Excel5_Font
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $_colorIndex;
|
private $colorIndex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Font
|
* Font
|
||||||
*
|
*
|
||||||
* @var PHPExcel_Style_Font
|
* @var PHPExcel_Style_Font
|
||||||
*/
|
*/
|
||||||
private $_font;
|
private $font;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@ -56,8 +48,8 @@ class PHPExcel_Writer_Excel5_Font
|
||||||
*/
|
*/
|
||||||
public function __construct(PHPExcel_Style_Font $font = null)
|
public function __construct(PHPExcel_Style_Font $font = null)
|
||||||
{
|
{
|
||||||
$this->_colorIndex = 0x7FFF;
|
$this->colorIndex = 0x7FFF;
|
||||||
$this->_font = $font;
|
$this->font = $font;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,7 +59,7 @@ class PHPExcel_Writer_Excel5_Font
|
||||||
*/
|
*/
|
||||||
public function setColorIndex($colorIndex)
|
public function setColorIndex($colorIndex)
|
||||||
{
|
{
|
||||||
$this->_colorIndex = $colorIndex;
|
$this->colorIndex = $colorIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,24 +72,24 @@ class PHPExcel_Writer_Excel5_Font
|
||||||
$font_outline = 0;
|
$font_outline = 0;
|
||||||
$font_shadow = 0;
|
$font_shadow = 0;
|
||||||
|
|
||||||
$icv = $this->_colorIndex; // Index to color palette
|
$icv = $this->colorIndex; // Index to color palette
|
||||||
if ($this->_font->getSuperScript()) {
|
if ($this->font->getSuperScript()) {
|
||||||
$sss = 1;
|
$sss = 1;
|
||||||
} elseif ($this->_font->getSubScript()) {
|
} elseif ($this->font->getSubScript()) {
|
||||||
$sss = 2;
|
$sss = 2;
|
||||||
} else {
|
} else {
|
||||||
$sss = 0;
|
$sss = 0;
|
||||||
}
|
}
|
||||||
$bFamily = 0; // Font family
|
$bFamily = 0; // Font family
|
||||||
$bCharSet = PHPExcel_Shared_Font::getCharsetFromFontName($this->_font->getName()); // Character set
|
$bCharSet = PHPExcel_Shared_Font::getCharsetFromFontName($this->font->getName()); // Character set
|
||||||
|
|
||||||
$record = 0x31; // Record identifier
|
$record = 0x31; // Record identifier
|
||||||
$reserved = 0x00; // Reserved
|
$reserved = 0x00; // Reserved
|
||||||
$grbit = 0x00; // Font attributes
|
$grbit = 0x00; // Font attributes
|
||||||
if ($this->_font->getItalic()) {
|
if ($this->font->getItalic()) {
|
||||||
$grbit |= 0x02;
|
$grbit |= 0x02;
|
||||||
}
|
}
|
||||||
if ($this->_font->getStrikethrough()) {
|
if ($this->font->getStrikethrough()) {
|
||||||
$grbit |= 0x08;
|
$grbit |= 0x08;
|
||||||
}
|
}
|
||||||
if ($font_outline) {
|
if ($font_outline) {
|
||||||
|
@ -110,20 +102,20 @@ class PHPExcel_Writer_Excel5_Font
|
||||||
$data = pack(
|
$data = pack(
|
||||||
"vvvvvCCCC",
|
"vvvvvCCCC",
|
||||||
// Fontsize (in twips)
|
// Fontsize (in twips)
|
||||||
$this->_font->getSize() * 20,
|
$this->font->getSize() * 20,
|
||||||
$grbit,
|
$grbit,
|
||||||
// Colour
|
// Colour
|
||||||
$icv,
|
$icv,
|
||||||
// Font weight
|
// Font weight
|
||||||
self::_mapBold($this->_font->getBold()),
|
self::mapBold($this->font->getBold()),
|
||||||
// Superscript/Subscript
|
// Superscript/Subscript
|
||||||
$sss,
|
$sss,
|
||||||
self::_mapUnderline($this->_font->getUnderline()),
|
self::mapUnderline($this->font->getUnderline()),
|
||||||
$bFamily,
|
$bFamily,
|
||||||
$bCharSet,
|
$bCharSet,
|
||||||
$reserved
|
$reserved
|
||||||
);
|
);
|
||||||
$data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($this->_font->getName());
|
$data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($this->font->getName());
|
||||||
|
|
||||||
$length = strlen($data);
|
$length = strlen($data);
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
|
@ -137,12 +129,12 @@ class PHPExcel_Writer_Excel5_Font
|
||||||
* @param boolean $bold
|
* @param boolean $bold
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private static function _mapBold($bold)
|
private static function mapBold($bold)
|
||||||
{
|
{
|
||||||
if ($bold) {
|
if ($bold) {
|
||||||
return 0x2BC; // 700 = Bold font weight
|
return 0x2BC; // 700 = Bold font weight
|
||||||
}
|
}
|
||||||
return 0x190; // 400 = Normal font weight
|
return 0x190; // 400 = Normal font weight
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -150,23 +142,24 @@ class PHPExcel_Writer_Excel5_Font
|
||||||
* @static array of int
|
* @static array of int
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static $_mapUnderline = array(
|
private static $mapUnderline = array(
|
||||||
PHPExcel_Style_Font::UNDERLINE_NONE => 0x00,
|
PHPExcel_Style_Font::UNDERLINE_NONE => 0x00,
|
||||||
PHPExcel_Style_Font::UNDERLINE_SINGLE => 0x01,
|
PHPExcel_Style_Font::UNDERLINE_SINGLE => 0x01,
|
||||||
PHPExcel_Style_Font::UNDERLINE_DOUBLE => 0x02,
|
PHPExcel_Style_Font::UNDERLINE_DOUBLE => 0x02,
|
||||||
PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING => 0x21,
|
PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING => 0x21,
|
||||||
PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING => 0x22,
|
PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING => 0x22,
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map underline
|
* Map underline
|
||||||
*
|
*
|
||||||
* @param string
|
* @param string
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private static function _mapUnderline($underline)
|
private static function mapUnderline($underline)
|
||||||
{
|
{
|
||||||
if (isset(self::$_mapUnderline[$underline])) {
|
if (isset(self::$mapUnderline[$underline])) {
|
||||||
return self::$_mapUnderline[$underline];
|
return self::$mapUnderline[$underline];
|
||||||
}
|
}
|
||||||
return 0x00;
|
return 0x00;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -273,7 +273,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$num_sheets = $_phpSheet->getParent()->getSheetCount();
|
$num_sheets = $_phpSheet->getParent()->getSheetCount();
|
||||||
|
|
||||||
// Write BOF record
|
// Write BOF record
|
||||||
$this->_storeBof(0x0010);
|
$this->storeBof(0x0010);
|
||||||
|
|
||||||
// Write PRINTHEADERS
|
// Write PRINTHEADERS
|
||||||
$this->_writePrintHeaders();
|
$this->_writePrintHeaders();
|
||||||
|
@ -347,16 +347,16 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$this->_writeVcenter();
|
$this->_writeVcenter();
|
||||||
|
|
||||||
// Write left margin
|
// Write left margin
|
||||||
$this->_writeMarginLeft();
|
$this->writeMarginLeft();
|
||||||
|
|
||||||
// Write right margin
|
// Write right margin
|
||||||
$this->_writeMarginRight();
|
$this->writeMarginRight();
|
||||||
|
|
||||||
// Write top margin
|
// Write top margin
|
||||||
$this->_writeMarginTop();
|
$this->writeMarginTop();
|
||||||
|
|
||||||
// Write bottom margin
|
// Write bottom margin
|
||||||
$this->_writeMarginBottom();
|
$this->writeMarginBottom();
|
||||||
|
|
||||||
// Write page setup
|
// Write page setup
|
||||||
$this->_writeSetup();
|
$this->_writeSetup();
|
||||||
|
@ -458,7 +458,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PHPExcel_Cell_DataType::TYPE_ERROR:
|
case PHPExcel_Cell_DataType::TYPE_ERROR:
|
||||||
$this->writeBoolErr($row, $column, self::_mapErrorCode($cVal), 1, $xfIndex);
|
$this->writeBoolErr($row, $column, self::mapErrorCode($cVal), 1, $xfIndex);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -466,13 +466,13 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append
|
// Append
|
||||||
$this->_writeMsoDrawing();
|
$this->writeMsoDrawing();
|
||||||
|
|
||||||
// Write WINDOW2 record
|
// Write WINDOW2 record
|
||||||
$this->writeWindow2();
|
$this->writeWindow2();
|
||||||
|
|
||||||
// Write PLV record
|
// Write PLV record
|
||||||
$this->_writePageLayoutView();
|
$this->writePageLayoutView();
|
||||||
|
|
||||||
// Write ZOOM record
|
// Write ZOOM record
|
||||||
$this->_writeZoom();
|
$this->_writeZoom();
|
||||||
|
@ -508,7 +508,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$this->writeUrl($row - 1, PHPExcel_Cell::columnIndexFromString($column) - 1, $url);
|
$this->writeUrl($row - 1, PHPExcel_Cell::columnIndexFromString($column) - 1, $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_writeDataValidity();
|
$this->writeDataValidity();
|
||||||
$this->_writeSheetLayout();
|
$this->_writeSheetLayout();
|
||||||
|
|
||||||
// Write SHEETPROTECTION record
|
// Write SHEETPROTECTION record
|
||||||
|
@ -536,7 +536,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_storeEof();
|
$this->storeEof();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -646,7 +646,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$xl_double = strrev($xl_double);
|
$xl_double = strrev($xl_double);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_append($header.$data.$xl_double);
|
$this->append($header.$data.$xl_double);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -686,7 +686,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
$data = pack('vvvV', $row, $col, $xfIndex, $this->_str_table[$str]);
|
$data = pack('vvvV', $row, $col, $xfIndex, $this->_str_table[$str]);
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -721,7 +721,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvvv", $row, $col, $xfIndex, $strlen);
|
$data = pack("vvvv", $row, $col, $xfIndex, $strlen);
|
||||||
$this->_append($header . $data . $str);
|
$this->append($header . $data . $str);
|
||||||
return($str_error);
|
return($str_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -755,7 +755,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
$data = pack('vvvV', $row, $col, $xfIndex, $this->_str_table[$str]);
|
$data = pack('vvvV', $row, $col, $xfIndex, $this->_str_table[$str]);
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -776,14 +776,14 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$length = 0x0006 + min($note_length, 2048);
|
$length = 0x0006 + min($note_length, 2048);
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvv", $row, $col, $note_length);
|
$data = pack("vvv", $row, $col, $note_length);
|
||||||
$this->_append($header . $data . substr($note, 0, 2048));
|
$this->append($header . $data . substr($note, 0, 2048));
|
||||||
|
|
||||||
for ($i = $max_length; $i < $note_length; $i += $max_length) {
|
for ($i = $max_length; $i < $note_length; $i += $max_length) {
|
||||||
$chunk = substr($note, $i, $max_length);
|
$chunk = substr($note, $i, $max_length);
|
||||||
$length = 0x0006 + strlen($chunk);
|
$length = 0x0006 + strlen($chunk);
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvv", -1, 0, strlen($chunk));
|
$data = pack("vvv", -1, 0, strlen($chunk));
|
||||||
$this->_append($header.$data.$chunk);
|
$this->append($header.$data.$chunk);
|
||||||
}
|
}
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
@ -811,7 +811,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvv", $row, $col, $xfIndex);
|
$data = pack("vvv", $row, $col, $xfIndex);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -831,7 +831,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvvCC", $row, $col, $xfIndex, $value, $isError);
|
$data = pack("vvvCC", $row, $col, $xfIndex, $value, $isError);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -871,7 +871,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
} elseif (is_string($calculatedValue)) {
|
} elseif (is_string($calculatedValue)) {
|
||||||
if (array_key_exists($calculatedValue, PHPExcel_Cell_DataType::getErrorCodes())) {
|
if (array_key_exists($calculatedValue, PHPExcel_Cell_DataType::getErrorCodes())) {
|
||||||
// Error value
|
// Error value
|
||||||
$num = pack('CCCvCv', 0x02, 0x00, self::_mapErrorCode($calculatedValue), 0x00, 0x00, 0xFFFF);
|
$num = pack('CCCvCv', 0x02, 0x00, self::mapErrorCode($calculatedValue), 0x00, 0x00, 0xFFFF);
|
||||||
} elseif ($calculatedValue === '') {
|
} elseif ($calculatedValue === '') {
|
||||||
// Empty string (and BIFF8)
|
// Empty string (and BIFF8)
|
||||||
$num = pack('CCCvCv', 0x03, 0x00, 0x00, 0x00, 0x00, 0xFFFF);
|
$num = pack('CCCvCv', 0x03, 0x00, 0x00, 0x00, 0x00, 0xFFFF);
|
||||||
|
@ -913,7 +913,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data = pack("vvv", $row, $col, $xfIndex)
|
$data = pack("vvv", $row, $col, $xfIndex)
|
||||||
. $num
|
. $num
|
||||||
. pack("vVv", $grbit, $unknown, $formlen);
|
. pack("vVv", $grbit, $unknown, $formlen);
|
||||||
$this->_append($header . $data . $formula);
|
$this->append($header . $data . $formula);
|
||||||
|
|
||||||
// Append also a STRING record if necessary
|
// Append also a STRING record if necessary
|
||||||
if ($stringValue !== null) {
|
if ($stringValue !== null) {
|
||||||
|
@ -941,7 +941,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$length = strlen($data);
|
$length = strlen($data);
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1038,7 +1038,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data = pack("vvvv", $row1, $row2, $col1, $col2);
|
$data = pack("vvvv", $row1, $row2, $col1, $col2);
|
||||||
|
|
||||||
// Write the packed data
|
// Write the packed data
|
||||||
$this->_append($header . $data .
|
$this->append($header . $data .
|
||||||
$unknown1 . $options .
|
$unknown1 . $options .
|
||||||
$unknown2 . $url_len . $url);
|
$unknown2 . $url_len . $url);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1087,7 +1087,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data = pack("vvvv", $row1, $row2, $col1, $col2);
|
$data = pack("vvvv", $row1, $row2, $col1, $col2);
|
||||||
|
|
||||||
// Write the packed data
|
// Write the packed data
|
||||||
$this->_append($header . $data .
|
$this->append($header . $data .
|
||||||
$unknown1 . $options .
|
$unknown1 . $options .
|
||||||
$url_len . $url);
|
$url_len . $url);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1190,7 +1190,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
|
|
||||||
// Write the packed data
|
// Write the packed data
|
||||||
$this->_append($header. $data);
|
$this->append($header. $data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1247,7 +1247,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe);
|
$data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe);
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1261,7 +1261,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved
|
$data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1315,7 +1315,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$data .= pack("vvvvV", $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000);
|
$data .= pack("vvvvV", $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000);
|
||||||
|
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1337,7 +1337,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vv", 1, $defaultRowHeight);
|
$data = pack("vv", 1, $defaultRowHeight);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1352,7 +1352,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $defaultColWidth);
|
$data = pack("v", $defaultColWidth);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1410,7 +1410,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvvvvv", $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved);
|
$data = pack("vvvvvv", $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved);
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1471,7 +1471,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("CvvvvvvCC", $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast);
|
$data = pack("CvvvvvvCC", $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1519,7 +1519,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$recordData = pack('v', $j) . $recordData;
|
$recordData = pack('v', $j) . $recordData;
|
||||||
$length = strlen($recordData);
|
$length = strlen($recordData);
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
$this->_append($header . $recordData);
|
$this->append($header . $recordData);
|
||||||
|
|
||||||
// initialize for next record, if any
|
// initialize for next record, if any
|
||||||
$recordData = '';
|
$recordData = '';
|
||||||
|
@ -1552,7 +1552,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$record = 0x0862; // Record identifier
|
$record = 0x0862; // Record identifier
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
$this->_append($header . $recordData);
|
$this->append($header . $recordData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1596,7 +1596,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$length = strlen($recordData);
|
$length = strlen($recordData);
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
|
|
||||||
$this->_append($header . $recordData);
|
$this->append($header . $recordData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1643,7 +1643,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$record = 0x0868; // Record identifier
|
$record = 0x0868; // Record identifier
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$this->_append($header . $recordData);
|
$this->append($header . $recordData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1666,7 +1666,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $count);
|
$data = pack("v", $count);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1697,7 +1697,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("CC", $cch, $rgch);
|
$data = pack("CC", $cch, $rgch);
|
||||||
$this->_append($header . $data . $sheetname);
|
$this->append($header . $data . $sheetname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1780,7 +1780,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvvvv", $x, $y, $rwTop, $colLeft, $pnnAct);
|
$data = pack("vvvvv", $x, $y, $rwTop, $colLeft, $pnnAct);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1841,7 +1841,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data1 = pack("vvvvvvvv", $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes);
|
$data1 = pack("vvvvvvvv", $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes);
|
||||||
$data2 = $numHdr.$numFtr;
|
$data2 = $numHdr.$numFtr;
|
||||||
$data3 = pack("v", $iCopies);
|
$data3 = pack("v", $iCopies);
|
||||||
$this->_append($header . $data1 . $data2 . $data3);
|
$this->append($header . $data1 . $data2 . $data3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1865,7 +1865,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
|
|
||||||
$this->_append($header . $recordData);
|
$this->append($header . $recordData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1889,7 +1889,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
|
|
||||||
$this->_append($header . $recordData);
|
$this->append($header . $recordData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1907,7 +1907,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $fHCenter);
|
$data = pack("v", $fHCenter);
|
||||||
|
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1922,13 +1922,13 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $fVCenter);
|
$data = pack("v", $fVCenter);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store the LEFTMARGIN BIFF record.
|
* Store the LEFTMARGIN BIFF record.
|
||||||
*/
|
*/
|
||||||
private function _writeMarginLeft()
|
private function writeMarginLeft()
|
||||||
{
|
{
|
||||||
$record = 0x0026; // Record identifier
|
$record = 0x0026; // Record identifier
|
||||||
$length = 0x0008; // Bytes to follow
|
$length = 0x0008; // Bytes to follow
|
||||||
|
@ -1941,13 +1941,13 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data = strrev($data);
|
$data = strrev($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store the RIGHTMARGIN BIFF record.
|
* Store the RIGHTMARGIN BIFF record.
|
||||||
*/
|
*/
|
||||||
private function _writeMarginRight()
|
private function writeMarginRight()
|
||||||
{
|
{
|
||||||
$record = 0x0027; // Record identifier
|
$record = 0x0027; // Record identifier
|
||||||
$length = 0x0008; // Bytes to follow
|
$length = 0x0008; // Bytes to follow
|
||||||
|
@ -1960,13 +1960,13 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data = strrev($data);
|
$data = strrev($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store the TOPMARGIN BIFF record.
|
* Store the TOPMARGIN BIFF record.
|
||||||
*/
|
*/
|
||||||
private function _writeMarginTop()
|
private function writeMarginTop()
|
||||||
{
|
{
|
||||||
$record = 0x0028; // Record identifier
|
$record = 0x0028; // Record identifier
|
||||||
$length = 0x0008; // Bytes to follow
|
$length = 0x0008; // Bytes to follow
|
||||||
|
@ -1979,13 +1979,13 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data = strrev($data);
|
$data = strrev($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store the BOTTOMMARGIN BIFF record.
|
* Store the BOTTOMMARGIN BIFF record.
|
||||||
*/
|
*/
|
||||||
private function _writeMarginBottom()
|
private function writeMarginBottom()
|
||||||
{
|
{
|
||||||
$record = 0x0029; // Record identifier
|
$record = 0x0029; // Record identifier
|
||||||
$length = 0x0008; // Bytes to follow
|
$length = 0x0008; // Bytes to follow
|
||||||
|
@ -1998,7 +1998,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data = strrev($data);
|
$data = strrev($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2013,7 +2013,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $fPrintRwCol);
|
$data = pack("v", $fPrintRwCol);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2029,7 +2029,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $fPrintGrid);
|
$data = pack("v", $fPrintGrid);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2045,7 +2045,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $fGridSet);
|
$data = pack("v", $fGridSet);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2061,7 +2061,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $iNumFilters);
|
$data = pack("v", $iNumFilters);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2108,7 +2108,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvvv", $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level);
|
$data = pack("vvvv", $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level);
|
||||||
|
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2144,7 +2144,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $grbit);
|
$data = pack("v", $grbit);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2197,7 +2197,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data .= pack("vvv", $hbreak, 0x0000, 0x00ff);
|
$data .= pack("vvv", $hbreak, 0x0000, 0x00ff);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertical page breaks
|
// vertical page breaks
|
||||||
|
@ -2224,7 +2224,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data .= pack("vvv", $vbreak, 0x0000, 0xffff);
|
$data .= pack("vvv", $vbreak, 0x0000, 0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2246,7 +2246,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $fLock);
|
$data = pack("v", $fLock);
|
||||||
|
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2270,7 +2270,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
$data = pack('v', 1);
|
$data = pack('v', 1);
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2294,7 +2294,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
$data = pack('v', 1);
|
$data = pack('v', 1);
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2315,7 +2315,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("v", $wPassword);
|
$data = pack("v", $wPassword);
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2350,7 +2350,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$lcb = $size;
|
$lcb = $size;
|
||||||
|
|
||||||
$header = pack("vvvvV", $record, $length, $cf, $env, $lcb);
|
$header = pack("vvvvV", $record, $length, $cf, $env, $lcb);
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2534,7 +2534,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data .= pack("v", $grbit2);
|
$data .= pack("v", $grbit2);
|
||||||
$data .= pack("V", $Reserved5);
|
$data .= pack("V", $Reserved5);
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2669,7 +2669,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vv", $this->_phpSheet->getSheetView()->getZoomScale(), 100);
|
$data = pack("vv", $this->_phpSheet->getSheetView()->getZoomScale(), 100);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2695,7 +2695,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
/**
|
/**
|
||||||
* Write MSODRAWING record
|
* Write MSODRAWING record
|
||||||
*/
|
*/
|
||||||
private function _writeMsoDrawing()
|
private function writeMsoDrawing()
|
||||||
{
|
{
|
||||||
// write the Escher stream if necessary
|
// write the Escher stream if necessary
|
||||||
if (isset($this->escher)) {
|
if (isset($this->escher)) {
|
||||||
|
@ -2718,7 +2718,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$length = strlen($dataChunk);
|
$length = strlen($dataChunk);
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
|
|
||||||
$this->_append($header . $dataChunk);
|
$this->append($header . $dataChunk);
|
||||||
|
|
||||||
// OBJ record
|
// OBJ record
|
||||||
$record = 0x005D; // record identifier
|
$record = 0x005D; // record identifier
|
||||||
|
@ -2772,7 +2772,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$length = strlen($objData);
|
$length = strlen($objData);
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
$this->_append($header . $objData);
|
$this->append($header . $objData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2780,7 +2780,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
/**
|
/**
|
||||||
* Store the DATAVALIDATIONS and DATAVALIDATION records.
|
* Store the DATAVALIDATIONS and DATAVALIDATION records.
|
||||||
*/
|
*/
|
||||||
private function _writeDataValidity()
|
private function writeDataValidity()
|
||||||
{
|
{
|
||||||
// Datavalidation collection
|
// Datavalidation collection
|
||||||
$dataValidationCollection = $this->_phpSheet->getDataValidationCollection();
|
$dataValidationCollection = $this->_phpSheet->getDataValidationCollection();
|
||||||
|
@ -2798,7 +2798,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack('vv', $record, $length);
|
$header = pack('vv', $record, $length);
|
||||||
$data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection));
|
$data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection));
|
||||||
$this->_append($header.$data);
|
$this->append($header.$data);
|
||||||
|
|
||||||
// DATAVALIDATION records
|
// DATAVALIDATION records
|
||||||
$record = 0x01BE; // Record identifier
|
$record = 0x01BE; // Record identifier
|
||||||
|
@ -2963,7 +2963,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$length = strlen($data);
|
$length = strlen($data);
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
|
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2974,7 +2974,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
* @param string $errorCode
|
* @param string $errorCode
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private static function _mapErrorCode($errorCode)
|
private static function mapErrorCode($errorCode)
|
||||||
{
|
{
|
||||||
switch ($errorCode) {
|
switch ($errorCode) {
|
||||||
case '#NULL!':
|
case '#NULL!':
|
||||||
|
@ -2999,7 +2999,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
/**
|
/**
|
||||||
* Write PLV Record
|
* Write PLV Record
|
||||||
*/
|
*/
|
||||||
private function _writePageLayoutView()
|
private function writePageLayoutView()
|
||||||
{
|
{
|
||||||
$record = 0x088B; // Record identifier
|
$record = 0x088B; // Record identifier
|
||||||
$length = 0x0010; // Bytes to follow
|
$length = 0x0010; // Bytes to follow
|
||||||
|
@ -3024,7 +3024,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
|
|
||||||
$header = pack("vv", $record, $length);
|
$header = pack("vv", $record, $length);
|
||||||
$data = pack("vvVVvv", $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit);
|
$data = pack("vvVVvv", $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit);
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4200,7 +4200,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data .= $operand2;
|
$data .= $operand2;
|
||||||
}
|
}
|
||||||
$header = pack('vv', $record, strlen($data));
|
$header = pack('vv', $record, strlen($data));
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4251,6 +4251,6 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
||||||
$data .= $cellRange;
|
$data .= $cellRange;
|
||||||
$data .= pack('v', 0x0001);
|
$data .= pack('v', 0x0001);
|
||||||
$data .= $cellRange;
|
$data .= $cellRange;
|
||||||
$this->_append($header . $data);
|
$this->append($header . $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel
|
* PHPExcel_Writer_Excel5_Xf
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006 - 2015 PHPExcel
|
* Copyright (c) 2006 - 2015 PHPExcel
|
||||||
*
|
*
|
||||||
|
@ -59,15 +60,6 @@
|
||||||
// * License along with this library; if not, write to the Free Software
|
// * License along with this library; if not, write to the Free Software
|
||||||
// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
// */
|
// */
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PHPExcel_Writer_Excel5_Xf
|
|
||||||
*
|
|
||||||
* @category PHPExcel
|
|
||||||
* @package PHPExcel_Writer_Excel5
|
|
||||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
|
||||||
*/
|
|
||||||
class PHPExcel_Writer_Excel5_Xf
|
class PHPExcel_Writer_Excel5_Xf
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue