mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 23:36:03 +03:00
Fix to prevent non-comment objects from throwing errors when retrieving the set of comment objects from the XML
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@69155 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
a07dd58fc7
commit
f27b3d7815
@ -510,9 +510,12 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader
|
|||||||
if ((!$this->_readDataOnly) && (isset($sheet->Objects))) {
|
if ((!$this->_readDataOnly) && (isset($sheet->Objects))) {
|
||||||
foreach($sheet->Objects->children('gnm',TRUE) as $key => $comment) {
|
foreach($sheet->Objects->children('gnm',TRUE) as $key => $comment) {
|
||||||
$commentAttributes = $comment->attributes();
|
$commentAttributes = $comment->attributes();
|
||||||
$objPHPExcel->getActiveSheet()->getComment( (string)$commentAttributes->ObjectBound )
|
// Only comment objects are handled at the moment
|
||||||
->setAuthor( (string)$commentAttributes->Author )
|
if ($commentAttributes->Text) {
|
||||||
->setText($this->_parseRichText((string)$commentAttributes->Text) );
|
$objPHPExcel->getActiveSheet()->getComment( (string)$commentAttributes->ObjectBound )
|
||||||
|
->setAuthor( (string)$commentAttributes->Author )
|
||||||
|
->setText($this->_parseRichText((string)$commentAttributes->Text) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// echo '$maxCol=',$maxCol,'; $maxRow=',$maxRow,'<br />';
|
// echo '$maxCol=',$maxCol,'; $maxRow=',$maxRow,'<br />';
|
||||||
|
Loading…
Reference in New Issue
Block a user