From 2d39be32cb4321bd43b7aa790949df6a9a7d248b Mon Sep 17 00:00:00 2001 From: Andreas Scheibleger Date: Tue, 23 Jul 2013 14:16:40 +0200 Subject: [PATCH] Check whether margin-left is set in excel file when reading --- Classes/PHPExcel/Reader/Excel2007.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php index 678d837..412cc71 100644 --- a/Classes/PHPExcel/Reader/Excel2007.php +++ b/Classes/PHPExcel/Reader/Excel2007.php @@ -1371,7 +1371,9 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE $hfImages[ (string)$shape['id'] ]->setResizeProportional(false); $hfImages[ (string)$shape['id'] ]->setWidth($style['width']); $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'] ]->setResizeProportional(true); }