Fixed problem in Excel 2007 reader with headers and footers containing multiple images. All images were substituted with the first one.

This commit is contained in:
Marco Marche 2013-10-17 10:50:14 +02:00
parent 9d22445673
commit a90b711edd
1 changed files with 2 additions and 2 deletions

View File

@ -1354,10 +1354,10 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$hfImages = array(); $hfImages = array();
$shapes = $vmlDrawing->xpath('//v:shape'); $shapes = $vmlDrawing->xpath('//v:shape');
foreach ($shapes as $shape) { foreach ($shapes as $idx => $shape) {
$shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml');
$imageData = $shape->xpath('//v:imagedata'); $imageData = $shape->xpath('//v:imagedata');
$imageData = $imageData[0]; $imageData = $imageData[$idx];
$imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office'); $imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office');
$style = self::toCSSArray( (string)$shape['style'] ); $style = self::toCSSArray( (string)$shape['style'] );