Merge pull request #221 from nendrew/develop

Check whether margin-left is set in excel file when reading
This commit is contained in:
Mark Baker 2013-08-07 09:04:10 -07:00
commit 40a6d946ff
1 changed files with 3 additions and 1 deletions

View File

@ -1371,7 +1371,9 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$hfImages[ (string)$shape['id'] ]->setResizeProportional(false); $hfImages[ (string)$shape['id'] ]->setResizeProportional(false);
$hfImages[ (string)$shape['id'] ]->setWidth($style['width']); $hfImages[ (string)$shape['id'] ]->setWidth($style['width']);
$hfImages[ (string)$shape['id'] ]->setHeight($style['height']); $hfImages[ (string)$shape['id'] ]->setHeight($style['height']);
$hfImages[ (string)$shape['id'] ]->setOffsetX($style['margin-left']); if (isset($style['margin-left'])) {
$hfImages[ (string)$shape['id'] ]->setOffsetX($style['margin-left']);
}
$hfImages[ (string)$shape['id'] ]->setOffsetY($style['margin-top']); $hfImages[ (string)$shape['id'] ]->setOffsetY($style['margin-top']);
$hfImages[ (string)$shape['id'] ]->setResizeProportional(true); $hfImages[ (string)$shape['id'] ]->setResizeProportional(true);
} }