mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-24 01:00:05 +00:00
Performance improvements to the CSV Reader and Writer
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@64769 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
@@ -322,6 +322,15 @@ class PHPExcel_Shared_String
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function buildCharacterSets() {
|
||||
if(empty(self::$_controlCharacters)) {
|
||||
self::_buildControlCharacters();
|
||||
}
|
||||
if(empty(self::$_SYLKCharacters)) {
|
||||
self::_buildSYLKCharacters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert from OpenXML escaped control character to PHP control character
|
||||
*
|
||||
@@ -337,10 +346,6 @@ class PHPExcel_Shared_String
|
||||
* @return string
|
||||
*/
|
||||
public static function ControlCharacterOOXML2PHP($value = '') {
|
||||
if(empty(self::$_controlCharacters)) {
|
||||
self::_buildControlCharacters();
|
||||
}
|
||||
|
||||
return str_replace( array_keys(self::$_controlCharacters), array_values(self::$_controlCharacters), $value );
|
||||
}
|
||||
|
||||
@@ -359,10 +364,6 @@ class PHPExcel_Shared_String
|
||||
* @return string
|
||||
*/
|
||||
public static function ControlCharacterPHP2OOXML($value = '') {
|
||||
if(empty(self::$_controlCharacters)) {
|
||||
self::_buildControlCharacters();
|
||||
}
|
||||
|
||||
return str_replace( array_values(self::$_controlCharacters), array_keys(self::$_controlCharacters), $value );
|
||||
}
|
||||
|
||||
@@ -657,10 +658,6 @@ class PHPExcel_Shared_String
|
||||
return $pValue;
|
||||
}
|
||||
|
||||
if(empty(self::$_SYLKCharacters)) {
|
||||
self::_buildSYLKCharacters();
|
||||
}
|
||||
|
||||
foreach (self::$_SYLKCharacters as $k => $v) {
|
||||
$pValue = str_replace($k, $v, $pValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user