General performance improvements, and specific improvements in the CSV Reader

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@65064 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker
2010-12-09 12:07:50 +00:00
parent 500a8e763e
commit 1fad8bd2dd
23 changed files with 800 additions and 902 deletions
+4 -8
View File
@@ -46,28 +46,28 @@ class PHPExcel_Writer_CSV implements PHPExcel_Writer_IWriter {
*
* @var string
*/
private $_delimiter;
private $_delimiter = ',';
/**
* Enclosure
*
* @var string
*/
private $_enclosure;
private $_enclosure = '"';
/**
* Line ending
*
* @var string
*/
private $_lineEnding;
private $_lineEnding = PHP_EOL;
/**
* Sheet index to write
*
* @var int
*/
private $_sheetIndex;
private $_sheetIndex = 0;
/**
* Pre-calculate formulas
@@ -90,10 +90,6 @@ class PHPExcel_Writer_CSV implements PHPExcel_Writer_IWriter {
*/
public function __construct(PHPExcel $phpExcel) {
$this->_phpExcel = $phpExcel;
$this->_delimiter = ',';
$this->_enclosure = '"';
$this->_lineEnding = PHP_EOL;
$this->_sheetIndex = 0;
}
/**
+6 -12
View File
@@ -40,7 +40,7 @@ class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter
*
* @var boolean
*/
private $_preCalculateFormulas;
private $_preCalculateFormulas = true;
/**
* PHPExcel object
@@ -54,28 +54,28 @@ class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter
*
* @var integer
*/
private $_BIFF_version;
private $_BIFF_version = 0x0600;
/**
* Total number of shared strings in workbook
*
* @var int
*/
private $_str_total;
private $_str_total = 0;
/**
* Number of unique shared strings in workbook
*
* @var int
*/
private $_str_unique;
private $_str_unique = 0;
/**
* Array of unique shared strings in workbook
*
* @var array
*/
private $_str_table;
private $_str_table = array();
/**
* Color cache. Mapping between RGB value and color index.
@@ -105,15 +105,9 @@ class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter
* @param PHPExcel $phpExcel PHPExcel object
*/
public function __construct(PHPExcel $phpExcel) {
$this->_preCalculateFormulas = true;
$this->_phpExcel = $phpExcel;
$this->_BIFF_version = 0x0600;
$this->_str_total = 0;
$this->_str_unique = 0;
$this->_str_table = array();
$this->_parser = new PHPExcel_Writer_Excel5_Parser($this->_BIFF_version);
$this->_parser = new PHPExcel_Writer_Excel5_Parser($this->_BIFF_version);
}
/**
+6 -13
View File
@@ -46,7 +46,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
*
* @var int
*/
private $_sheetIndex;
private $_sheetIndex = 0;
/**
* Pre-calculate formulas
@@ -60,7 +60,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
*
* @var string
*/
private $_imagesRoot = '.';
private $_imagesRoot = '.';
/**
* Use inline CSS?
@@ -95,28 +95,28 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
*
* @var boolean
*/
private $_spansAreCalculated;
private $_spansAreCalculated = false;
/**
* Excel cells that should not be written as HTML cells
*
* @var array
*/
private $_isSpannedCell;
private $_isSpannedCell = array();
/**
* Excel cells that are upper-left corner in a cell merge
*
* @var array
*/
private $_isBaseCell;
private $_isBaseCell = array();
/**
* Excel rows that should not be written as HTML rows
*
* @var array
*/
private $_isSpannedRow;
private $_isSpannedRow = array();
/**
* Is the current writer creating PDF?
@@ -140,13 +140,6 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
public function __construct(PHPExcel $phpExcel) {
$this->_phpExcel = $phpExcel;
$this->_defaultFont = $this->_phpExcel->getDefaultStyle()->getFont();
$this->_sheetIndex = 0;
$this->_imagesRoot = '.';
$this->_spansAreCalculated = false;
$this->_isSpannedCell = array();
$this->_isBaseCell = array();
$this->_isSpannedRow = array();
}
/**