Minor performance tweaks and adjustments to Excel functions to handle a few envelope test cases

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@85742 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker
2012-01-25 22:07:35 +00:00
parent a77c44d4e6
commit 2cce9b754d
16 changed files with 137 additions and 92 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ class PHPExcel_ReferenceHelper
* @return PHPExcel_ReferenceHelper
*/
public static function getInstance() {
if (!isset(self::$_instance) || is_null(self::$_instance)) {
if (!isset(self::$_instance) || (self::$_instance === NULL)) {
self::$_instance = new PHPExcel_ReferenceHelper();
}
@@ -530,7 +530,7 @@ class PHPExcel_ReferenceHelper
foreach ($pPhpExcel->getWorksheetIterator() as $sheet) {
foreach ($sheet->getCellCollection(false) as $cellID) {
$cell = $sheet->getCell($cellID);
if (!is_null($cell) && $cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) {
if (($cell !== NULL) && ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA)) {
$formula = $cell->getValue();
if (strpos($formula, $oldName) !== false) {
$formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula);