Update change log

This commit is contained in:
MarkBaker 2021-05-29 13:43:40 +02:00
parent c1f64a2429
commit 43dcd84520
2 changed files with 15 additions and 14 deletions

View File

@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
- Use of `nb` rather than `no` as the locale language code for Norsk Bokmål. - Use of `nb` rather than `no` as the locale language code for Norsk Bokmål.
### Fixed ### Fixed
- Fixed error in COUPNCD() calculation for end of month [Issue #2116](https://github.com/PHPOffice/PhpSpreadsheet/issues/2116) - [PR #2119](https://github.com/PHPOffice/PhpSpreadsheet/pull/2119)
- Resolve default values when a null argument is passed for HLOOKUP(), VLOOKUP() and ADDRESS() functions [Issue #2120](https://github.com/PHPOffice/PhpSpreadsheet/issues/2120) - [PR #2121](https://github.com/PHPOffice/PhpSpreadsheet/pull/2121) - Resolve default values when a null argument is passed for HLOOKUP(), VLOOKUP() and ADDRESS() functions [Issue #2120](https://github.com/PHPOffice/PhpSpreadsheet/issues/2120) - [PR #2121](https://github.com/PHPOffice/PhpSpreadsheet/pull/2121)
- Fixed incorrect R1C1 to A1 subtraction formula conversion (`R[-2]C-R[2]C`) [Issue #2076](https://github.com/PHPOffice/PhpSpreadsheet/pull/2076) [PR #2086](https://github.com/PHPOffice/PhpSpreadsheet/pull/2086) - Fixed incorrect R1C1 to A1 subtraction formula conversion (`R[-2]C-R[2]C`) [Issue #2076](https://github.com/PHPOffice/PhpSpreadsheet/pull/2076) [PR #2086](https://github.com/PHPOffice/PhpSpreadsheet/pull/2086)
- Correctly handle absolute A1 references when converting to R1C1 format [PR #2060](https://github.com/PHPOffice/PhpSpreadsheet/pull/2060) - Correctly handle absolute A1 references when converting to R1C1 format [PR #2060](https://github.com/PHPOffice/PhpSpreadsheet/pull/2060)

View File

@ -213,20 +213,20 @@ class Font extends Supervisor
/** /**
* Set Name. * Set Name.
* *
* @param string $pValue * @param string $fontname
* *
* @return $this * @return $this
*/ */
public function setName($pValue) public function setName($fontname)
{ {
if ($pValue == '') { if ($fontname == '') {
$pValue = 'Calibri'; $fontname = 'Calibri';
} }
if ($this->isSupervisor) { if ($this->isSupervisor) {
$styleArray = $this->getStyleArray(['name' => $pValue]); $styleArray = $this->getStyleArray(['name' => $fontname]);
$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
} else { } else {
$this->name = $pValue; $this->name = $fontname;
} }
return $this; return $this;
@ -249,27 +249,27 @@ class Font extends Supervisor
/** /**
* Set Size. * Set Size.
* *
* @param mixed $pValue A float representing the value of a positive measurement in points (1/72 of an inch) * @param mixed $sizeInPoints A float representing the value of a positive measurement in points (1/72 of an inch)
* *
* @return $this * @return $this
*/ */
public function setSize($pValue) public function setSize($sizeInPoints)
{ {
if (is_string($pValue) || is_int($pValue)) { if (is_string($sizeInPoints) || is_int($sizeInPoints)) {
$pValue = (float) $pValue; // $pValue = 0 if given string is not numeric $sizeInPoints = (float) $sizeInPoints; // $pValue = 0 if given string is not numeric
} }
// Size must be a positive floating point number // Size must be a positive floating point number
// ECMA-376-1:2016, part 1, chapter 18.4.11 sz (Font Size), p. 1536 // ECMA-376-1:2016, part 1, chapter 18.4.11 sz (Font Size), p. 1536
if (!is_float($pValue) || !($pValue > 0)) { if (!is_float($sizeInPoints) || !($sizeInPoints > 0)) {
$pValue = 10.0; $sizeInPoints = 10.0;
} }
if ($this->isSupervisor) { if ($this->isSupervisor) {
$styleArray = $this->getStyleArray(['size' => $pValue]); $styleArray = $this->getStyleArray(['size' => $sizeInPoints]);
$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
} else { } else {
$this->size = $pValue; $this->size = $sizeInPoints;
} }
return $this; return $this;