Fix reader when comment within text:p element

This commit is contained in:
Alexander Pervakov 2014-07-14 14:55:57 +04:00
parent a81a7da661
commit 524c093895
1 changed files with 7 additions and 3 deletions

View File

@ -515,9 +515,13 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
$annotationText = $cellDataOffice->annotation->children($namespacesContent['text']); $annotationText = $cellDataOffice->annotation->children($namespacesContent['text']);
$textArray = array(); $textArray = array();
foreach($annotationText as $t) { foreach($annotationText as $t) {
foreach($t->span as $text) { if (isset($t->span)) {
$textArray[] = (string)$text; foreach($t->span as $text) {
} $textArray[] = (string)$text;
}
} else {
$textArray[] = (string) $t;
}
} }
$text = implode("\n",$textArray); $text = implode("\n",$textArray);
// echo $text,'<br />'; // echo $text,'<br />';