protected function PHPExcel_Helper_HTML::startFontTag in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Helper/HTML.php \PHPExcel_Helper_HTML::startFontTag()
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Helper/ HTML.php, line 650
Class
Code
protected function startFontTag($tag) {
foreach ($tag->attributes as $attribute) {
$attributeName = strtolower($attribute->name);
$attributeValue = $attribute->value;
if ($attributeName == 'color') {
if (preg_match('/rgb\\s*\\(/', $attributeValue)) {
$this->{$attributeName} = $this
->rgbToColour($attributeValue);
}
elseif (strpos(trim($attributeValue), '#') === 0) {
$this->{$attributeName} = ltrim($attributeValue, '#');
}
else {
$this->{$attributeName} = $this
->colourNameLookup($attributeValue);
}
}
else {
$this->{$attributeName} = $attributeValue;
}
}
}