You are here

private static function PHPExcel_Shared_OLERead::_GetInt4d in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php \PHPExcel_Shared_OLERead::_GetInt4d()

* Read 4 bytes of data at specified position * *

Parameters

string $data: * @param int $pos * @return int

4 calls to PHPExcel_Shared_OLERead::_GetInt4d()
PHPExcel_Shared_OLERead::getStream in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php
* Extract binary stream data * *
PHPExcel_Shared_OLERead::read in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php
* Read the file * *
PHPExcel_Shared_OLERead::_readData in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php
* Read a standard stream (by joining sectors using information from SAT) * *
PHPExcel_Shared_OLERead::_readPropertySets in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php
* Read entries in the directory stream.

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php, line 302

Class

PHPExcel_Shared_OLERead

Code

private static function _GetInt4d($data, $pos) {

  // FIX: represent numbers correctly on 64-bit system
  // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334
  // Hacked by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems
  $_or_24 = ord($data[$pos + 3]);
  if ($_or_24 >= 128) {

    // negative number
    $_ord_24 = -abs(256 - $_or_24 << 24);
  }
  else {
    $_ord_24 = ($_or_24 & 127) << 24;
  }
  return ord($data[$pos]) | ord($data[$pos + 1]) << 8 | ord($data[$pos + 2]) << 16 | $_ord_24;
}