You are here

private function PHPExcel_Reader_Excel5::_readStyle in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php \PHPExcel_Reader_Excel5::_readStyle()

* Read STYLE record

1 call to PHPExcel_Reader_Excel5::_readStyle()
PHPExcel_Reader_Excel5::load in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php
* Loads PHPExcel from file * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php, line 2471

Class

PHPExcel_Reader_Excel5
PHPExcel_Reader_Excel5

Code

private function _readStyle() {
  $length = self::_GetInt2d($this->_data, $this->_pos + 2);
  $recordData = $this
    ->_readRecordData($this->_data, $this->_pos + 4, $length);

  // move stream pointer to next record
  $this->_pos += 4 + $length;
  if (!$this->_readDataOnly) {

    // offset: 0; size: 2; index to XF record and flag for built-in style
    $ixfe = self::_GetInt2d($recordData, 0);

    // bit: 11-0; mask 0x0FFF; index to XF record
    $xfIndex = (0xfff & $ixfe) >> 0;

    // bit: 15; mask 0x8000; 0 = user-defined style, 1 = built-in style
    $isBuiltIn = (bool) ((0x8000 & $ixfe) >> 15);
    if ($isBuiltIn) {

      // offset: 2; size: 1; identifier for built-in style
      $builtInId = ord($recordData[2]);
      switch ($builtInId) {
        case 0x0:

          // currently, we are not using this for anything
          break;
        default:
          break;
      }
    }
    else {

      // user-defined; not supported by PHPExcel
    }
  }
}