Properly format non-integer font sizes (#66)

The OOXML spec defines the font sizes (the `sz` element) as a double, so the value needs to be wrapped in `PHPExcel_Shared_String::FormatNumber()` to avoid breaking in non-English locales.
This commit is contained in:
Christian Schmidt 2017-01-04 09:27:42 +01:00 committed by Adrien Crivelli
parent 0c75d64817
commit 61408fc691
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ class Style extends WriterPart
// Size // Size
if ($pFont->getSize() !== null) { if ($pFont->getSize() !== null) {
$objWriter->startElement('sz'); $objWriter->startElement('sz');
$objWriter->writeAttribute('val', $pFont->getSize()); $objWriter->writeAttribute('val', \PhpOffice\PhpSpreadsheet\Shared\StringHelper::formatNumber($pFont->getSize()));
$objWriter->endElement(); $objWriter->endElement();
} }