Eliminate some code duplication
This commit is contained in:
parent
abb076a817
commit
f05f66fa82
File diff suppressed because it is too large
Load Diff
|
@ -288,7 +288,10 @@ class PHPExcel_Cell
|
||||||
if ($this->_dataType == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
if ($this->_dataType == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
||||||
try {
|
try {
|
||||||
// echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value<br />';
|
// echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value<br />';
|
||||||
$result = $this->getParent()->getParent()->getCalculationEngine()->calculateCellValue($this,$resetLog);
|
$result = PHPExcel_Calculation::getInstance(
|
||||||
|
$this->getParent()->getParent()
|
||||||
|
)->calculateCellValue($this,$resetLog);
|
||||||
|
// $result = $this->getParent()->getParent()->getCalculationEngine()->calculateCellValue($this,$resetLog);
|
||||||
// echo $this->getCoordinate().' calculation result is '.$result.'<br />';
|
// echo $this->getCoordinate().' calculation result is '.$result.'<br />';
|
||||||
} catch ( PHPExcel_Exception $ex ) {
|
} catch ( PHPExcel_Exception $ex ) {
|
||||||
if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->_calculatedValue !== NULL)) {
|
if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->_calculatedValue !== NULL)) {
|
||||||
|
|
|
@ -279,7 +279,7 @@ class PHPExcel_Chart_DataSeriesValues
|
||||||
|
|
||||||
public function refresh(PHPExcel_Worksheet $worksheet, $flatten = TRUE) {
|
public function refresh(PHPExcel_Worksheet $worksheet, $flatten = TRUE) {
|
||||||
if ($this->_dataSource !== NULL) {
|
if ($this->_dataSource !== NULL) {
|
||||||
$calcEngine = PHPExcel_Calculation::getInstance();
|
$calcEngine = PHPExcel_Calculation::getInstance($worksheet->getParent());
|
||||||
$newDataValues = PHPExcel_Calculation::_unwrapResult(
|
$newDataValues = PHPExcel_Calculation::_unwrapResult(
|
||||||
$calcEngine->_calculateFormulaValue(
|
$calcEngine->_calculateFormulaValue(
|
||||||
'='.$this->_dataSource,
|
'='.$this->_dataSource,
|
||||||
|
|
Loading…
Reference in New Issue