Minor performance tweaks

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@85743 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker
2012-01-25 23:07:22 +00:00
parent 2cce9b754d
commit 9c2ceed08d
16 changed files with 46 additions and 50 deletions
@@ -45,7 +45,7 @@ class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_Wr
*/
public function createStringTable($pSheet = null, $pExistingTable = null)
{
if (!is_null($pSheet)) {
if ($pSheet !== NULL) {
// Create string lookup table
$aStringTable = array();
$cellCollection = null;
@@ -64,14 +64,14 @@ class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_Wr
$cell = $pSheet->getCell($cellID);
$cellValue = $cell->getValue();
if (!is_object($cellValue) &&
!is_null($cellValue) &&
($cellValue !== NULL) &&
$cellValue !== '' &&
!isset($aFlippedStringTable[$cellValue]) &&
($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_STRING || $cell->getDataType() == PHPExcel_Cell_DataType::TYPE_STRING2 || $cell->getDataType() == PHPExcel_Cell_DataType::TYPE_NULL)) {
$aStringTable[] = $cellValue;
$aFlippedStringTable[$cellValue] = true;
} elseif ($cellValue instanceof PHPExcel_RichText &&
!is_null($cellValue) &&
($cellValue !== NULL) &&
!isset($aFlippedStringTable[$cellValue->getHashCode()])) {
$aStringTable[] = $cellValue;
$aFlippedStringTable[$cellValue->getHashCode()] = true;