You are here

private function PHPExcel_Reader_Excel5::_readPageLayoutView 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::_readPageLayoutView()

* Read PLV Record(Created by Excel2007 or upper)

1 call to PHPExcel_Reader_Excel5::_readPageLayoutView()
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 4297

Class

PHPExcel_Reader_Excel5
PHPExcel_Reader_Excel5

Code

private function _readPageLayoutView() {
  $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;

  //var_dump(unpack("vrt/vgrbitFrt/V2reserved/vwScalePLV/vgrbit", $recordData));

  // offset: 0; size: 2; rt

  //->ignore
  $rt = self::_GetInt2d($recordData, 0);

  // offset: 2; size: 2; grbitfr

  //->ignore
  $grbitFrt = self::_GetInt2d($recordData, 2);

  // offset: 4; size: 8; reserved

  //->ignore

  // offset: 12; size 2; zoom scale
  $wScalePLV = self::_GetInt2d($recordData, 12);

  // offset: 14; size 2; grbit
  $grbit = self::_GetInt2d($recordData, 14);

  // decomprise grbit
  $fPageLayoutView = $grbit & 0x1;
  $fRulerVisible = $grbit >> 1 & 0x1;

  //no support
  $fWhitespaceHidden = $grbit >> 3 & 0x1;

  //no support
  if ($fPageLayoutView === 1) {
    $this->_phpSheet
      ->getSheetView()
      ->setView(PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT);
    $this->_phpSheet
      ->getSheetView()
      ->setZoomScale($wScalePLV);

    //set by Excel2007 only if SHEETVIEW_PAGE_LAYOUT
  }

  //otherwise, we cannot know whether SHEETVIEW_PAGE_LAYOUT or SHEETVIEW_PAGE_BREAK_PREVIEW.
}