|
@@ 2984-3006 (lines=23) @@
|
| 2981 |
|
/** |
| 2982 |
|
* Read HEADER record |
| 2983 |
|
*/ |
| 2984 |
|
private function _readHeader() |
| 2985 |
|
{ |
| 2986 |
|
$length = self::_GetInt2d($this->_data, $this->_pos + 2); |
| 2987 |
|
$recordData = substr($this->_data, $this->_pos + 4, $length); |
| 2988 |
|
|
| 2989 |
|
// move stream pointer to next record |
| 2990 |
|
$this->_pos += 4 + $length; |
| 2991 |
|
|
| 2992 |
|
if (!$this->_readDataOnly) { |
| 2993 |
|
// offset: 0; size: var |
| 2994 |
|
// realized that $recordData can be empty even when record exists |
| 2995 |
|
if ($recordData) { |
| 2996 |
|
if ($this->_version == self::XLS_BIFF8) { |
| 2997 |
|
$string = self::_readUnicodeStringLong($recordData); |
| 2998 |
|
} else { |
| 2999 |
|
$string = $this->_readByteStringShort($recordData); |
| 3000 |
|
} |
| 3001 |
|
|
| 3002 |
|
$this->_phpSheet->getHeaderFooter()->setOddHeader($string['value']); |
| 3003 |
|
$this->_phpSheet->getHeaderFooter()->setEvenHeader($string['value']); |
| 3004 |
|
} |
| 3005 |
|
} |
| 3006 |
|
} |
| 3007 |
|
|
| 3008 |
|
|
| 3009 |
|
/** |
|
@@ 3012-3033 (lines=22) @@
|
| 3009 |
|
/** |
| 3010 |
|
* Read FOOTER record |
| 3011 |
|
*/ |
| 3012 |
|
private function _readFooter() |
| 3013 |
|
{ |
| 3014 |
|
$length = self::_GetInt2d($this->_data, $this->_pos + 2); |
| 3015 |
|
$recordData = substr($this->_data, $this->_pos + 4, $length); |
| 3016 |
|
|
| 3017 |
|
// move stream pointer to next record |
| 3018 |
|
$this->_pos += 4 + $length; |
| 3019 |
|
|
| 3020 |
|
if (!$this->_readDataOnly) { |
| 3021 |
|
// offset: 0; size: var |
| 3022 |
|
// realized that $recordData can be empty even when record exists |
| 3023 |
|
if ($recordData) { |
| 3024 |
|
if ($this->_version == self::XLS_BIFF8) { |
| 3025 |
|
$string = self::_readUnicodeStringLong($recordData); |
| 3026 |
|
} else { |
| 3027 |
|
$string = $this->_readByteStringShort($recordData); |
| 3028 |
|
} |
| 3029 |
|
$this->_phpSheet->getHeaderFooter()->setOddFooter($string['value']); |
| 3030 |
|
$this->_phpSheet->getHeaderFooter()->setEvenFooter($string['value']); |
| 3031 |
|
} |
| 3032 |
|
} |
| 3033 |
|
} |
| 3034 |
|
|
| 3035 |
|
|
| 3036 |
|
/** |