mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-24 01:00:05 +00:00
Refactor common writer settings/methods into an abstract writer class
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Writer
|
||||
* @package PHPExcel_Writer_HTML
|
||||
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
@@ -30,10 +30,10 @@
|
||||
* PHPExcel_Writer_HTML
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel_Writer
|
||||
* @package PHPExcel_Writer_HTML
|
||||
* @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
|
||||
class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter {
|
||||
/**
|
||||
* PHPExcel object
|
||||
*
|
||||
@@ -48,21 +48,6 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
|
||||
*/
|
||||
private $_sheetIndex = 0;
|
||||
|
||||
/**
|
||||
* Write charts that are defined in the workbook?
|
||||
* Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object;
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_includeCharts = false;
|
||||
|
||||
/**
|
||||
* Pre-calculate formulas
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private $_preCalculateFormulas = true;
|
||||
|
||||
/**
|
||||
* Images root
|
||||
*
|
||||
@@ -1272,26 +1257,6 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Pre-Calculate Formulas
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getPreCalculateFormulas() {
|
||||
return $this->_preCalculateFormulas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Pre-Calculate Formulas
|
||||
*
|
||||
* @param boolean $pValue Pre-Calculate Formulas?
|
||||
* @return PHPExcel_Writer_HTML
|
||||
*/
|
||||
public function setPreCalculateFormulas($pValue = true) {
|
||||
$this->_preCalculateFormulas = $pValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get images root
|
||||
*
|
||||
@@ -1473,29 +1438,4 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter {
|
||||
$this->_spansAreCalculated = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write charts in workbook?
|
||||
* If this is true, then the Writer will write definitions for any charts that exist in the PHPExcel object.
|
||||
* If false (the default) it will ignore any charts defined in the PHPExcel object.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getIncludeCharts() {
|
||||
return $this->_includeCharts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set write charts in workbook
|
||||
* Set to true, to advise the Writer to include any charts that exist in the PHPExcel object.
|
||||
* Set to false (the default) to ignore charts.
|
||||
*
|
||||
* @param boolean $pValue
|
||||
*
|
||||
* @return PHPExcel_Writer_Excel2007
|
||||
*/
|
||||
public function setIncludeCharts($pValue = false) {
|
||||
$this->_includeCharts = (boolean) $pValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user