Skip to content

Commit 0134fff

Browse files
PakkuProgi1984
authored andcommitted
PowerPoint2007 Writer : Outline : Fixed the base unit
1 parent ea33980 commit 0134fff

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

docs/changes/1.1.0.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515

1616
- Fixed CI - [@Progi1984](https://github.com/Progi1984) in [#766](https://github.com/PHPOffice/PHPPresentation/pull/766)
1717
- PowerPoint2077 Writer : Fixed broken PPT Presentations due to MS Office update 2309 - [@WFarmerEthisphere](https://github.com/WFarmerEthisphere) in [#770](https://github.com/PHPOffice/PHPPresentation/pull/770)
18-
- PowerPoint2077 Writer : Fixed error when defining min/max bounds to 0 - [@LilyEssence](https://github.com/LilyEssence) in [#771](https://github.com/PHPOffice/PHPPresentation/pull/771)
18+
- PowerPoint2077 Writer : Fixed error when defining min/max bounds to 0 - [@LilyEssence](https://github.com/LilyEssence) in [#771](https://github.com/PHPOffice/PHPPresentation/pull/771)
19+
- PowerPoint2007 Writer : Outline : Fixed the base unit - [@Pakku](https://github.com/Pakku) in [#772](https://github.com/PHPOffice/PHPPresentation/pull/772)

src/PhpPresentation/Style/Outline.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Outline
3030
protected $fill;
3131

3232
/**
33-
* @var float
33+
* @var int
3434
*/
3535
protected $width = 1;
3636

@@ -51,15 +51,18 @@ public function setFill(Fill $fill): self
5151
return $this;
5252
}
5353

54-
public function getWidth(): float
54+
/**
55+
* Value in pixels.
56+
*/
57+
public function getWidth(): int
5558
{
5659
return $this->width;
5760
}
5861

5962
/**
60-
* Value in points.
63+
* Value in pixels.
6164
*/
62-
public function setWidth(float $pValue = 1): self
65+
public function setWidth(int $pValue = 1): self
6366
{
6467
$this->width = $pValue;
6568

src/PhpPresentation/Writer/ODPresentation/ObjectsChart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ protected function writeSeriesStyle(Chart $chart, Chart\Series $series): void
775775
if ($oOutline instanceof Outline) {
776776
$outlineWidth = $oOutline->getWidth();
777777
if (!empty($outlineWidth)) {
778-
$outlineWidth = number_format(CommonDrawing::pointsToCentimeters($outlineWidth), 3, '.', '');
778+
$outlineWidth = number_format(CommonDrawing::pixelsToCentimeters($outlineWidth), 3, '.', '');
779779
}
780780
$outlineColor = $oOutline->getFill()->getStartColor()->getRGB();
781781
}

src/PhpPresentation/Writer/PowerPoint2007/AbstractDecoratorWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ protected function writeOutline(XMLWriter $objWriter, ?Outline $oOutline): void
263263
return;
264264
}
265265
// Width : pts
266-
$width = CommonDrawing::pointsToEmu($oOutline->getWidth());
266+
$width = CommonDrawing::pixelsToEmu($oOutline->getWidth());
267267

268268
// a:ln
269269
$objWriter->startElement('a:ln');

0 commit comments

Comments
 (0)