Skip to content

Commit 9675b5b

Browse files
committed
fix: Fixed missing images PHPOffice#829
1 parent 04700ed commit 9675b5b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

docs/changes/1.2.0.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
## Bug fixes
1111

1212
- Word2007 Reader: Fixed cast of spacing fixing [#729](https://github.com/PHPOffice/PHPPresentation/pull/729), [#796](https://github.com/PHPOffice/PHPPresentation/pull/796) in [#818](https://github.com/PHPOffice/PHPPresentation/pull/818)
13+
- Word2007 Writer: Fixed missing images [#829](https://github.com/PHPOffice/PHPPresentation/pull/829) by [@kw-pr](https://github.com/kw-pr)
1314

1415
## Miscellaneous
1516

samples/Sample_05_Chart.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function fnSlide_BarHorizontal(PhpPresentation $objPHPPresentation): void
132132

133133
// Create a bar chart (that should be inserted in a shape)
134134
echo date('H:i:s') . ' Create a horizontal bar chart (that should be inserted in a chart shape) ' . EOL;
135-
$barChartHorz = clone $objPHPPresentation->getSlide(1)->getShapeCollection()[1]->getPlotArea()->getType();
135+
$barChartHorz = clone $objPHPPresentation->getSlide(1)->getShapeCollection()[2]->getPlotArea()->getType();
136136
$barChartHorz->setBarDirection(Bar3D::DIRECTION_HORIZONTAL);
137137

138138
// Create templated slide
@@ -363,7 +363,7 @@ function fnSlide_Bar3DHorizontal(PhpPresentation $objPHPPresentation): void
363363

364364
// Create a bar chart (that should be inserted in a shape)
365365
echo date('H:i:s') . ' Create a horizontal bar chart (that should be inserted in a chart shape) ' . EOL;
366-
$bar3DChartHorz = clone $objPHPPresentation->getSlide(5)->getShapeCollection()[1]->getPlotArea()->getType();
366+
$bar3DChartHorz = clone $objPHPPresentation->getSlide(5)->getShapeCollection()[2]->getPlotArea()->getType();
367367
$bar3DChartHorz->setBarDirection(Bar3D::DIRECTION_HORIZONTAL);
368368

369369
// Create templated slide

src/PhpPresentation/Slide/AbstractSlide.php

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public function createDrawingShape(): File
242242
{
243243
$shape = new File();
244244
$this->addShape($shape);
245+
$shape->setContainer($this);
245246

246247
return $shape;
247248
}

0 commit comments

Comments
 (0)