killmenow

This commit is contained in:
willkensonh 2018-10-15 14:06:36 +11:00
parent e31558771c
commit bca69a7fcd
2 changed files with 3 additions and 5 deletions

View File

@ -12,13 +12,10 @@ class StyleRegistry
{
/** @var array [SERIALIZED_STYLE] => [STYLE_ID] mapping table, keeping track of the registered styles */
protected $serializedStyleToStyleIdMappingTable = [];
protected $serializedNumberFormatToFormatIdMappingTable = [];
/** @var array [STYLE_ID] => [STYLE] mapping table, keeping track of the registered styles */
protected $styleIdToStyleMappingTable = [];
protected $numberFormats = [];
/**
* @param Style $defaultStyle
*/

View File

@ -72,8 +72,9 @@ EOD;
$content = '<numFmts count="'.count($registeredFormats).'">';
/** @var NumberFormat $format */
foreach ($registeredFormats as $format) {
foreach ($registeredFormats as $styleId) {
$style = $this->styleRegistry->getStyleFromStyleId($styleId);
$format = $style->getNumberFormat();
$content .= '<numFmt numFmtId="'.$format->getId().'" formatCode="'.$format->getFormatCode().'"/>';
}
$content .= '</numFmts>';