Fix attaching drawing for xls

FIX #53, #61
This commit is contained in:
John Doe 2016-12-26 12:20:24 +09:00 committed by Adrien Crivelli
parent 467115d32e
commit a39d71ec16
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
2 changed files with 14 additions and 10 deletions

View File

@ -29,7 +29,7 @@ class Escher
/** /**
* Drawing Group Container. * Drawing Group Container.
* *
* @var \DggContainer * @var Escher\DggContainer
*/ */
private $dggContainer; private $dggContainer;
@ -43,7 +43,7 @@ class Escher
/** /**
* Get Drawing Group Container. * Get Drawing Group Container.
* *
* @return Escher\DgContainer * @return Escher\DggContainer
*/ */
public function getDggContainer() public function getDggContainer()
{ {
@ -54,6 +54,8 @@ class Escher
* Set Drawing Group Container. * Set Drawing Group Container.
* *
* @param Escher\DggContainer $dggContainer * @param Escher\DggContainer $dggContainer
*
* @return Escher\DggContainer
*/ */
public function setDggContainer($dggContainer) public function setDggContainer($dggContainer)
{ {
@ -74,6 +76,8 @@ class Escher
* Set Drawing Container. * Set Drawing Container.
* *
* @param Escher\DgContainer $dgContainer * @param Escher\DgContainer $dgContainer
*
* @return Escher\DgContainer
*/ */
public function setDgContainer($dgContainer) public function setDgContainer($dgContainer)
{ {

View File

@ -72,7 +72,7 @@ class Escher
$this->data = ''; $this->data = '';
switch (get_class($this->object)) { switch (get_class($this->object)) {
case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher': case \PhpOffice\PhpSpreadsheet\Shared\Escher::class:
if ($dggContainer = $this->object->getDggContainer()) { if ($dggContainer = $this->object->getDggContainer()) {
$writer = new self($dggContainer); $writer = new self($dggContainer);
$this->data = $writer->close(); $this->data = $writer->close();
@ -83,7 +83,7 @@ class Escher
$this->spTypes = $writer->getSpTypes(); $this->spTypes = $writer->getSpTypes();
} }
break; break;
case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer': case \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer::class:
// this is a container record // this is a container record
// initialize // initialize
@ -136,7 +136,7 @@ class Escher
$this->data = $header . $innerData; $this->data = $header . $innerData;
break; break;
case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer': case \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer::class:
// this is a container record // this is a container record
// initialize // initialize
@ -163,7 +163,7 @@ class Escher
$this->data = $header . $innerData; $this->data = $header . $innerData;
break; break;
case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE': case \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer\BSE::class:
// this is a semi-container record // this is a semi-container record
// initialize // initialize
@ -212,7 +212,7 @@ class Escher
$this->data .= $data; $this->data .= $data;
break; break;
case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE\\Blip': case \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer\BSE\Blip::class:
// this is an atom record // this is an atom record
// write the record // write the record
@ -271,7 +271,7 @@ class Escher
break; break;
} }
break; break;
case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer': case \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer::class:
// this is a container record // this is a container record
// initialize // initialize
@ -323,7 +323,7 @@ class Escher
$this->data = $header . $innerData; $this->data = $header . $innerData;
break; break;
case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer': case \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer::class:
// this is a container record // this is a container record
// initialize // initialize
@ -362,7 +362,7 @@ class Escher
$this->spOffsets = $spOffsets; $this->spOffsets = $spOffsets;
$this->spTypes = $spTypes; $this->spTypes = $spTypes;
break; break;
case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer\\SpContainer': case \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer\SpContainer::class:
// initialize // initialize
$data = ''; $data = '';