You are here

private function PHPExcel_Writer_Excel2007_Style::_writeBorder in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php \PHPExcel_Writer_Excel2007_Style::_writeBorder()

* Write Border * *

Parameters

PHPExcel_Shared_XMLWriter $objWriter XML Writer: * @param PHPExcel_Style_Borders $pBorders Borders style * @throws PHPExcel_Writer_Exception

2 calls to PHPExcel_Writer_Excel2007_Style::_writeBorder()
PHPExcel_Writer_Excel2007_Style::writeStyles in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php
* Write styles to XML format * *
PHPExcel_Writer_Excel2007_Style::_writeCellStyleDxf in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php
* Write Cell Style Dxf * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php, line 357

Class

PHPExcel_Writer_Excel2007_Style
PHPExcel_Writer_Excel2007_Style

Code

private function _writeBorder(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Borders $pBorders = null) {

  // Write border
  $objWriter
    ->startElement('border');

  // Diagonal?
  switch ($pBorders
    ->getDiagonalDirection()) {
    case PHPExcel_Style_Borders::DIAGONAL_UP:
      $objWriter
        ->writeAttribute('diagonalUp', 'true');
      $objWriter
        ->writeAttribute('diagonalDown', 'false');
      break;
    case PHPExcel_Style_Borders::DIAGONAL_DOWN:
      $objWriter
        ->writeAttribute('diagonalUp', 'false');
      $objWriter
        ->writeAttribute('diagonalDown', 'true');
      break;
    case PHPExcel_Style_Borders::DIAGONAL_BOTH:
      $objWriter
        ->writeAttribute('diagonalUp', 'true');
      $objWriter
        ->writeAttribute('diagonalDown', 'true');
      break;
  }

  // BorderPr
  $this
    ->_writeBorderPr($objWriter, 'left', $pBorders
    ->getLeft());
  $this
    ->_writeBorderPr($objWriter, 'right', $pBorders
    ->getRight());
  $this
    ->_writeBorderPr($objWriter, 'top', $pBorders
    ->getTop());
  $this
    ->_writeBorderPr($objWriter, 'bottom', $pBorders
    ->getBottom());
  $this
    ->_writeBorderPr($objWriter, 'diagonal', $pBorders
    ->getDiagonal());
  $objWriter
    ->endElement();
}