From bca69a7fcd4215e755f7238d3fe81a309c63f231 Mon Sep 17 00:00:00 2001 From: willkensonh Date: Mon, 15 Oct 2018 14:06:36 +1100 Subject: [PATCH] killmenow --- src/Spout/Writer/Common/Manager/Style/StyleRegistry.php | 3 --- src/Spout/Writer/XLSX/Manager/Style/StyleManager.php | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php b/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php index d2f5bc3..325cc3d 100644 --- a/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php +++ b/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php @@ -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 */ diff --git a/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php b/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php index f83f16b..0a72ba9 100644 --- a/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php +++ b/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php @@ -72,8 +72,9 @@ EOD; $content = ''; /** @var NumberFormat $format */ - foreach ($registeredFormats as $format) { - + foreach ($registeredFormats as $styleId) { + $style = $this->styleRegistry->getStyleFromStyleId($styleId); + $format = $style->getNumberFormat(); $content .= ''; } $content .= '';