Merge pull request #76 from Gemorroj/develop
fixed PHPExcel_Shared_String::StrToTitle method
This commit is contained in:
commit
e0cb9c5c3c
|
@ -39,11 +39,11 @@ class PHPExcel_Shared_CodePage
|
||||||
* Convert Microsoft Code Page Identifier to Code Page Name which iconv
|
* Convert Microsoft Code Page Identifier to Code Page Name which iconv
|
||||||
* and mbstring understands
|
* and mbstring understands
|
||||||
*
|
*
|
||||||
* @param int $number Microsoft Code Page Indentifier
|
* @param integer $codePage Microsoft Code Page Indentifier
|
||||||
* @return string Code Page Name
|
* @return string Code Page Name
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function NumberToName($codePage = '1252')
|
public static function NumberToName($codePage = 1252)
|
||||||
{
|
{
|
||||||
switch ($codePage) {
|
switch ($codePage) {
|
||||||
case 367: return 'ASCII'; break; // ASCII
|
case 367: return 'ASCII'; break; // ASCII
|
||||||
|
|
|
@ -40,7 +40,7 @@ class PHPExcel_Shared_Excel5
|
||||||
* This holds for Arial 10
|
* This holds for Arial 10
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $sheet The sheet
|
* @param PHPExcel_Worksheet $sheet The sheet
|
||||||
* @param integer $col The column
|
* @param string $col The column
|
||||||
* @return integer The width in pixels
|
* @return integer The width in pixels
|
||||||
*/
|
*/
|
||||||
public static function sizeCol($sheet, $col = 'A')
|
public static function sizeCol($sheet, $col = 'A')
|
||||||
|
@ -136,9 +136,9 @@ class PHPExcel_Shared_Excel5
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $sheet
|
* @param PHPExcel_Worksheet $sheet
|
||||||
* @param string $startColumn
|
* @param string $startColumn
|
||||||
* @param integer $startOffset Offset within start cell measured in 1/1024 of the cell width
|
* @param integer $startOffsetX Offset within start cell measured in 1/1024 of the cell width
|
||||||
* @param string $endColumn
|
* @param string $endColumn
|
||||||
* @param integer $endOffset Offset within end cell measured in 1/1024 of the cell width
|
* @param integer $endOffsetX Offset within end cell measured in 1/1024 of the cell width
|
||||||
* @return integer Horizontal measured in pixels
|
* @return integer Horizontal measured in pixels
|
||||||
*/
|
*/
|
||||||
public static function getDistanceX(PHPExcel_Worksheet $sheet, $startColumn = 'A', $startOffsetX = 0, $endColumn = 'A', $endOffsetX = 0)
|
public static function getDistanceX(PHPExcel_Worksheet $sheet, $startColumn = 'A', $startOffsetX = 0, $endColumn = 'A', $endOffsetX = 0)
|
||||||
|
@ -166,10 +166,10 @@ class PHPExcel_Shared_Excel5
|
||||||
* The distanceY is found as sum of all the spanning rows minus two offsets
|
* The distanceY is found as sum of all the spanning rows minus two offsets
|
||||||
*
|
*
|
||||||
* @param PHPExcel_Worksheet $sheet
|
* @param PHPExcel_Worksheet $sheet
|
||||||
* @param string $startRow (1-based)
|
* @param integer $startRow (1-based)
|
||||||
* @param integer $startOffset Offset within start cell measured in 1/256 of the cell height
|
* @param integer $startOffsetY Offset within start cell measured in 1/256 of the cell height
|
||||||
* @param string $endRow (1-based)
|
* @param integer $endRow (1-based)
|
||||||
* @param integer $endOffset Offset within end cell measured in 1/256 of the cell height
|
* @param integer $endOffsetY Offset within end cell measured in 1/256 of the cell height
|
||||||
* @return integer Vertical distance measured in pixels
|
* @return integer Vertical distance measured in pixels
|
||||||
*/
|
*/
|
||||||
public static function getDistanceY(PHPExcel_Worksheet $sheet, $startRow = 1, $startOffsetY = 0, $endRow = 1, $endOffsetY = 0)
|
public static function getDistanceY(PHPExcel_Worksheet $sheet, $startRow = 1, $startOffsetY = 0, $endRow = 1, $endOffsetY = 0)
|
||||||
|
|
|
@ -621,7 +621,7 @@ class PHPExcel_Shared_String
|
||||||
public static function StrToTitle($pValue = '')
|
public static function StrToTitle($pValue = '')
|
||||||
{
|
{
|
||||||
if (function_exists('mb_convert_case')) {
|
if (function_exists('mb_convert_case')) {
|
||||||
return mb_convert_case($pValue, MB_CASE_LOWER, "UTF-8");
|
return mb_convert_case($pValue, MB_CASE_TITLE, "UTF-8");
|
||||||
}
|
}
|
||||||
return ucwords($pValue);
|
return ucwords($pValue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ class PHPExcel_Shared_TimeZone
|
||||||
/**
|
/**
|
||||||
* Return the Timezone transition for the specified timezone and timestamp
|
* Return the Timezone transition for the specified timezone and timestamp
|
||||||
*
|
*
|
||||||
* @param string $timezone The timezone for finding the transitions
|
* @param DateTimeZone $objTimezone The timezone for finding the transitions
|
||||||
* @param integer $timestamp PHP date/time value for finding the current transition
|
* @param integer $timestamp PHP date/time value for finding the current transition
|
||||||
* @return array The current transition details
|
* @return array The current transition details
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue