Skip to content

Commit a8585da

Browse files
committed
Fixes some deprecated
1 parent 4e172e3 commit a8585da

File tree

8 files changed

+12
-36
lines changed

8 files changed

+12
-36
lines changed

samples/Sample_12_Reader_ODPresentation.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,9 @@
44

55
include_once 'Sample_Header.php';
66

7-
use PhpOffice\PhpPresentation\PhpPresentation;
8-
use PhpOffice\PhpPresentation\DocumentLayout;
97
use PhpOffice\PhpPresentation\IOFactory;
10-
use PhpOffice\PhpPresentation\Style\Alignment;
11-
use PhpOffice\PhpPresentation\Style\Color;
128
use PhpOffice\PhpPresentation\Slide;
13-
use PhpOffice\PhpPresentation\AbstractShape;
14-
use PhpOffice\PhpPresentation\Shape\MemoryDrawing;
159
use PhpOffice\PhpPresentation\Shape\RichText;
16-
use PhpOffice\PhpPresentation\Shape\Group;
1710

1811
$pptReader = IOFactory::createReader('ODPresentation');
1912
$oPHPPresentation = $pptReader->load('resources/Sample_12.odp');

samples/Sample_12_Reader_PowerPoint2007.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,9 @@
44

55
include_once 'Sample_Header.php';
66

7-
use PhpOffice\PhpPresentation\PhpPresentation;
8-
use PhpOffice\PhpPresentation\DocumentLayout;
97
use PhpOffice\PhpPresentation\IOFactory;
10-
use PhpOffice\PhpPresentation\Style\Alignment;
11-
use PhpOffice\PhpPresentation\Style\Color;
128
use PhpOffice\PhpPresentation\Slide;
13-
use PhpOffice\PhpPresentation\AbstractShape;
14-
use PhpOffice\PhpPresentation\Shape\MemoryDrawing;
159
use PhpOffice\PhpPresentation\Shape\RichText;
16-
use PhpOffice\PhpPresentation\Shape\Group;
1710

1811
$pptReader = IOFactory::createReader('PowerPoint2007');
1912
$oPHPPresentation = $pptReader->load('resources/Sample_12.pptx');

samples/Sample_12_Reader_PowerPoint97.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@
44

55
include_once 'Sample_Header.php';
66

7-
use PhpOffice\PhpPresentation\PhpPresentation;
8-
use PhpOffice\PhpPresentation\DocumentLayout;
97
use PhpOffice\PhpPresentation\IOFactory;
10-
use PhpOffice\PhpPresentation\Style\Alignment;
11-
use PhpOffice\PhpPresentation\Style\Color;
128
use PhpOffice\PhpPresentation\Slide;
13-
use PhpOffice\PhpPresentation\AbstractShape;
14-
use PhpOffice\PhpPresentation\Shape\MemoryDrawing;
159
use PhpOffice\PhpPresentation\Shape\RichText;
16-
use PhpOffice\PhpPresentation\Shape\Group;
1710

18-
$pptReader = PhpOffice\PhpPresentation\IOFactory::createReader('PowerPoint97');
11+
$pptReader = IOFactory::createReader('PowerPoint97');
1912
$oPHPPresentation = $pptReader->load('resources/Sample_12.ppt');
2013

2114
$oTree = new PhpPptTree($oPHPPresentation);

