private function PHPExcel_Writer_HTML::_createCSSStyleFont in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/HTML.php \PHPExcel_Writer_HTML::_createCSSStyleFont()
* Create CSS style (PHPExcel_Style_Font) * *
Parameters
PHPExcel_Style_Font $pStyle PHPExcel_Style_Font: * @return array
2 calls to PHPExcel_Writer_HTML::_createCSSStyleFont()
- PHPExcel_Writer_HTML::_createCSSStyle in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ HTML.php - * Create CSS style * *
- PHPExcel_Writer_HTML::_generateRow in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ HTML.php - * Generate row * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Writer/ HTML.php, line 918
Class
- PHPExcel_Writer_HTML
- PHPExcel_Writer_HTML
Code
private function _createCSSStyleFont(PHPExcel_Style_Font $pStyle) {
// Construct CSS
$css = array();
// Create CSS
if ($pStyle
->getBold()) {
$css['font-weight'] = 'bold';
}
if ($pStyle
->getUnderline() != PHPExcel_Style_Font::UNDERLINE_NONE && $pStyle
->getStrikethrough()) {
$css['text-decoration'] = 'underline line-through';
}
else {
if ($pStyle
->getUnderline() != PHPExcel_Style_Font::UNDERLINE_NONE) {
$css['text-decoration'] = 'underline';
}
else {
if ($pStyle
->getStrikethrough()) {
$css['text-decoration'] = 'line-through';
}
}
}
if ($pStyle
->getItalic()) {
$css['font-style'] = 'italic';
}
$css['color'] = '#' . $pStyle
->getColor()
->getRGB();
$css['font-family'] = '\'' . $pStyle
->getName() . '\'';
$css['font-size'] = $pStyle
->getSize() . 'pt';
// Return
return $css;
}