You are here

private function PHPExcel_Writer_Excel5_Worksheet::_writeWsbool in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php \PHPExcel_Writer_Excel5_Worksheet::_writeWsbool()

* Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction * with the SETUP record.

1 call to PHPExcel_Writer_Excel5_Worksheet::_writeWsbool()
PHPExcel_Writer_Excel5_Worksheet::close in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php
* Add data to the beginning of the workbook (note the reverse order) * and to the end of the workbook. * * @access public *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php, line 2147

Class

PHPExcel_Writer_Excel5_Worksheet
PHPExcel_Writer_Excel5_Worksheet

Code

private function _writeWsbool() {
  $record = 0x81;

  // Record identifier
  $length = 0x2;

  // Bytes to follow
  $grbit = 0x0;

  // The only option that is of interest is the flag for fit to page. So we
  // set all the options in one go.
  //
  // Set the option flags
  $grbit |= 0x1;

  // Auto page breaks visible
  if ($this->_outline_style) {
    $grbit |= 0x20;

    // Auto outline styles
  }
  if ($this->_phpSheet
    ->getShowSummaryBelow()) {
    $grbit |= 0x40;

    // Outline summary below
  }
  if ($this->_phpSheet
    ->getShowSummaryRight()) {
    $grbit |= 0x80;

    // Outline summary right
  }
  if ($this->_phpSheet
    ->getPageSetup()
    ->getFitToPage()) {
    $grbit |= 0x100;

    // Page setup fit to page
  }
  if ($this->_outline_on) {
    $grbit |= 0x400;

    // Outline symbols displayed
  }
  $header = pack("vv", $record, $length);
  $data = pack("v", $grbit);
  $this
    ->_append($header . $data);
}