samples/Sample_Header.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use PhpOffice\PhpPresentation\AbstractShape;
1111
use PhpOffice\PhpPresentation\DocumentLayout;
1212
use PhpOffice\PhpPresentation\Shape\Drawing;
13-
use PhpOffice\PhpPresentation\Shape\MemoryDrawing;
1413
use PhpOffice\PhpPresentation\Shape\RichText;
1514
use PhpOffice\PhpPresentation\Shape\RichText\BreakElement;
1615
use PhpOffice\PhpPresentation\Shape\RichText\TextElement;
@@ -325,7 +324,7 @@ protected function displayShapeInfo(AbstractShape $oShape)
325324
$this->append('<dt>Fill</dt><dd>@Todo</dd>');
326325
$this->append('<dt>Border</dt><dd>@Todo</dd>');
327326
$this->append('<dt>IsPlaceholder</dt><dd>' . ($oShape->isPlaceholder() ? 'true' : 'false') . '</dd>');
328-
if($oShape instanceof MemoryDrawing) {
327+
if($oShape instanceof Drawing\Gd) {
329328
$this->append('<dt>Name</dt><dd>'.$oShape->getName().'</dd>');
330329
$this->append('<dt>Description</dt><dd>'.$oShape->getDescription().'</dd>');
331330
ob_start();

src/PhpPresentation/Reader/PowerPoint97.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818
namespace PhpOffice\PhpPresentation\Reader;
1919

2020
use PhpOffice\Common\Microsoft\OLERead;
21-
use PhpOffice\PhpPresentation\Shape\Drawing;
21+
use PhpOffice\Common\Text;
2222
use PhpOffice\PhpPresentation\PhpPresentation;
23-
use PhpOffice\PhpPresentation\Style\Alignment;
24-
use PhpOffice\PhpPresentation\Style\Color;
25-
use PhpOffice\PhpPresentation\Shape\RichText;
2623
use PhpOffice\PhpPresentation\AbstractShape;
27-
use PhpOffice\PhpPresentation\Style\Bullet;
24+
use PhpOffice\PhpPresentation\Shape;
25+
use PhpOffice\PhpPresentation\Shape\Drawing;
26+
use PhpOffice\PhpPresentation\Shape\Group;
2827
use PhpOffice\PhpPresentation\Shape\Hyperlink;
2928
use PhpOffice\PhpPresentation\Shape\Line;
30-
use PhpOffice\Common\Text;
31-
use PhpOffice\PhpPresentation\Shape\Group;
32-
use PhpOffice\PhpPresentation\Shape\PhpOffice\PhpPresentation\Shape;
29+
use PhpOffice\PhpPresentation\Shape\RichText;
30+
use PhpOffice\PhpPresentation\Style\Alignment;
31+
use PhpOffice\PhpPresentation\Style\Color;
32+
use PhpOffice\PhpPresentation\Style\Bullet;
3333

3434
/**
3535
* Serialized format reader

src/PhpPresentation/Shape/Group.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
use PhpOffice\PhpPresentation\GeometryCalculator;
2222
use PHPOffice\PhpPresentation\ShapeContainerInterface;
2323
use PhpOffice\PhpPresentation\Shape\Drawing;
24-
use PhpOffice\PhpPresentation\Shape\Line;
2524
use PhpOffice\PhpPresentation\Shape\RichText;
2625
use PhpOffice\PhpPresentation\Shape\Table;
2726

src/PhpPresentation/Writer/ODPresentation/MetaInfManifest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace PhpOffice\PhpPresentation\Writer\ODPresentation;
44

55
use PhpOffice\Common\Adapter\Zip\ZipInterface;
6-
use PhpOffice\Common\File;
76
use PhpOffice\Common\XMLWriter;
87
use PhpOffice\PhpPresentation\Shape\Drawing as ShapeDrawing;
98
use PhpOffice\PhpPresentation\Slide\Background\Image;

src/PhpPresentation/Writer/PowerPoint2007/PptMedia.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PhpOffice\PhpPresentation\Writer\PowerPoint2007;
44

5-
use PhpOffice\PhpPresentation\Shape\Drawing;
5+
use PhpOffice\PhpPresentation\Shape\Drawing\AbstractDrawingAdapter;
66

77
class PptMedia extends AbstractDecoratorWriter
88
{
@@ -13,7 +13,7 @@ public function render()
1313
{
1414
for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) {
1515
$shape = $this->getDrawingHashTable()->getByIndex($i);
16-
if (!$shape instanceof Drawing\AbstractDrawingAdapter) {
16+
if (!$shape instanceof AbstractDrawingAdapter) {
1717
continue;
1818
}
1919
$this->getZip()->addFromString('ppt/media/' . $shape->getIndexedFilename(), $shape->getContents());

0 commit comments

Comments
 (0)