First steps toward reading cell comments
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@65027 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
2e86645775
commit
500a8e763e
|
@ -720,6 +720,7 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||
case self::XLS_Type_SHEETLAYOUT: $this->_readSheetLayout(); break;
|
||||
case self::XLS_Type_SHEETPROTECTION: $this->_readSheetProtection(); break;
|
||||
case self::XLS_Type_RANGEPROTECTION: $this->_readRangeProtection(); break;
|
||||
case self::XLS_Type_NOTE: $this->_readNote(); break;
|
||||
//case self::XLS_Type_IMDATA: $this->_readImData(); break;
|
||||
case self::XLS_Type_CONTINUE: $this->_readContinue(); break;
|
||||
case self::XLS_Type_EOF: $this->_readDefault(); break 2;
|
||||
|
@ -744,7 +745,8 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||
|
||||
// treat OBJ records
|
||||
foreach ($this->_objs as $n => $obj) {
|
||||
|
||||
// echo 'Object ID is ',$n,'<br />';
|
||||
//
|
||||
// the first shape container never has a corresponding OBJ record, hence $n + 1
|
||||
$spContainer = $allSpContainers[$n + 1];
|
||||
|
||||
|
@ -771,6 +773,11 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||
|
||||
switch ($obj['type']) {
|
||||
|
||||
case 0x19:
|
||||
// Note
|
||||
// echo 'Comment Object<br />';
|
||||
break;
|
||||
|
||||
case 0x08:
|
||||
// picture
|
||||
|
||||
|
@ -1277,6 +1284,30 @@ class PHPExcel_Reader_Excel5 implements PHPExcel_Reader_IReader
|
|||
$this->_pos += 4 + $length;
|
||||
}
|
||||
|
||||
private function _readNote()
|
||||
{
|
||||
// echo 'Read Note<br />';
|
||||
$length = self::_GetInt2d($this->_data, $this->_pos + 2);
|
||||
$recordData = substr($this->_data, $this->_pos + 4, $length);
|
||||
|
||||
// move stream pointer to next record
|
||||
$this->_pos += 4 + $length;
|
||||
|
||||
if ($this->_readDataOnly || $this->_version != self::XLS_BIFF8) {
|
||||
return;
|
||||
}
|
||||
|
||||
// hexDump($recordData);
|
||||
//
|
||||
$cellAddress = $this->_readBIFF8CellAddress(substr($recordData, 0, 4));
|
||||
$noteObjID = self::_GetInt2d($recordData, 6);
|
||||
$noteAuthor = trim(substr($recordData, 8));
|
||||
|
||||
// echo 'Note Address=',$cellAddress,'<br />';
|
||||
// echo 'Note Object ID=',$noteObjID,'<br />';
|
||||
// echo 'Note Author=',$noteAuthor,'<br />';
|
||||
}
|
||||
|
||||
/**
|
||||
* Read BOF
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue