You are here

public function PHPExcel_Style_Alignment::setIndent in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Alignment.php \PHPExcel_Style_Alignment::setIndent()

* Set indent * *

Parameters

int $pValue: * @return PHPExcel_Style_Alignment

1 call to PHPExcel_Style_Alignment::setIndent()
PHPExcel_Style_Alignment::applyFromArray in vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Alignment.php
* Apply styles from array * * <code> * $objPHPExcel->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray( * array( * 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, …

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Alignment.php, line 390

Class

PHPExcel_Style_Alignment
PHPExcel_Style_Alignment

Code

public function setIndent($pValue = 0) {
  if ($pValue > 0) {
    if ($this
      ->getHorizontal() != self::HORIZONTAL_GENERAL && $this
      ->getHorizontal() != self::HORIZONTAL_LEFT && $this
      ->getHorizontal() != self::HORIZONTAL_RIGHT) {
      $pValue = 0;

      // indent not supported
    }
  }
  if ($this->_isSupervisor) {
    $styleArray = $this
      ->getStyleArray(array(
      'indent' => $pValue,
    ));
    $this
      ->getActiveSheet()
      ->getStyle($this
      ->getSelectedCells())
      ->applyFromArray($styleArray);
  }
  else {
    $this->_indent = $pValue;
  }
  return $this;
}