Skip to content

Commit

Permalink
setStrikethrough() did not set the font
Browse files Browse the repository at this point in the history
Fixes #403
  • Loading branch information
PowerKiKi committed Mar 4, 2018
1 parent bdc95b1 commit 6e2447d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Read printing area correctly when skipping some sheets - [#371](https://github.com/PHPOffice/PhpSpreadsheet/issues/371)
- Avoid incorrectly overwriting calculated value type - [#394](https://github.com/PHPOffice/PhpSpreadsheet/issues/394)
- Select correct cell when calling freezePane - [#389](https://github.com/PHPOffice/PhpSpreadsheet/issues/389)
- `setStrikethrough()` did not set the font - [#403](https://github.com/PHPOffice/PhpSpreadsheet/issues/403)

## [1.1.0] - 2018-01-28

Expand Down
3 changes: 2 additions & 1 deletion src/PhpSpreadsheet/Style/Font.php
Expand Up @@ -484,8 +484,9 @@ public function setStrikethrough($pValue)
if ($pValue == '') {
$pValue = false;
}

if ($this->isSupervisor) {
$styleArray = $this->getStyleArray(['strike' => $pValue]);
$styleArray = $this->getStyleArray(['strikethrough' => $pValue]);
$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
} else {
$this->strikethrough = $pValue;
Expand Down

0 comments on commit 6e2447d

Please sign in to comment.