Bugfix: Work Item CP20604 - Adding Sheet to Workbook Bug
This commit is contained in:
parent
992aee683a
commit
496b76e70a
|
@ -527,6 +527,11 @@ class PHPExcel
|
||||||
++$this->_activeSheetIndex;
|
++$this->_activeSheetIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($pSheet->getParent() === null) {
|
||||||
|
$pSheet->rebindParent($this);
|
||||||
|
}
|
||||||
|
|
||||||
return $pSheet;
|
return $pSheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -794,14 +794,16 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
||||||
* @return PHPExcel_Worksheet
|
* @return PHPExcel_Worksheet
|
||||||
*/
|
*/
|
||||||
public function rebindParent(PHPExcel $parent) {
|
public function rebindParent(PHPExcel $parent) {
|
||||||
$namedRanges = $this->_parent->getNamedRanges();
|
if ($this->_parent !== null) {
|
||||||
foreach ($namedRanges as $namedRange) {
|
$namedRanges = $this->_parent->getNamedRanges();
|
||||||
$parent->addNamedRange($namedRange);
|
foreach ($namedRanges as $namedRange) {
|
||||||
}
|
$parent->addNamedRange($namedRange);
|
||||||
|
}
|
||||||
|
|
||||||
$this->_parent->removeSheetByIndex(
|
$this->_parent->removeSheetByIndex(
|
||||||
$this->_parent->getIndex($this)
|
$this->_parent->getIndex($this)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
$this->_parent = $parent;
|
$this->_parent = $parent;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -46,6 +46,7 @@ Fixed in develop branch for release v1.8.0:
|
||||||
- Bugfix: (Roy Shahbazian) Work Item GH-299 - Fixed typo in Chart/Layout set/getYMode()
|
- Bugfix: (Roy Shahbazian) Work Item GH-299 - Fixed typo in Chart/Layout set/getYMode()
|
||||||
- Bugfix: (EliuFlorez) Work item GH-279 - Fatal error: Call to a member function cellExists() line: 3327 in calculation.php if referenced worksheet doesn't exist
|
- Bugfix: (EliuFlorez) Work item GH-279 - Fatal error: Call to a member function cellExists() line: 3327 in calculation.php if referenced worksheet doesn't exist
|
||||||
- Bugfix: (MBaker) Work Item GH-290 - AdvancedValueBinder "Division by zero"-error
|
- Bugfix: (MBaker) Work Item GH-290 - AdvancedValueBinder "Division by zero"-error
|
||||||
|
- Bugfix: (MBaker) Work Item CP20604 - Adding Sheet to Workbook Bug
|
||||||
- Feature: (amerov) - Implementation of the Excel HLOOKUP() function
|
- Feature: (amerov) - Implementation of the Excel HLOOKUP() function
|
||||||
- Feature: (MBaker) - Added "Quote Prefix" to style settings (Excel2007 Reader and Writer only)
|
- Feature: (MBaker) - Added "Quote Prefix" to style settings (Excel2007 Reader and Writer only)
|
||||||
- Feature: (MBaker) - Added Horizontal FILL alignment for Excel5 and Excel2007 Readers/Writers, and Horizontal DISTRIBUTED alignment for Excel2007 Reader/Writer
|
- Feature: (MBaker) - Added Horizontal FILL alignment for Excel5 and Excel2007 Readers/Writers, and Horizontal DISTRIBUTED alignment for Excel2007 Reader/Writer
|
||||||
|
|
Loading…
Reference in New Issue