mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-22 21:36:05 +03:00
Bugfix: Workitem 14256 - Worksheet title exception when duplicate worksheet is being renamed but exceeds the 31 character limit
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@61118 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
5f5e793c05
commit
6925afdb91
@ -657,9 +657,21 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||
if ($this->getParent()->getSheetByName($pValue)) {
|
||||
// Use name, but append with lowest possible integer
|
||||
|
||||
if (PHPExcel_Shared_String::CountCharacters($pValue) > 29) {
|
||||
$pValue = PHPExcel_Shared_String::Substring($pValue,0,29);
|
||||
}
|
||||
$i = 1;
|
||||
while ($this->getParent()->getSheetByName($pValue . ' ' . $i)) {
|
||||
++$i;
|
||||
if ($i == 10) {
|
||||
if (PHPExcel_Shared_String::CountCharacters($pValue) > 28) {
|
||||
$pValue = PHPExcel_Shared_String::Substring($pValue,0,28);
|
||||
}
|
||||
} elseif ($i == 100) {
|
||||
if (PHPExcel_Shared_String::CountCharacters($pValue) > 27) {
|
||||
$pValue = PHPExcel_Shared_String::Substring($pValue,0,27);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$altTitle = $pValue . ' ' . $i;
|
||||
|
@ -41,7 +41,8 @@ Fixed in SVN:
|
||||
- Bugfix: (MBaker) Workitem 14223 - Advanced Value Binder Not Working?
|
||||
- Bugfix: (MBaker) Workitem 14226 - unassigned object variable in PHPExcel->removeCellXfByIndex
|
||||
- Bugfix: (MBaker) Workitem 14236 - problem with getting cell values from another worksheet... (if cell doesn't exist)
|
||||
- Bugfix: (MBaker) Workitem 14260 & 14233 - Setting cell values to one char strings & Trouble reading one character string (thanks gorfou)
|
||||
- Bugfix: (MBaker) Workitems 14260 & 14233 - Setting cell values to one char strings & Trouble reading one character string (thanks gorfou)
|
||||
- Bugfix: (MBaker) Workitem 14256 - Worksheet title exception when duplicate worksheet is being renamed but exceeds the 31 character limit
|
||||
|
||||
|
||||
2010-08-26 (v1.7.4):
|
||||
|
Loading…
Reference in New Issue
Block a user