You are here

private function PHPExcel_Reader_Excel5::_readTextObject in Loft Data Grids 7.2

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

* The TEXT Object record contains the text associated with a cell annotation.

1 call to PHPExcel_Reader_Excel5::_readTextObject()
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 1579

Class

PHPExcel_Reader_Excel5
PHPExcel_Reader_Excel5

Code

private function _readTextObject() {
  $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) {
    return;
  }

  // recordData consists of an array of subrecords looking like this:
  //	grbit: 2 bytes; Option Flags
  //	rot: 2 bytes; rotation
  //	cchText: 2 bytes; length of the text (in the first continue record)
  //	cbRuns: 2 bytes; length of the formatting (in the second continue record)
  // followed by the continuation records containing the actual text and formatting
  $grbitOpts = self::_GetInt2d($recordData, 0);
  $rot = self::_GetInt2d($recordData, 2);
  $cchText = self::_GetInt2d($recordData, 10);
  $cbRuns = self::_GetInt2d($recordData, 12);
  $text = $this
    ->_getSplicedRecordData();
  $this->_textObjects[$this->textObjRef] = array(
    'text' => substr($text["recordData"], $text["spliceOffsets"][0] + 1, $cchText),
    'format' => substr($text["recordData"], $text["spliceOffsets"][1], $cbRuns),
    'alignment' => $grbitOpts,
    'rotation' => $rot,
  );

  //		echo '<b>_readTextObject()</b><br />';
  //		var_dump($this->_textObjects[$this->textObjRef]);
  //		echo '<br />';
}