Writer\Ods\Content: added docblock and removed unnecessary method parameter
This commit is contained in:
parent
13bf3d4361
commit
8600e63123
|
@ -33,10 +33,12 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet;
|
use PhpOffice\PhpSpreadsheet\Worksheet;
|
||||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||||
use PhpOffice\PhpSpreadsheet\Writer\Exception;
|
use PhpOffice\PhpSpreadsheet\Writer\Exception;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Writer\Ods;
|
||||||
use PhpOffice\PhpSpreadsheet\Writer\Ods\Cell\Comment;
|
use PhpOffice\PhpSpreadsheet\Writer\Ods\Cell\Comment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @category PhpSpreadsheet
|
* @category PhpSpreadsheet
|
||||||
|
* @method Ods getParentWriter
|
||||||
*
|
*
|
||||||
* @copyright Copyright (c) 2006 - 2015 PhpSpreadsheet (https://github.com/PHPOffice/PhpSpreadsheet)
|
* @copyright Copyright (c) 2006 - 2015 PhpSpreadsheet (https://github.com/PHPOffice/PhpSpreadsheet)
|
||||||
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
|
* @author Alexander Pervakov <frost-nzcr4@jagmort.com>
|
||||||
|
@ -49,18 +51,12 @@ class Content extends WriterPart
|
||||||
/**
|
/**
|
||||||
* Write content.xml to XML format.
|
* Write content.xml to XML format.
|
||||||
*
|
*
|
||||||
* @param \PhpOffice\PhpSpreadsheet\Spreadsheet $spreadsheet
|
|
||||||
*
|
|
||||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||||
*
|
*
|
||||||
* @return string XML Output
|
* @return string XML Output
|
||||||
*/
|
*/
|
||||||
public function write(Spreadsheet $spreadsheet = null)
|
public function write()
|
||||||
{
|
{
|
||||||
if (!$spreadsheet) {
|
|
||||||
$spreadsheet = $this->getParentWriter()->getSpreadsheet(); /* @var $spreadsheet Spreadsheet */
|
|
||||||
}
|
|
||||||
|
|
||||||
$objWriter = null;
|
$objWriter = null;
|
||||||
if ($this->getParentWriter()->getUseDiskCaching()) {
|
if ($this->getParentWriter()->getUseDiskCaching()) {
|
||||||
$objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
|
$objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
|
||||||
|
@ -114,7 +110,9 @@ class Content extends WriterPart
|
||||||
$objWriter->startElement('office:body');
|
$objWriter->startElement('office:body');
|
||||||
$objWriter->startElement('office:spreadsheet');
|
$objWriter->startElement('office:spreadsheet');
|
||||||
$objWriter->writeElement('table:calculation-settings');
|
$objWriter->writeElement('table:calculation-settings');
|
||||||
|
|
||||||
$this->writeSheets($objWriter);
|
$this->writeSheets($objWriter);
|
||||||
|
|
||||||
$objWriter->writeElement('table:named-expressions');
|
$objWriter->writeElement('table:named-expressions');
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
|
|
Loading…
Reference in New Issue