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

View File

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