Add support for font color

This commit is contained in:
Adrien Loison committed 2015-08-21 20:58:21 -07:00
1 parent 2699ffbcae
commit 9467b5a810
8 files changed
+241 -5

No files matched your search

+5 -2
View File
@@ -150,9 +150,14 @@ EOD;
{
$content = ' <fonts count="' . count($this->styleIdToStyleMappingTable) . '">' . PHP_EOL;
/** @var \Box\Spout\Writer\Style\Style $style */
foreach ($this->styleIdToStyleMappingTable as $style) {
$content .= ' <font>' . PHP_EOL;
$content .= ' <sz val="' . $style->getFontSize() . '"/>' . PHP_EOL;
$content .= ' <color rgb="' . $style->getFontColor() . '"/>' . PHP_EOL;
$content .= ' <name val="' . $style->getFontName() . '"/>' . PHP_EOL;
if ($style->isFontBold()) {
$content .= ' <b/>' . PHP_EOL;
}
@@ -166,8 +171,6 @@ EOD;
$content .= ' <strike/>' . PHP_EOL;
}
$content .= ' <sz val="' . $style->getFontSize() . '"/>' . PHP_EOL;
$content .= ' <name val="' . $style->getFontName() . '"/>' . PHP_EOL;
$content .= ' </font>' . PHP_EOL;
}