mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-22 00:00:43 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user