mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-22 21:36:05 +03:00
Bugfix: Locale-specific fix to text functions when passing a boolean argument instead of a string
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@73499 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
85ff71fd18
commit
48b2fb8e99
@ -96,7 +96,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
$stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue);
|
$stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue);
|
||||||
|
|
||||||
if (is_bool($stringValue)) {
|
if (is_bool($stringValue)) {
|
||||||
$stringValue = ($stringValue) ? 'TRUE' : 'FALSE';
|
$stringValue = ($stringValue) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self::$_invalidChars == Null) {
|
if (self::$_invalidChars == Null) {
|
||||||
@ -138,11 +138,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) {
|
if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) {
|
||||||
$characters = (int) $characters;
|
$characters = (int) $characters;
|
||||||
} else {
|
} else {
|
||||||
if ($characters) {
|
$characters = ($characters) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
$characters = 'True';
|
|
||||||
} else {
|
|
||||||
$characters = 'False';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,11 +169,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) {
|
if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) {
|
||||||
$arg = (int) $arg;
|
$arg = (int) $arg;
|
||||||
} else {
|
} else {
|
||||||
if ($arg) {
|
$arg = ($arg) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
$arg = 'TRUE';
|
|
||||||
} else {
|
|
||||||
$arg = 'FALSE';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$returnValue .= $arg;
|
$returnValue .= $arg;
|
||||||
@ -238,7 +230,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
|
|
||||||
if (!is_bool($needle)) {
|
if (!is_bool($needle)) {
|
||||||
if (is_bool($haystack)) {
|
if (is_bool($haystack)) {
|
||||||
$haystack = ($haystack) ? 'TRUE' : 'FALSE';
|
$haystack = ($haystack) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($offset > 0) && (strlen($haystack) > $offset)) {
|
if (($offset > 0) && (strlen($haystack) > $offset)) {
|
||||||
@ -271,7 +263,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
|
|
||||||
if (!is_bool($needle)) {
|
if (!is_bool($needle)) {
|
||||||
if (is_bool($haystack)) {
|
if (is_bool($haystack)) {
|
||||||
$haystack = ($haystack) ? 'TRUE' : 'FALSE';
|
$haystack = ($haystack) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($offset > 0) && (strlen($haystack) > $offset)) {
|
if (($offset > 0) && (strlen($haystack) > $offset)) {
|
||||||
@ -326,7 +318,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_bool($value)) {
|
if (is_bool($value)) {
|
||||||
$value = ($value) ? 'TRUE' : 'FALSE';
|
$value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('mb_substr')) {
|
if (function_exists('mb_substr')) {
|
||||||
@ -355,7 +347,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_bool($value)) {
|
if (is_bool($value)) {
|
||||||
$value = ($value) ? 'TRUE' : 'FALSE';
|
$value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('mb_substr')) {
|
if (function_exists('mb_substr')) {
|
||||||
@ -382,7 +374,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_bool($value)) {
|
if (is_bool($value)) {
|
||||||
$value = ($value) ? 'TRUE' : 'FALSE';
|
$value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((function_exists('mb_substr')) && (function_exists('mb_strlen'))) {
|
if ((function_exists('mb_substr')) && (function_exists('mb_strlen'))) {
|
||||||
@ -404,7 +396,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
|
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
|
||||||
|
|
||||||
if (is_bool($value)) {
|
if (is_bool($value)) {
|
||||||
$value = ($value) ? 'TRUE' : 'FALSE';
|
$value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('mb_strlen')) {
|
if (function_exists('mb_strlen')) {
|
||||||
@ -427,7 +419,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
|
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
|
||||||
|
|
||||||
if (is_bool($mixedCaseString)) {
|
if (is_bool($mixedCaseString)) {
|
||||||
$mixedCaseString = ($mixedCaseString) ? 'TRUE' : 'FALSE';
|
$mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('mb_convert_case')) {
|
if (function_exists('mb_convert_case')) {
|
||||||
@ -450,7 +442,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
|
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
|
||||||
|
|
||||||
if (is_bool($mixedCaseString)) {
|
if (is_bool($mixedCaseString)) {
|
||||||
$mixedCaseString = ($mixedCaseString) ? 'TRUE' : 'FALSE';
|
$mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('mb_convert_case')) {
|
if (function_exists('mb_convert_case')) {
|
||||||
@ -473,7 +465,7 @@ class PHPExcel_Calculation_TextData {
|
|||||||
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
|
$mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString);
|
||||||
|
|
||||||
if (is_bool($mixedCaseString)) {
|
if (is_bool($mixedCaseString)) {
|
||||||
$mixedCaseString = ($mixedCaseString) ? 'TRUE' : 'FALSE';
|
$mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (function_exists('mb_convert_case')) {
|
if (function_exists('mb_convert_case')) {
|
||||||
|
@ -34,6 +34,7 @@ Fixed in SVN:
|
|||||||
- Bugfix: (gilles06) Work item 15707 - ini_set() call in Calculation class destructor
|
- Bugfix: (gilles06) Work item 15707 - ini_set() call in Calculation class destructor
|
||||||
- Bugfix: (MBaker) Work item 15786 - RangeToArray strange array keys
|
- Bugfix: (MBaker) Work item 15786 - RangeToArray strange array keys
|
||||||
- Bugfix: (MBaker) Work item 15762 - INDIRECT() function doesn't work with named ranges
|
- Bugfix: (MBaker) Work item 15762 - INDIRECT() function doesn't work with named ranges
|
||||||
|
- Bugfix: (MBaker) Locale-specific fix to text functions when passing a boolean argument instead of a string
|
||||||
- General: (MBaker) Work item 15405 - Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC)
|
- General: (MBaker) Work item 15405 - Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC)
|
||||||
- General: (MBaker) Work item 15461 - Locale file paths not fit for windows
|
- General: (MBaker) Work item 15461 - Locale file paths not fit for windows
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user