function _sheetnode_phpexcel_get_layout in Sheetnode 7
Same name and namespace in other branches
- 5 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_get_layout()
- 6 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_get_layout()
- 7.2 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_get_layout()
1 call to _sheetnode_phpexcel_get_layout()
- _sheetnode_phpexcel_import_cell in modules/
sheetnode_phpexcel/ sheetnode_phpexcel.import.inc
File
- modules/
sheetnode_phpexcel/ sheetnode_phpexcel.import.inc, line 501 - Import sheetnodes through PHPExcel for xls or xlsx spreadsheets.
Code
function _sheetnode_phpexcel_get_layout($style) {
$valignments = array(
PHPExcel_Style_Alignment::VERTICAL_TOP => 'top',
PHPExcel_Style_Alignment::VERTICAL_CENTER => 'middle',
PHPExcel_Style_Alignment::VERTICAL_BOTTOM => 'bottom',
PHPExcel_Style_Alignment::VERTICAL_JUSTIFY => 'middle',
);
$valignment = $valignments[$style
->getAlignment()
->getVertical()];
$padding_left = $style
->getAlignment()
->getIndent();
$padding_left = empty($padding_left) ? '*' : PHPExcel_Shared_Drawing::pointsToPixels($padding_left) . 'px';
return 'padding:* * * ' . $padding_left . ';vertical-align:' . $valignment . ';';
}