示例#1
0
 /**
  * Create CSS style (PHPExcel_Style_Alignment)
  *
  * @param	PHPExcel_Style_Alignment		$pStyle			PHPExcel_Style_Alignment
  * @return	array
  */
 private function _createCSSStyleAlignment(PHPExcel_Style_Alignment $pStyle)
 {
     // Construct CSS
     $css = array();
     // Create CSS
     $css['vertical-align'] = $this->_mapVAlign($pStyle->getVertical());
     if ($textAlign = $this->_mapHAlign($pStyle->getHorizontal())) {
         $css['text-align'] = $textAlign;
         if (in_array($textAlign, array('left', 'right'))) {
             $css['padding-' . $textAlign] = (string) ((int) $pStyle->getIndent() * 9) . 'px';
         }
     }
     // Return
     return $css;
 }
示例#2
0
 /**
  * Create CSS style (PHPExcel_Style_Alignment)
  * 
  * @param	PHPExcel_Style_Alignment 		$pStyle			PHPExcel_Style_Alignment
  * @return	string
  */
 private function _createCSSStyleAlignment(PHPExcel_Style_Alignment $pStyle)
 {
     // Construct HTML
     $html = '';
     // Create CSS
     $html .= '        vertical-align: ' . $this->_mapVAlign($pStyle->getVertical()) . ';' . "\r\n";
     $html .= '        text-align: ' . $this->_mapHAlign($pStyle->getHorizontal()) . ';' . "\r\n";
     // Return
     return $html;
 }
示例#3
0
文件: HTML.php 项目: ohjack/newErp
 /**
  * Create CSS style (PHPExcel_Style_Alignment)
  *
  * @param	PHPExcel_Style_Alignment 		$pStyle			PHPExcel_Style_Alignment
  * @return	array
  */
 private function _createCSSStyleAlignment(PHPExcel_Style_Alignment $pStyle)
 {
     // Construct CSS
     $css = array();
     // Create CSS
     $css['vertical-align'] = $this->_mapVAlign($pStyle->getVertical());
     if ($textAlign = $this->_mapHAlign($pStyle->getHorizontal())) {
         $css['text-align'] = $textAlign;
     }
     // Return
     return $css;
 }
示例#4
0
 /**
  * Create CSS style (PHPExcel_Style_Alignment)
  *
  * @param	PHPExcel_Style_Alignment 		$pStyle			PHPExcel_Style_Alignment
  * @return	string
  */
 private function _createCSSStyleAlignment(PHPExcel_Style_Alignment $pStyle)
 {
     // Construct CSS
     $css = '';
     // Create CSS
     $css .= 'vertical-align: ' . $this->_mapVAlign($pStyle->getVertical()) . '; ';
     $css .= 'text-align: ' . $this->_mapHAlign($pStyle->getHorizontal()) . '; ';
     // Return
     return $css;
 }